I am happily using zero-maintenance tag pages but now I'm trying to additionally sort and paginate my posts (calendar events) based on an explicitly set date - and specifically by the month.
For example: I could just add tags: april to the post front matter, and it'd allow me to sort my posts by the april tag, but I was thinking it'd be better if Eleventy could just generate the tag from the post date filter I'm using. Something like:
tags: {{ event.date | monthName }} which would output tags: april
..but alas, we can't use template syntax in front matter data for anything other than the permalink field.
So, how could I generate a tag or array of tags for a post based on post data, such as the date? Or is anyone using a different method to organise their collections by date? 🤔
I am happily using zero-maintenance tag pages but now I'm trying to additionally sort and paginate my posts (calendar events) based on an explicitly set date - and specifically by the month.
For example: I could just add
tags: aprilto the post front matter, and it'd allow me to sort my posts by theapriltag, but I was thinking it'd be better if Eleventy could just generate the tag from the post date filter I'm using. Something like:tags: {{ event.date | monthName }}which would outputtags: april..but alas, we can't use template syntax in front matter data for anything other than the permalink field.
So, how could I generate a tag or array of tags for a post based on post data, such as the date? Or is anyone using a different method to organise their collections by date? 🤔