Skip to content

Automate homepage footer update date#25

Merged
fanyangCS merged 1 commit into
masterfrom
automate-footer-update-date
Jul 13, 2026
Merged

Automate homepage footer update date#25
fanyangCS merged 1 commit into
masterfrom
automate-footer-update-date

Conversation

@fanyangCS

Copy link
Copy Markdown
Owner

Summary

  • derive the homepage footer date at Jekyll build time from the checked-out repository HEAD commit's committer timestamp
  • render that value in the existing Last updated on … wording instead of a hard-coded date
  • cover timestamp extraction with a focused regression test and run it in both production and branch-preview builds

Implementation

A highest-priority Jekyll generator runs git log -1 --format=%cI HEAD in the site source and exposes the result as site.repository_last_updated_at. The homepage Liquid layout formats that timestamp as the existing human-readable month/day/year date. This makes merged changes and redeploys reflect the effective commit rather than the wall-clock build time, with no client-side JavaScript.

Verification

  • ruby test/repository_last_updated_test.rb — 1 run, 1 assertion, pass
  • ruby test/cache_bust_test.rb — 6 runs, 8 assertions, pass
  • npx prettier . --check — pass
  • JEKYLL_ENV=production bundle exec jekyll build — pass
  • inspected generated _site/index.html; it rendered Last updated on July 13, 2026, matching the source HEAD commit date used by that build

This change and PR description were AI-generated under human direction and review.

@fanyangCS
fanyangCS merged commit a51554f into master Jul 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant