jekyll-theme-chirpy 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fded96e3d7dfaafecb7d2af83d0018f303650108f335e81bad7d092d6dd6a29c
4
- data.tar.gz: 1fd6bef006b5c74a6cd130a1ccb31bedb35ffcb4e4ce94e51d9954ac828e00eb
3
+ metadata.gz: 5c99ab83f66e840977678fd80250d93c68e6421ecfe5cae4620de64c1576c611
4
+ data.tar.gz: 9359f709ec036cf0cb8acd888592b855e2ad353c34e40a1132bae7182d85b134
5
5
  SHA512:
6
- metadata.gz: 64ab039f7c14fefecc792ed1ca2838c13f72620cebf1a4d03e9b1eb4dc5c44dfe565a4e69af8aa0b0b386463ca44acd22eabdf53f7ca1504b02ffbc0e44143aa
7
- data.tar.gz: ffbcc3c8332a960882acbd84d7cee887de4a097a598cce2e479f0936212b95547fea96ccdf3f17f8d650bc1808ccdab46fffb61711c9b3fd00397a7a0cdf82c1
6
+ metadata.gz: 37d4373e21c0aee60ab01808e1319d4e8a15922e7744393b867cb0c824d71b66d065ccd6052fe183a91578ebf34f74164d89960be6c1835319a969a85f28707a
7
+ data.tar.gz: 875752a1d930e93921949c2e07956c73f05d1fa0894df2c6db0a011c43916fa88c3fee3d5fd29f06c8818c5fb64cf8c6c56b287078577369128c60d587d43b28
data/README.md CHANGED
@@ -1,9 +1,3 @@
1
- <div align="right">
2
-
3
- EN / [中文](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
4
-
5
- </div>
6
-
7
1
  <div align="center">
8
2
 
9
3
  # Chirpy Jekyll Theme
@@ -25,66 +19,32 @@
25
19
  ## Features
26
20
 
27
21
  - Localized Layout
28
- - Configurable Theme Mode
22
+ - Dark/Light Theme Mode
29
23
  - Pinned Posts
30
24
  - Hierarchical Categories
31
25
  - Last Modified Date for Posts
32
26
  - Table of Contents
33
- - Automatically Recommend Related Posts
27
+ - Auto-generated Related Posts
34
28
  - Syntax Highlighting
35
29
  - Mathematical Expressions
36
30
  - Mermaid Diagram & Flowchart
31
+ - Disqus/Utterances Comments
37
32
  - Search
38
33
  - Atom Feeds
39
- - Disqus Comments
40
34
  - Google Analytics
41
- - GA Pageviews Reporting (Advanced)
35
+ - GA Pageviews Reporting
42
36
  - SEO & Performance Optimization
43
37
 
44
- ## Prerequisites
45
-
46
- Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
47
-
48
- ## Installation
49
-
50
- ### Creating a New Site
51
-
52
- There are two ways to create a new repository for this theme:
53
-
54
- - [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
55
- - [**Forking on GitHub**](#option-2-forking-on-github) - Convenient for custom development, but difficult to upgrade. Unless you are familiar with Jekyll and are determined to tweak or contribute to this project, this approach is not recommended.
56
-
57
- #### Option 1. Using the Chirpy Starter
58
-
59
- Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
60
-
61
- #### Option 2. Forking on GitHub
62
-
63
- [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and rename it to `<GH_USERNAME>.github.io`. Please note that the default branch code is in development. If you want the site to be stable, please switch to the [latest tag][latest-tag] and start writing.
64
-
65
- And then execute:
66
-
67
- ```console
68
- $ bash tools/init.sh
69
- ```
70
38
 
71
- > **Note**: If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command.
39
+ ## Quick Start
72
40
 
73
- The above command will:
41
+ Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
74
42
 
75
- 1. Removes some files or directories from your repository:
43
+ ### Step 1. Creating a New Site
76
44
 
77
- - `.travis.yml`
78
- - files under `_posts`
79
- - folder `docs`
45
+ Create a new repository from the [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/generate) and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
80
46
 
81
- 2. If the option `--no-gh` is provided, the directory `.github` will be deleted. Otherwise, set up the GitHub Action workflow by removing the extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in the folder `.github`.
82
-
83
- 3. Removes item `Gemfile.lock` from `.gitignore`.
84
-
85
- 4. Creates a new commit to save the changes automatically.
86
-
87
- ### Installing Dependencies
47
+ ### Step 2. Installing Dependencies
88
48
 
89
49
  Before running for the first time, go to the root directory of your site, and install dependencies as follows:
90
50
 
@@ -92,32 +52,15 @@ Before running for the first time, go to the root directory of your site, and in
92
52
  $ bundle
93
53
  ```
94
54
 
95
- ## Usage
96
-
97
- ### Configuration
98
-
99
- Update the variables of `_config.yml` as needed. Some of them are typical options:
100
-
101
- - `url`
102
- - `avatar`
103
- - `timezone`
104
- - `lang`
105
-
106
- ### Customing Stylesheet
107
-
108
- If you need to customize the stylesheet, copy the theme's `assets/css/style.scss` to the same path on your Jekyll site, and then add the custom style at the end of the style file.
55
+ ### Step 3. Running Local Server
109
56
 
110
- Starting from [`v4.1.0`][chirpy-4.1.0], if you want to overwrite the SASS variables defined in `_sass/addon/variables.scss`, create a new file `_sass/variables-hook.scss` and assign new values to the target variable in it.
111
-
112
- ### Running Local Server
113
-
114
- You may want to preview the site contents before publishing, so just run it by:
57
+ Run the following command in the root directory of the site:
115
58
 
116
59
  ```console
117
60
  $ bundle exec jekyll s
118
61
  ```
119
62
 
120
- Or run the site on Docker with the following command:
63
+ Or run with Docker:
121
64
 
122
65
  ```console
123
66
  $ docker run -it --rm \
@@ -128,91 +71,13 @@ $ docker run -it --rm \
128
71
 
129
72
  After a while, the local service will be published at _<http://127.0.0.1:4000>_.
130
73
 
131
- ### Deployment
132
-
133
- Before the deployment begins, check out 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 starts with a slash, e.g, `/project-name`.
134
-
135
- Now you can choose ONE of the following methods to deploy your Jekyll site.
136
-
137
- #### Deploy by Using Github Actions
138
-
139
- 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 GitHub Pages service.
140
-
141
- Quickly check the files needed for GitHub Actions build:
142
-
143
- - Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
144
-
145
- - Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
146
-
147
- - Furthermore, if you have committed `Gemfile.lock` to the repo, and your runtime system is not Linux, don't forget to update the platform list in the lock file:
148
-
149
- ```console
150
- $ bundle lock --add-platform x86_64-linux
151
- ```
152
-
153
- After the above steps, rename your repository to `<GH_USERNAME>.github.io` on GitHub.
154
-
155
- Now publish your Jekyll site by:
156
-
157
- 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.
158
-
159
- 2. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar, and then in the section **Source** of _GitHub Pages_, select the `/(root)` directory of branch `gh-pages` as the [publishing source][pages-src]. Remember to click <kbd>Save</kbd> before leaving.
160
-
161
- ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@f4e0354b674f65a53b8917f0f786ed2956898cc1/posts/20190809/gh-pages-sources.png)
162
-
163
- 3. Visit your website at the address indicated by GitHub.
164
-
165
- #### Manually Build and Deploy
166
-
167
- On self-hosted servers, you cannot enjoy the convenience of **GitHub Actions**. Therefore, you should build the site on your local machine and then upload the site files to the server.
168
-
169
- Go to the root of the source project, and build your site as follows:
170
-
171
- ```console
172
- $ JEKYLL_ENV=production bundle exec jekyll b
173
- ```
174
-
175
- Or build the site on Docker:
176
-
177
- ```console
178
- $ docker run -it --rm \
179
- --env JEKYLL_ENV=production \
180
- --volume="$PWD:/srv/jekyll" \
181
- jekyll/jekyll \
182
- jekyll build
183
- ```
184
-
185
- 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 the target server.
186
-
187
- ### Upgrading
188
-
189
- It depends on how you use the theme:
190
-
191
- - If you are using the theme gem (there will be `gem "jekyll-theme-chirpy"` in the `Gemfile`), editing the `Gemfile` and update the version number of the theme gem, for example:
192
-
193
- ```diff
194
- - gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
195
- + gem "jekyll-theme-chirpy", "~> 3.3", ">= 3.3.0"
196
- ```
197
-
198
- And then execute the following command:
199
-
200
- ```console
201
- $ bundle update jekyll-theme-chirpy
202
- ```
203
-
204
- As the version upgrades, the critical files (for details, see the [Startup Template][starter]) and configuration options will change. Please refer to the [Upgrade Guide](https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Upgrade-Guide) to keep your repo's files in sync with the latest version of the theme.
205
-
206
- - If you forked from the source project (there will be `gemspec` in the `Gemfile` of your site), then merge the [latest upstream tags][latest-tag] into your Jekyll site to complete the upgrade.
207
- The merge is likely to conflict with your local modifications. Please be patient and careful to resolve these conflicts.
208
-
209
74
  ## Documentation
210
75
 
211
- For more details and a better reading experience, please check out the [tutorials on the demo site](https://cotes2020.github.io/chirpy-demo/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Please note that the tutorials on the demo website or Wiki are based on the latest release, and the features of `master` branch are usually ahead of the documentation.
76
+ For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/). At the same time, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Please note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases), and the features of the default branch are usually ahead of the documentation.
212
77
 
213
78
  ## Contributing
214
79
 
215
- The old saying, "Two heads are better than one." Consequently, welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
80
+ Welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
216
81
 
217
82
  ## Credits
218
83
 
@@ -234,13 +99,6 @@ If you like this theme or find it helpful, please consider sponsoring me, becaus
234
99
 
235
100
  This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
236
101
 
237
- [starter]: https://github.com/cotes2020/chirpy-starter
238
- [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
239
- [workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
240
- [chirpy-4.1.0]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v4.1.0
241
- [pages-src]: https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
242
- [latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags
243
-
244
102
  <!-- ReadMe links -->
245
103
 
246
104
  [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
@@ -56,9 +56,10 @@
56
56
  {% assign _height = nil %}
57
57
  {% assign _src = nil %}
58
58
 
59
- {% assign _left = _img_snippet | split: '/>' | first %}
60
- {% assign _right = _img_snippet | replace: _left, '' %}
59
+ {% assign _left = _img_snippet | split: '>' | first %}
60
+ {% assign _right = _img_snippet | remove: _left %}
61
61
 
62
+ {% assign _left = _left | remove: ' /' %}
62
63
  {% assign _left = _left | replace: ' w=', ' width=' | replace: ' h=', ' height=' %}
63
64
  {% assign _attrs = _left | split: ' ' %}
64
65
 
@@ -207,7 +208,9 @@
207
208
  {% capture anchor %}<a href="#{{ id }}" class="anchor"><i class="fas fa-hashtag"></i></a>{% endcapture %}
208
209
 
209
210
  {% assign left = snippet | split: mark_end | first %}
210
- {% assign right = snippet | replace: left, '' %}
211
+ {% assign _start_index = left | size %}
212
+ {% assign _end_index = snippet | size | minus: 1 %}
213
+ {% assign right = snippet | slice: _start_index, _end_index %}
211
214
 
212
215
  {% assign _new_content = _new_content | append: mark_start
213
216
  | append: left | append: anchor | append: mark_end | append: right
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-02 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll