{"slug": "no-more-hand-edited-dates", "title": "No more hand-edited dates", "summary": "A developer released astro-git-dates, an Astro plugin that sets a content note's date from its last git commit at build time, replacing hand-edited dates. The plugin wraps a content collection's loader and swaps the `git Last Modified` or `git Created` frontmatter keyword for a real date before schema validation, requiring blog and code notes to move from `type: 'content'` collections to the `glob()` loader. The change is opt-in per note, so no dates changed in bulk, and the build produces exactly the same pages as before.", "body_md": "# No more hand-edited dates\n\n## A new package, astro-git-dates, sets a post or code note's date from its last commit at build time.\n\nWhen I change a code note, I change its date too, or I ask Claude to do it. Now I don’t have to. A note with `date: git Last Modified` in its frontmatter gets the date of its last commit at build time, so I edit the note and the date follows. Blog posts can do the same, and `git Created` gives the date of the first commit. I had this on the old Eleventy site and missed it.\n\nI couldn’t find an Astro plugin that did it, so I wrote one: [astro-git-dates](https://zander.wtf/projects/astro-git-dates). It wraps a content collection’s loader and swaps the keyword for a real date before the schema checks it. To use it, the blog and code notes had to move off the old `type: 'content'` collections and onto the `glob()` loader. That touched every page that used `entry.slug`, but the build makes exactly the same pages as before. I diffed the list to be sure.\n\nIt’s opt-in per note, so nothing changed date in bulk. I’ll switch notes over as I edit them.", "url": "https://wpnews.pro/news/no-more-hand-edited-dates", "canonical_source": "https://zander.wtf/blog/2026-10-01-git-dates/", "published_at": "2026-10-01 00:00:00+00:00", "updated_at": "2026-10-02 16:06:36.476716+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["astro-git-dates", "Astro", "Eleventy", "Claude"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/no-more-hand-edited-dates", "markdown": "https://wpnews.pro/news/no-more-hand-edited-dates.md", "text": "https://wpnews.pro/news/no-more-hand-edited-dates.txt", "jsonld": "https://wpnews.pro/news/no-more-hand-edited-dates.jsonld"}}