Here’s the desired output, using only one of my posts for brevity:
Each object has the following properties:
date object has two properties of its own:
machine. This is because I use the date within a
time element. A
datetime attribute needs to be in a particular machine-readable format, whereas the text content can be in a more human-readable format.
The above code loops through all of my posts and adds each one to my
I got the idea from the Simple-Jekyll-Search plugin, although I didn’t use it. Many thanks to its creator, Christian Fei!
If you have questions, feedback, or any other suggestions, please do email me. I'd love to hear from you!