mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-07-28 08:26:30 +10:00
Compare commits
1 Commits
df4e70f0a2
...
v7.2.2
Author | SHA1 | Date | |
---|---|---|---|
aa0fd48ad0 |
2
Gemfile
2
Gemfile
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.1"
|
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.2"
|
||||||
|
|
||||||
gem "html-proofer", "~> 5.0", group: :test
|
gem "html-proofer", "~> 5.0", group: :test
|
||||||
|
|
||||||
|
@ -212,7 +212,8 @@ exclude:
|
|||||||
- tools
|
- tools
|
||||||
- README.md
|
- README.md
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- "*.js"
|
- purgecss.js
|
||||||
|
- rollup.config.js
|
||||||
- "package*.json"
|
- "package*.json"
|
||||||
|
|
||||||
jekyll-archives:
|
jekyll-archives:
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user