Andy-set-studio / hylia

Hylia is a lightweight Eleventy starter kit to help you to create your own blog or personal website.
https://hylia.website
MIT License
905 stars 230 forks source link

Exclude future posts from tag lists #60

Closed brandonaaron closed 5 years ago

brandonaaron commented 5 years ago

I'm not very familiar with 11ty just yet. I didn't see an obvious way to manage this via collections. Seems we'd need a dynamic hook into how 11ty generates its tag based collections to also filter the date. Maybe another alternative is to capture all the potential tags from the posts collection and overwrite them.

I took a slightly different path that seemed a little more straight forward. I exposed a timestamp as global.now that I used to filter the post list within the view.

Please let me know if there is a more appropriate way to solve this within 11ty best practices.

This resolves #52.

Andy-set-studio commented 5 years ago

Nice work @brandonaaron. Thank you!