jekyll-theme-chirpy 4.2.1 → 4.3.3

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: 6057cfe60ef36b6391d6f4d093ecadf402f90c507f643500bfb1a7145a3e981d
4
- data.tar.gz: d31319738e5cb098188e39a98d46de969c465594cc404a4d44bd045ceaf4fb8e
3
+ metadata.gz: ee1099c53078c24be7318bda910c6145b2f6d8b528a12b529c794b49d1a94d9f
4
+ data.tar.gz: 4dff4a15d5f96df5d7736e7175e6897fdf0e6c39b86733e6cfde858bcaf28119
5
5
  SHA512:
6
- metadata.gz: ab09866050405aba805c2e7da16c0b4338b2d89fa04d2918b82c9be4fcf8447c28fe511f9a0046f4479f640a59ea8439124a703bdead1751e70c4c9510b27bea
7
- data.tar.gz: a804a0436785f0ade31f3382ff95f0bf3b8baff99fff278511d2aa84e90e57f2c80b8366f7b6f5081839991a1c6d1386dfe3a238b67f222663970e0e9b784305
6
+ metadata.gz: 1093b0488316602056ffeaefdbd222b1ce381a6b03f569038cdba06f0017bdd8b3175ae2525178c2db3b7075dc7ea8877609e30597ac196a523bc063c55a899e
7
+ data.tar.gz: 550c5650f892bc01014ee9b7887ff7599ef07c0b694a78047f362a369a31c94da5b101e68aa93d900ebff3639a2a0675b58e8a127ad488ef1aa989a0423bd2e0
data/README.md CHANGED
@@ -1,38 +1,27 @@
1
1
  <div align="right">
