mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-07-28 00:16:31 +10:00
Compare commits
3 Commits
v7.1.0
...
2811bf64ac
Author | SHA1 | Date | |
---|---|---|---|
2811bf64ac | |||
7ab45bd41f | |||
0b5185aaea |
2
Gemfile
2
Gemfile
@ -2,7 +2,7 @@
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "jekyll-theme-chirpy", "~> 7.1"
|
||||
gem "jekyll-theme-chirpy", "~> 7.1", ">= 7.1.1"
|
||||
|
||||
gem "html-proofer", "~> 5.0", group: :test
|
||||
|
||||
|
19
README.md
19
README.md
@ -25,25 +25,9 @@ Jekyll site. The following is a list of targets:
|
||||
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
|
||||
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of
|
||||
the basic environment. [Git](https://git-scm.com/) also needs to be installed.
|
||||
|
||||
## Installation
|
||||
|
||||
Sign in to GitHub and [**use this template**][use-template] to generate a brand new repository and name it
|
||||
`USERNAME.github.io`, where `USERNAME` represents your GitHub username.
|
||||
|
||||
Then clone it to your local machine and run:
|
||||
|
||||
```console
|
||||
$ bundle
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Please see the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy#documentation).
|
||||
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||
|
||||
## Contributing
|
||||
|
||||
@ -55,6 +39,5 @@ This work is published under [MIT][mit] License.
|
||||
|
||||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
||||
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
|
||||
[use-template]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment
|
||||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
Jekyll::Hooks.register :posts, :post_init do |post|
|
||||
|
||||
commit_num = `git rev-list --count HEAD "#{ post.path }"`
|
||||
commit_num = `git rev-list --count HEAD "#{ post.path }"`.strip
|
||||
|
||||
if commit_num.to_i > 1
|
||||
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
|
||||
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`.strip
|
||||
post.data['last_modified_at'] = lastmod_date
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user