fix: store last-modified dates in frontmatter#3002
Merged
bartlomieju merged 5 commits intomainfrom Mar 30, 2026
Merged
Conversation
Deno Deploy's GitHub integration does a shallow clone, so the `git log` approach from #2982 produces no data at deploy time. Instead, generate lastModified.json from git history as a build step and commit it via CI. The Lume preprocessor now reads from this JSON file instead of spawning git. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the git log + JSON fallback logic into the Lume preprocessor in _config.ts. With full git history (local dev, CI with fetch-depth:0) it generates dates from git and persists lastModified.json. On shallow clones (Deno Deploy) it falls back to the committed JSON file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bartlomieju
commented
Mar 27, 2026
bartlomieju
commented
Mar 27, 2026
bartlomieju
commented
Mar 27, 2026
Move last-modified dates into each page's frontmatter rather than generating from git history or a JSON file. This is self-documenting, works on any environment (Deploy, shallow clones, forks), and enables a future lint to enforce date updates on content PRs. - Add `last_modified: YYYY-MM-DD` to 219 .md files in runtime/, deploy/, and examples/tutorials/ (populated from git history) - Simplify _config.ts preprocessor to just read from frontmatter - Remove lastModified.json - Revert .github/workflows/lint.yml changes - Add scripts/populate_last_modified.ts migration script Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crowlKats
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git loglast_modified: YYYY-MM-DDdirectly in each page's frontmatterChanges
last_modifiedfrontmatter to 219.mdfiles acrossruntime/,deploy/, andexamples/tutorials/(dates populated from git history)_config.tspreprocessor to readlastModifiedfrom frontmatterlastModified.json.github/workflows/lint.ymlchangesTest plan
/runtime/fundamentals/typescript/)🤖 Generated with Claude Code