2
- <a href="https://github.com/cotes2020/jekyll-theme-chirpy#readme">EN</a> |
3
- <a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md">中文 (简体)</a>
2
+
3
+ EN /
4
+ [中文(简体)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
5
+
4
6
  </div>
5
7
 
6
8
  <div align="center">
7
- <h1>Chirpy Jekyll Theme</h1>
8
- <p>
9
- <a href="https://rubygems.org/gems/jekyll-theme-chirpy">
10
- <img alt="Gem Version" src="https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen"></img>
11
- </a>
12
- <a href="https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush">
13
- <img alt="Build Status" src="https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push"></img>
14
- </a>
15
- <a href="https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard">
16
- <img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b"></img>
17
- </a>
18
- <a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE">
19
- <img alt="GitHub license" src="https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg"></img>
20
- </a>
21
- <a href="https://996.icu">
22
- <img alt="996.icu" src="https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg"></img>
23
- </a>
24
- </p>
25
- </div>
26
9
 
27
- A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you easily record and share your knowledge.
10
+ # Chirpy Jekyll Theme
28
11
 
29
- [Live Demo »](https://chirpy.cotes.info)
12
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
13
+ [![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
14
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b)](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
15
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
16
+ [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
30
17
 
31
- <p align="center">
32
- <a href="https://chirpy.cotes.info">
33
- <img alt="Devices Mockup" src="https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png"></img>
34
- </a>
35
- </p>
18
+ A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
19
+
20
+ [**Live Demo →**](https://chirpy.cotes.info)
21
+
22
+ [![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/commons/devices-mockup.png)](https://chirpy.cotes.info)
23
+
24
+ </div>
36
25
 
37
26
  ## Features
38
27
 
@@ -55,78 +44,54 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
55
44
 
56
45
  ## Prerequisites
57
46
 
58
- Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`. Please note that the version of `Ruby` must meet the requirements of the theme on [RubyGems.org](https://rubygems.org/gems/jekyll-theme-chirpy).
47
+ Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
59
48
 
60
49
  ## Installation
61
50
 
62
- There are two ways to get the theme:
51
+ ### Creating a New Site
63
52
 
64
- - **[Install from RubyGems](#install-from-rubygems)** - Easy to update, isolate irrelevant project files so you can focus on writing.
65
- - **[Fork on GitHub](#fork-on-github)** - Convenient for custom development, but difficult to update, only suitable for web developers.
53
+ There are two ways to create a new repository for this theme:
66
54
 
67
- ### Install from RubyGems
55
+ - [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
56
+ - [**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.
68
57
 
69
- Add this line to your Jekyll site's `Gemfile`:
58
+ #### Option 1. Using the Chirpy Starter
70
59
 
71
- ```ruby
72
- gem "jekyll-theme-chirpy"
73
- ```
60
+ Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
74
61
 
75
- And add this line to your Jekyll site's `_config.yml`:
62
+ #### Option 2. Forking on GitHub
76
63
 
77
- ```yaml
78
- theme: jekyll-theme-chirpy
79
- ```
64
+ [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.
80
65
 
81
66
  And then execute:
82
67
 
83
68
  ```console
84
- $ bundle
69
+ $ bash tools/init.sh
85
70
  ```
86
71
 
87
- Next, go to the installed local theme path:
72
+ > **Note**: If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command.
88
73
 
89
- ```console
90
- $ cd "$(bundle info --path jekyll-theme-chirpy)"
91
- ```
74
+ The above command will:
92
75
 
93
- And then copy the critical files (for details, see [starter project][starter]) from the theme's gem to your Jekyll site.
76
+ 1. Removes some files or directories from your repository:
77
+ - `.travis.yml`
78
+ - files under `_posts`
79
+ - folder `docs`
94
80
 
95
- > ⚠️ **Watch out for duplicate files!**
96
- >
97
- > If your Jekyll site is created by the `jekyll new` command, there will be `index.markdown` and `about.markdown` in the root directory of your site. Please be sure to remove them, otherwise they will overwrite the `index.html` and `_tabs/about.html` from this project, resulting in blank or messy pages.
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`.
98
82
 
99
- As an alternative, which we recommend, you can create a Jekyll site [**using the starter template**][use-starter] to save time copying files from the theme's gem. We've prepared everything you need there!
83
+ 3. Removes item `Gemfile.lock` from `.gitignore`.
100
84
 
101
- ### Fork on GitHub
85
+ 4. Creates a new commit to save the changes automatically.
102
86
 
103
- [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and then clone your fork to local. (Please note that the default branch code is in development. If you want the blog to be stable, please switch to the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.)
87
+ ### Installing Dependencies
104
88
 
105
- Install gem dependencies by:
89
+ Before running for the first time, go to the root directory of your site, and install dependencies as follows:
106
90
 
107
91
  ```console
108
92
  $ bundle
109
93
  ```
110
94
 
111
- And then execute:
112
-
113
- ```console
114
- $ bash tools/init.sh
115
- ```
116
-
117
- > **Note**: If you don't plan to deploy your site on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
118
-
119
- What it does is:
120
-
121
- 1. Remove some files or directories from your repository:
122
- - `.travis.yml`
123
- - files under `_posts`
124
- - folder `docs`
125
-
126
- 2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup 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`.
127
-
128
- 3. Automatically create a commit to save the changes.
129
-
130
95
  ## Usage
131
96
 
132
97
  ### Configuration
@@ -140,9 +105,9 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
140
105
 
141
106
  ### Customing Stylesheet
142
107
 
143
- If you need to customize 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.
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.
144
109
 
145
- Starting from `v4.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.
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.
146
111
 
147
112
  ### Running Local Server
148
113
 
@@ -154,55 +119,62 @@ $ bundle exec jekyll s
154
119
 
155
120
  Or run the site on Docker with the following command:
156
121
 
157
- ```terminal
122
+ ```console
158
123
  $ docker run -it --rm \
159
124
  --volume="$PWD:/srv/jekyll" \
160
125
  -p 4000:4000 jekyll/jekyll \
161
126
  jekyll serve
162
127
  ```
163
128
 
164
- Open a browser and visit to _<http://localhost:4000>_.
129
+ After a while, the local service will be published at _<http://127.0.0.1:4000>_.
165
130
 
166
131
  ### Deployment
167
132
 
168
- 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`.
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`.
169
134
 
170
135
  Now you can choose ONE of the following methods to deploy your Jekyll site.
171
136
 
172
- #### Deploy on GitHub Pages
137
+ #### Deploy by Using Github Actions
173
138
 
174
- 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.
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.
175
140
 
176
141
  Quickly check the files needed for GitHub Actions build:
177
142
 
178
- - 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.
179
- - Ensure your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
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:
180
148
 
181
- And then rename your repository to `<GH-USERNAME>.github.io` on GitHub.
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.
182
154
 
183
155
  Now publish your Jekyll site by:
184
156
 
185
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.
186
158
 
187
- 2. Browse to your repo's landing page on GitHub and select the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) through _Settings_ _Options_ _GitHub Pages_:
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.
188
160
 
189
- ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190809/gh-pages-sources.png)
161
+ ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/posts/20190809/gh-pages-sources.png)
190
162
 
191
163
  3. Visit your website at the address indicated by GitHub.
192
164
 
193
- #### Deploy on Other Platforms
165
+ #### Manually Build and Deploy
194
166
 
195
- On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Actions**. Therefore, we should build the site locally (or on some other 3rd-party CI platform) and then put the site files on the server.
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.
196
168
 
197
- Go to the root of the source project, build your site by:
169
+ Go to the root of the source project, and build your site as follows:
198
170
 
199
171
  ```console
200
172
  $ JEKYLL_ENV=production bundle exec jekyll b
201
173
  ```
202
174
 
203
- Or build the site with Docker by:
175
+ Or build the site on Docker:
204
176
 
205
- ```terminal
177
+ ```console
206
178
  $ docker run -it --rm \
207
179
  --env JEKYLL_ENV=production \
208
180
  --volume="$PWD:/srv/jekyll" \
@@ -210,11 +182,33 @@ $ docker run -it --rm \
210
182
  jekyll build
211
183
  ```
212
184
 
213
- 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.
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.
214
208
 
215
209
  ## Documentation
216
210
 
217
- For more details and a better reading experience, please check out the [tutorials on the 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). Please note that the tutorials on the demo website or Wiki are based on the latest release, and the features of `master` branch usually ahead of the documentation.
211
+ For more details and a better reading experience, please check out the [tutorials on the 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). 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.
218
212
 
219
213
  ## Contributing
220
214
 
@@ -222,9 +216,9 @@ The old saying, "Two heads are better than one." Consequently, welcome to report
222
216
 
223
217
  ## Credits
224
218
 
225
- This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Bootstrap](https://getbootstrap.com/), [Font Awesome](https://fontawesome.com/) and some other wonderful tools (their copyright information can be found in the relevant files). The avatar and favicon design comes from [Clipart Max](https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/).
219
+ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Bootstrap](https://getbootstrap.com/), [Font Awesome](https://fontawesome.com/) and some other wonderful tools (their copyright information can be found in the relevant files). The avatar and favicon design come from [Clipart Max](https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/).
226
220
 
227
- :tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas, or inspired me to write more readable documentation.
221
+ :tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation.
228
222
 
229
223
  Last but not least, thank [JetBrains][jb] for providing the open source license.
230
224
 
@@ -243,6 +237,9 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
243
237
  [starter]: https://github.com/cotes2020/chirpy-starter
244
238
  [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
245
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
246
243
 
247
244
  <!-- ReadMe links -->
248
245
 
data/_config.yml CHANGED
@@ -3,8 +3,8 @@
3
3
  # Import the theme
4
4
  theme: jekyll-theme-chirpy
5
5
 
6
- # Only if your site type is GitHub Project sites and doesn't have a custom domain,
7
- # change below value to '/projectname'.
6
+ # Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
7
+ # and doesn't have a custom domain.
8
8
  baseurl: ''
9
9
 
10
10
  # The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
@@ -79,10 +79,10 @@ theme_mode: # [light|dark]
79
79
  # will be added to all image (site avatar & posts' images) paths starting with '/'
80
80
  #
81
81
  # e.g. 'https://cdn.com'
82
- img_cdn: ''
82
+ img_cdn:
83
83
 
84
84
  # the avatar on sidebar, support local or CORS resources
85
- avatar: https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/avatar.jpg
85
+ avatar:
86
86
 
87
87
  # boolean type, the global switch for ToC in posts.
88
88
  toc: true
@@ -159,7 +159,7 @@ exclude:
159
159
  - LICENSE
160
160
  - gulpfile.js
161
161
  - node_modules
162
- - '*.json'
162
+ - package.json
163
163
 
164
164
  jekyll-archives:
165
165
  enabled: [categories, tags]
data/_data/contact.yml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  -
4
4
  type: github
5
- icon: 'fab fa-github-alt'
5
+ icon: 'fab fa-github'
6
6
  -
7
7
  type: twitter
8
8
  icon: 'fab fa-twitter'
@@ -3,7 +3,7 @@
3
3
  -->
4
4
 
5
5
  <div id="disqus_thread" class="pt-2 pb-2">
6
- <p class="text-center text-muted small mb-5">
6
+ <p class="text-center text-muted small">
7
7
  Comments powered by <a href="https://disqus.com/">Disqus</a>.
8
8
  </p>
9
9
  </div>
@@ -0,0 +1,72 @@
1
+ {% comment %}
2
+
3
+ Convert the alias of the syntax language to the official name
4
+
5
+ See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
6
+
7
+ {% endcomment %}
8
+
9
+ {% assign _lang = include.language | default: '' %}
10
+
11
+ {% case _lang %}
12
+ {% when 'actionscript', 'as', 'as3' %}
13
+ {{ 'ActionScript' }}
14
+ {% when 'applescript' %}
15
+ {{ 'AppleScript' }}
16
+ {% when 'brightscript', 'bs', 'brs' %}
17
+ {{ 'BrightScript' }}
18
+ {% when 'cfscript', 'cfc' %}
19
+ {{ 'CFScript' }}
20
+ {% when 'coffeescript', 'coffee', 'coffee-script' %}
21
+ {{ 'CoffeeScript' }}
22
+ {% when 'cs', 'csharp' %}
23
+ {{ 'C#' }}
24
+ {% when 'erl' %}
25
+ {{ 'Erlang' }}
26
+ {% when 'graphql' %}
27
+ {{ 'GraphQL' }}
28
+ {% when 'haskell', 'hs' %}
29
+ {{ 'Haskell' }}
30
+ {% when 'javascript', 'js' %}
31
+ {{ 'JavaScript' }}
32
+ {% when 'make', 'mf', 'gnumake', 'bsdmake' %}
33
+ {{ 'Makefile' }}
34
+ {% when 'md', 'mkd' %}
35
+ {{ 'Markdown' }}
36
+ {% when 'm' %}
37
+ {{ 'Matlab' }}
38
+ {% when 'objective_c', 'objc', 'obj-c', 'obj_c', 'objectivec' %}
39
+ {{ 'Objective-C' }}
40
+ {% when 'perl', 'pl' %}
41
+ {{ 'Perl' }}
42
+ {% when 'php','php3','php4','php5' %}
43
+ {{ 'PHP' }}
44
+ {% when 'plaintext', 'text' %}
45
+ {{ 'Text' }}
46
+ {% when 'py' %}
47
+ {{ 'Python' }}
48
+ {% when 'rb' %}
49
+ {{ 'Ruby' }}
50
+ {% when 'rs','no_run','ignore','should_panic' %}
51
+ {{ 'Rust' }}
52
+ {% when 'bash', 'zsh', 'ksh', 'sh' %}
53
+ {{ 'Shell' }}
54
+ {% when 'st', 'squeak' %}
55
+ {{ 'Smalltalk' }}
56
+ {% when 'tex'%}
57
+ {{ 'TeX' }}
58
+ {% when 'latex' %}
59
+ {{ 'LaTex' }}
60
+ {% when 'ts', 'typescript' %}
61
+ {{ 'TypeScript' }}
62
+ {% when 'vb', 'visualbasic' %}
63
+ {{ 'Visual Basic' }}
64
+ {% when 'vue', 'vuejs' %}
65
+ {{ 'Vue.js' }}
66
+ {% when 'yml' %}
67
+ {{ 'YAML' }}
68
+ {% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml' %}
69
+ {{ _lang | upcase }}
70
+ {% else %}
71
+ {{ _lang | capitalize }}
72
+ {% endcase %}
@@ -119,16 +119,23 @@
119
119
 
120
120
  {% if _left contains 'file="' %}
121
121
  {% assign _text = _left | split: 'file="' | last | split: '"' | first %}
122
+ {% assign _label_icon = 'far fa-file-code' %}
122
123
  {% else %}
123
- {% assign _text = _left | split: 'language-' | last | split: ' ' | first %}
124
+ {% assign _lang = _left | split: 'language-' | last | split: ' ' | first %}
125
+ {% capture _text %}{% include language-alias.html language=_lang %}{% endcapture %}
126
+ {% assign _label_icon = 'fas fa-code small' %}
124
127
  {% endif %}
125
128
 
129
+ {% capture _label %}
130
+ <span text-data="{{ _text }}"><i class="fa-fw {{ _label_icon }}"></i></span>
131
+ {% endcapture %}
132
+
126
133
  {% assign _new_content = _new_content | append: _snippet
127
- | append: '<div class="code-header" text-data="'
128
- | append: _text
129
- | append: '"><button data-original-title="'
134
+ | append: '<div class="code-header">'
135
+ | append: _label
136
+ | append: '<button aria-label="copy" title-succeed="'
130
137
  | append: site.data.locales[lang].post.button.copy_code.succeed
131
- | append: '"><i class="far fa-clone"></i></button></div>'
138
+ | append: '"><i class="far fa-clipboard"></i></button></div>'
132
139
  | append: '<div class="highlight"><code>'
133
140
  %}
134
141
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  {% capture result_elem %}
7
7
  <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
8
- <a href="{{ site.url }}{url}">{title}</a>
8
+ <a href="{url}">{title}</a>
9
9
  <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
10
10
  {categories}
11
11
  {tags}
@@ -6,16 +6,18 @@
6
6
  <div class="profile-wrapper text-center">
7
7
  <div id="avatar">
8
8
  <a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
9
- {% capture avatar_url %}
10
- {%- if site.avatar contains '://' -%}
11
- {{ site.avatar }}
12
- {%- elsif site.img_cdn != '' and site.img_cdn -%}
13
- {{ site.avatar | prepend: site.img_cdn }}
14
- {%- else -%}
15
- {{ site.avatar | relative_url }}
16
- {%- endif -%}
17
- {% endcapture %}
18
- <img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
9
+ {% if site.avatar != '' and site.avatar %}
10
+ {% capture avatar_url %}
11
+ {%- if site.avatar contains '://' -%}
12
+ {{ site.avatar }}
13
+ {%- elsif site.img_cdn != '' and site.img_cdn -%}
14
+ {{ site.avatar | prepend: site.img_cdn }}
15
+ {%- else -%}
16
+ {{ site.avatar | relative_url }}
17
+ {%- endif -%}
18
+ {% endcapture %}
19
+ <img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
20
+ {% endif %}
19
21
  </a>
20
22
  </div>
21
23
 
@@ -49,7 +51,7 @@
49
51
 
50
52
  </ul> <!-- ul.nav.flex-column -->
51
53
 
52
- <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center">
54
+ <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
53
55
 
54
56
  {% for entry in site.data.contact %}
55
57
  {% capture url %}