Skip to content

Commit ceb97c3

Browse files
vorushinclaude
andcommitted
Add jekyll-last-modified-at to populate sitemap lastmod from git history
Sitemap <lastmod> dates now reflect the actual last git commit that touched each file, instead of just the date from the filename. CI checkout changed to fetch-depth: 0 so full git history is available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7b6d28d commit ceb97c3

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.github/workflows/jekyll.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2325

2426
- name: Setup Ruby
2527
uses: ruby/setup-ruby@v1

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ Include in posts via `{% include diagram-name.html %}`.
6868
### SEO & Metadata
6969

7070
- `jekyll-seo-tag` generates `<title>`, Open Graph, and Twitter Card meta tags
71-
- `jekyll-sitemap` auto-generates `sitemap.xml`
71+
- `jekyll-sitemap` auto-generates `sitemap.xml`; `jekyll-last-modified-at` populates `<lastmod>` from git history
7272
- `robots.txt` points to the sitemap
7373
- Default `og:image` set to `/apple-touch-icon.png` via front matter defaults in `_config.yml`
7474
- Favicons: `/img/favicon.ico`, `/favicon-32x32.png`, `/favicon-16x16.png`, `/apple-touch-icon.png`
7575
- `404.html` provides a custom not-found page for GitHub Pages
76+
- CI checkout uses `fetch-depth: 0` (full git history) so `jekyll-last-modified-at` can read commit dates

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ gem "jekyll", "~> 4.3"
55
group :jekyll_plugins do
66
gem "jekyll-seo-tag"
77
gem "jekyll-sitemap"
8+
gem "jekyll-last-modified-at"
89
end

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ lang: en
2525
plugins:
2626
- jekyll-seo-tag
2727
- jekyll-sitemap
28+
- jekyll-last-modified-at
2829

2930
# Defaults
3031
# Posts default to lang: ru for legacy Russian archive; English posts override with lang: en

0 commit comments

Comments
 (0)