Compare commits

..

2 Commits

Author SHA1 Message Date
46e2bdfa6e Update critical file(s) according to Chirpy v7.2.4
Some checks failed
Build and Deploy / build (push) Failing after 35s
Build and Deploy / deploy (push) Has been skipped
2024-12-21 19:23:15 +00:00
1d4d35af85 Update critical file(s) according to Chirpy v7.2.3
Some checks failed
Build and Deploy / build (push) Failing after 36s
Build and Deploy / deploy (push) Has been skipped
2024-12-15 13:06:48 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.2" gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4"
gem "html-proofer", "~> 5.0", group: :test gem "html-proofer", "~> 5.0", group: :test

View File

@ -4,10 +4,10 @@
Jekyll::Hooks.register :posts, :post_init do |post| Jekyll::Hooks.register :posts, :post_init do |post|
commit_num = `git rev-list --count HEAD "#{ post.path }"`.strip commit_num = `git rev-list --count HEAD "#{ post.path }"`
if commit_num.to_i > 1 if commit_num.to_i > 1
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`.strip lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
post.data['last_modified_at'] = lastmod_date post.data['last_modified_at'] = lastmod_date
end end