Ancestors

Written by Léonie Watson on 2025-01-05 at 16:43

Hello people wise in the ways of #Eleventy - what's the best way to show both the original post date of a blog post and, optionally, the date it was last modified? 🙏

=> More informations about this toot | More toots from tink@w3c.social

Written by Boris Schapira on 2025-01-05 at 16:46

@tink Hey! I know you can add a parameter in a YAML Front-Matter that automatically collects some key dates, like the "Last Modified" date. The documentation is here: https://www.11ty.dev/docs/dates/

=> More informations about this toot | More toots from boostmarks@hachyderm.io

Written by Fynn Ellie Becker on 2025-01-05 at 16:51

@boostmarks @tink I was also thinking about these Eleventy date adjustment keywords. But they always override the “page.date” property, right? So it wouldn’t be an additional “lastModified” property accessible from the template but still the “date” property, now with a different value.

=> More informations about this toot | More toots from mvsde@mastodon.social

Written by Fynn Ellie Becker on 2025-01-05 at 16:59

@boostmarks @tink There is a discussion on GitHub talking about this and the solution there is to manually set up frontmatter to track the modified date:

https://github.com/11ty/eleventy/discussions/2332

There’s also a GitHub issue asking for the date keywords for other data properties than “date”, but this didn’t go anywhere yet:

https://github.com/11ty/eleventy/issues/2660

=> More informations about this toot | More toots from mvsde@mastodon.social

Toot

Written by Zoë Bijl on 2025-01-06 at 11:18

@mvsde @boostmarks @tink that’s what I ended up doing (a lastupdated property in the front matter). Slightly more work but also more control? Like an update to the front matter—and thereby git commit date—doesn’t necessarily equal a content/article update imo.

=> More informations about this toot | More toots from moiety@front-end.social

Descendants

Written by Léonie Watson on 2025-01-06 at 13:32

@moiety Agreed. I don't want/need every minor modification to the post to be flagged, only substantive updates, so this frontmatter approach looks like a good fit.@mvsde @boostmarks

=> More informations about this toot | More toots from tink@w3c.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113781132924432775
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
297.847077 milliseconds
Gemini-to-HTML Time
1.410921 milliseconds

This content has been proxied by September (3851b).