mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 21:53:26 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8a42d9bb4 | ||
|
|
c1b20d8f71 | ||
|
|
08ce9f6c7c | ||
|
|
0b4e40bcdf | ||
|
|
9ae2aee222 |
18
README.md
18
README.md
@@ -40,7 +40,6 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
|
|||||||
- GA Pageviews reporting (Advanced)
|
- GA Pageviews reporting (Advanced)
|
||||||
- SEO and Performance Optimization
|
- SEO and Performance Optimization
|
||||||
|
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
|
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
|
||||||
@@ -72,7 +71,7 @@ And then execute:
|
|||||||
$ bundle
|
$ bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, copy the missing files (refer to the [starter project][starter] for the detailed file directory structure) from the theme's gem to your Jekyll site, and append all the variables of the theme's `_config.yml` to your Jekyll site.
|
Finally, copy the extra files (refer to the [starter project][starter] for the detailed file directory structure) from the theme's gem to your Jekyll site, and append all the variables of the theme's `_config.yml` to your Jekyll site.
|
||||||
|
|
||||||
> **Hint**: To locate the theme’s gem, execute:
|
> **Hint**: To locate the theme’s gem, execute:
|
||||||
>
|
>
|
||||||
@@ -115,6 +114,7 @@ What it does is:
|
|||||||
|
|
||||||
3. Automatically create a commit to save the changes.
|
3. Automatically create a commit to save the changes.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
@@ -149,20 +149,23 @@ Open a browser and visit to _<http://localhost:4000>_.
|
|||||||
|
|
||||||
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
|
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
|
||||||
|
|
||||||
Now you can now choose ONE of the following methods to deploy your website.
|
Now you can choose ONE of the following methods to deploy your Jekyll site.
|
||||||
|
|
||||||
#### Deploy on GitHub Pages
|
#### Deploy on GitHub Pages
|
||||||
|
|
||||||
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GH Pages service.
|
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GH Pages service.
|
||||||
|
|
||||||
Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`.
|
Quickly check the files needed for GitHub Actions build:
|
||||||
Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
|
||||||
|
1. Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
||||||
|
|
||||||
|
2. Ensuer your Jekyll site has file `/tools/test.sh` and `/tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
|
||||||
|
|
||||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||||
|
|
||||||
Rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
Next, rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
||||||
|
|
||||||
And then publish your site by:
|
And then publish your Jekyll site by:
|
||||||
|
|
||||||
1. Push any commit to remote to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
1. Push any commit to remote to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
||||||
|
|
||||||
@@ -194,6 +197,7 @@ $ docker run -it --rm \
|
|||||||
|
|
||||||
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
|
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
|
||||||
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
For more details and the better reading experience, please check out the [tutorials on demo site](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
For more details and the better reading experience, please check out the [tutorials on demo site](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
Powered by
|
Powered by
|
||||||
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
|
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
|
||||||
with
|
with
|
||||||
<a href="{{ site.data.meta.homepage }}" target="_blank" rel="noopener">{{ site.data.meta.name }}</a>
|
<a href="https://github.com/cotes2020/jekyll-theme-chirpy"
|
||||||
|
target="_blank" rel="noopener">Chirpy</a>
|
||||||
theme.
|
theme.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ And then execute:
|
|||||||
$ bundle
|
$ bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, copy the missing files (refer to the [starter project][starter] for the detailed file directory structure) from the theme's gem to your Jekyll site, and append all the variables of the theme's `_config.yml` to your Jekyll site.
|
Finally, copy the extra files (refer to the [starter project][starter] for the detailed file directory structure) from the theme's gem to your Jekyll site, and append all the variables of the theme's `_config.yml` to your Jekyll site.
|
||||||
|
|
||||||
> **Hint**: To locate the theme’s gem, execute:
|
> **Hint**: To locate the theme’s gem, execute:
|
||||||
>
|
>
|
||||||
@@ -116,20 +116,23 @@ Open a browser and visit to _<http://localhost:4000>_.
|
|||||||
|
|
||||||
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
|
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
|
||||||
|
|
||||||
Now you can now choose ONE of the following methods to deploy your website.
|
Now you can choose ONE of the following methods to deploy your Jekyll site.
|
||||||
|
|
||||||
#### Deploy on GitHub Pages
|
#### Deploy on GitHub Pages
|
||||||
|
|
||||||
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GH Pages service.
|
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GH Pages service.
|
||||||
|
|
||||||
Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`.
|
Quickly check the files needed for GitHub Actions build:
|
||||||
Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
|
||||||
|
1. Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
||||||
|
|
||||||
|
2. Ensuer your Jekyll site has file `/tools/test.sh` and `/tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
|
||||||
|
|
||||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||||
|
|
||||||
Rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
Next, rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
||||||
|
|
||||||
And then publish your site by:
|
And then publish your Jekyll site by:
|
||||||
|
|
||||||
1. Push any commit to remote to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
1. Push any commit to remote to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* The styles for Jekyll theme Chirpy
|
* The styles for Jekyll theme Chirpy
|
||||||
*
|
*
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
assets/js/dist/categories.min.js
vendored
2
assets/js/dist/categories.min.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
assets/js/dist/home.min.js
vendored
2
assets/js/dist/home.min.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
assets/js/dist/page.min.js
vendored
2
assets/js/dist/page.min.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
assets/js/dist/post.min.js
vendored
2
assets/js/dist/post.min.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
assets/js/dist/pvreport.min.js
vendored
2
assets/js/dist/pvreport.min.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Chirpy v3.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v3.0.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2021 Cotes Chung
|
* © 2021 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "jekyll-theme-chirpy"
|
spec.name = "jekyll-theme-chirpy"
|
||||||
spec.version = "3.0.1"
|
spec.version = "3.0.2"
|
||||||
spec.authors = ["Cotes Chung"]
|
spec.authors = ["Cotes Chung"]
|
||||||
spec.email = ["cotes.chung@gmail.com"]
|
spec.email = ["cotes.chung@gmail.com"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jekyll-theme-chirpy",
|
"name": "jekyll-theme-chirpy",
|
||||||
"version": "3.0.0",
|
"version": "3.0.2",
|
||||||
"description": "A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.",
|
"description": "A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ ASSETS=(
|
|||||||
|
|
||||||
GEM_SPEC="jekyll-theme-chirpy.gemspec"
|
GEM_SPEC="jekyll-theme-chirpy.gemspec"
|
||||||
|
|
||||||
|
NODE_META="package.json"
|
||||||
|
|
||||||
bump_assets() {
|
bump_assets() {
|
||||||
_version="$1"
|
_version="$1"
|
||||||
for i in ${!ASSETS[@]}; do
|
for i in ${!ASSETS[@]}; do
|
||||||
@@ -27,13 +29,19 @@ bump_assets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bump_gemspec() {
|
bump_gemspec() {
|
||||||
_version="$1"
|
sed -i "s/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/$1/" $GEM_SPEC
|
||||||
sed -i "s/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/$_version/" $GEM_SPEC
|
}
|
||||||
|
|
||||||
|
bump_node() {
|
||||||
|
sed -i \
|
||||||
|
"s,[\"]version[\"]: [\"][[:digit:]]\.[[:digit:]]\.[[:digit:]][\"],\"version\": \"$1\"," \
|
||||||
|
$NODE_META
|
||||||
}
|
}
|
||||||
|
|
||||||
bump() {
|
bump() {
|
||||||
bump_assets $1
|
bump_assets $1
|
||||||
bump_gemspec $1
|
bump_gemspec $1
|
||||||
|
bump_node $1
|
||||||
|
|
||||||
if [[ -n $(git status . -s) ]]; then
|
if [[ -n $(git status . -s) ]]; then
|
||||||
git add .
|
git add .
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ init() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Gemfile could be changed by `bundle install` in actions workflow
|
# Gemfile could be changed by `bundle install` in actions workflow
|
||||||
if [[ -n $(git status Gemfile.lock --porcelain) ]]; then
|
if [[ -n $(git ls-files | grep Gemfile.lock) && -n \
|
||||||
|
$(git status Gemfile.lock --porcelain) ]]; then
|
||||||
git checkout -- Gemfile.lock
|
git checkout -- Gemfile.lock
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user