jekyll-theme-chirpy 4.2.1 → 4.3.0

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: db0a66adec4fcd4c99d1871419e67d5e49b943b2a33b0d884ef855e065db58b4
4
+ data.tar.gz: b83407b197de953f523e80fce9ba2821f5b78f42b6d5b57bcdaa610998e884e2
5
5
  SHA512:
6
- metadata.gz: ab09866050405aba805c2e7da16c0b4338b2d89fa04d2918b82c9be4fcf8447c28fe511f9a0046f4479f640a59ea8439124a703bdead1751e70c4c9510b27bea
7
- data.tar.gz: a804a0436785f0ade31f3382ff95f0bf3b8baff99fff278511d2aa84e90e57f2c80b8366f7b6f5081839991a1c6d1386dfe3a238b67f222663970e0e9b784305
6
+ metadata.gz: 986b351803405d63aba8a4263938292cef2f278f4077ce6a3e3ecc7837061685d254f769799537c62e9fa73db91f5c6d7c427453c7c16a294595ec44c859bef7
7
+ data.tar.gz: bfe44c5fa0e0c7a76e50ad82ce4fecd8b4f8ab9bd6cccd51f0c57c69d3329990ac15a4093c06dbb48f973de0dea202b81c07b86700d708c5891854dd9a6609d6
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,55 @@ 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.
68
56
 
69
- Add this line to your Jekyll site's `Gemfile`:
57
+ - **[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.
70
58
 
71
- ```ruby
72
- gem "jekyll-theme-chirpy"
73
- ```
59
+ #### Option 1. Using the Chirpy Starter
74
60
 
75
- And add this line to your Jekyll site's `_config.yml`:
61
+ Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
76
62
 
77
- ```yaml
78
- theme: jekyll-theme-chirpy
79
- ```
63
+ #### Option 2. Forking on GitHub
64
+
65
+ [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](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.
80
66
 
81
67
  And then execute:
82
68
 
83
69
  ```console
84
- $ bundle
70
+ $ bash tools/init.sh
85
71
  ```
86
72
 
87
- Next, go to the installed local theme path:
73
+ > **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
74
 
89
- ```console
90
- $ cd "$(bundle info --path jekyll-theme-chirpy)"
91
- ```
75
+ The above command will:
92
76
 
93
- And then copy the critical files (for details, see [starter project][starter]) from the theme's gem to your Jekyll site.
77
+ 1. Removes some files or directories from your repository:
78
+ - `.travis.yml`
79
+ - files under `_posts`
80
+ - folder `docs`
94
81
 
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.
82
+ 2. If the option `--no-gh` is provided, 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`.
98
83
 
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!
84
+ 3. Removes item `Gemfile.lock` from `.gitignore`.
100
85
 
101
- ### Fork on GitHub
86
+ 4. Creates a new commit to save the changes automatically.
102
87
 
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.)
88
+ ### Installing Dependencies
104
89
 
105
- Install gem dependencies by:
90
+ Before running for the first time, go the root directory of your site, and install dependencies as follows:
106
91
 
107
92
  ```console
108
93
  $ bundle
109
94
  ```
110
95
 
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
96
  ## Usage
131
97
 
132
98
  ### Configuration
@@ -142,7 +108,7 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
142
108
 
143
109
  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.
144
110
 
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.
111
+ 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
112
 
147
113
  ### Running Local Server
148
114
 
@@ -154,14 +120,14 @@ $ bundle exec jekyll s
154
120
 
155
121
  Or run the site on Docker with the following command:
156
122
 
157
- ```terminal
123
+ ```console
158
124
  $ docker run -it --rm \
159
125
  --volume="$PWD:/srv/jekyll" \
160
126
  -p 4000:4000 jekyll/jekyll \
161
127
  jekyll serve
162
128
  ```
163
129
 
164
- Open a browser and visit to _<http://localhost:4000>_.
130
+ After a while, the local service will be published at _<http://127.0.0.1:4000>_.
165
131
 
166
132
  ### Deployment
167
133
 
@@ -169,40 +135,47 @@ Before the deployment begins, checkout the file `_config.yml` and make sure the
169
135
 
170
136
  Now you can choose ONE of the following methods to deploy your Jekyll site.
171
137
 
172
- #### Deploy on GitHub Pages
138
+ #### Deploy by Using Github Actions
173
139
 
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.
140
+ 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
141
 
176
142
  Quickly check the files needed for GitHub Actions build:
177
143
 
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.
144
+ - 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.
145
+
146
+ - Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
180
147
 
181
- And then rename your repository to `<GH-USERNAME>.github.io` on GitHub.
148
+ - 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 lockfile:
149
+
150
+ ```console
151
+ $ bundle lock --add-platform x86_64-linux
152
+ ```
153
+
154
+ After the above steps, rename your repository to `<GH_USERNAME>.github.io` on GitHub.
182
155
 
183
156
  Now publish your Jekyll site by:
184
157
 
185
158
  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
159
 
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_:
160
+ 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
161
 
189
- ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190809/gh-pages-sources.png)
162
+ ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/posts/20190809/gh-pages-sources.png)
190
163
 
191
164
  3. Visit your website at the address indicated by GitHub.
192
165
 
193
- #### Deploy on Other Platforms
166
+ #### Manually Build and Deploy
194
167
 
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.
168
+ 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
169
 
197
- Go to the root of the source project, build your site by:
170
+ Go to the root of the source project, and build your site as follows:
198
171
 
199
172
  ```console
200
173
  $ JEKYLL_ENV=production bundle exec jekyll b
201
174
  ```
202
175
 
203
- Or build the site with Docker by:
176
+ Or build the site on Docker:
204
177
 
205
- ```terminal
178
+ ```console
206
179
  $ docker run -it --rm \
207
180
  --env JEKYLL_ENV=production \
208
181
  --volume="$PWD:/srv/jekyll" \
@@ -210,7 +183,28 @@ $ docker run -it --rm \
210
183
  jekyll build
211
184
  ```
212
185
 
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.
186
+ 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.
187
+
188
+ ### Upgrading
189
+
190
+ It depends on how you use the theme:
191
+
192
+ - 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 them gem, for example:
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
 
@@ -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: 'https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5'
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: '/commons/avatar.jpg'
86
86
 
87
87
  # boolean type, the global switch for ToC in posts.
88
88
  toc: true
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
 
@@ -49,7 +49,7 @@
49
49
 
50
50
  </ul> <!-- ul.nav.flex-column -->
51
51
 
52
- <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center">
52
+ <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
53
53
 
54
54
  {% for entry in site.data.contact %}
55
55
  {% capture url %}