mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-07-28 00:16:31 +10:00
Compare commits
3 Commits
c07609cce0
...
v7.2.3
Author | SHA1 | Date | |
---|---|---|---|
1d4d35af85 | |||
aa0fd48ad0 | |||
333ce4603e |
2
Gemfile
2
Gemfile
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "jekyll-theme-chirpy", "~> 7.2"
|
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.3"
|
||||||
|
|
||||||
gem "html-proofer", "~> 5.0", group: :test
|
gem "html-proofer", "~> 5.0", group: :test
|
||||||
|
|
||||||
|
@ -212,8 +212,9 @@ exclude:
|
|||||||
- tools
|
- tools
|
||||||
- README.md
|
- README.md
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- "*.config.js"
|
- purgecss.js
|
||||||
- package*.json
|
- rollup.config.js
|
||||||
|
- "package*.json"
|
||||||
|
|
||||||
jekyll-archives:
|
jekyll-archives:
|
||||||
enabled: [categories, tags]
|
enabled: [categories, tags]
|
||||||
|
@ -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