How to create an empty array
In your _config.yml
initialize an empty array into a YAML property:
emptyArray: []
Then access that property in your Liquid template:
You can push values into the array like so:
Get any item by its ID
The ID of any posts or collection item in Jekyll will be its filename. This is what you see in the URL as the item’s path (not including the parent path). For example a file called about-us.md
with have the ID of about-us
. With this ID in hand you can now embed any post/collection item anywhere by filtering for it:
String concatenation
Append method:
Capture method:
Date formatting
Format a date by appending a date filter to your variable like this:
Here are the docs and here’s a handy reference on %placholders.