jekyll-theme-chirpy 4.2.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +91 -94
- data/_config.yml +5 -5
- data/_data/contact.yml +1 -1
- data/_includes/disqus.html +1 -1
- data/_includes/language-alias.html +72 -0
- data/_includes/refactor-content.html +12 -5
- data/_includes/search-loader.html +1 -1
- data/_includes/sidebar.html +13 -11
- data/_sass/addon/commons.scss +89 -65
- data/_sass/addon/module.scss +10 -10
- data/_sass/addon/syntax.scss +47 -23
- data/_sass/addon/variables.scss +2 -2
- data/_sass/colors/dark-syntax.scss +2 -1
- data/_sass/colors/dark-typography.scss +7 -5
- data/_sass/colors/light-syntax.scss +2 -1
- data/_sass/colors/light-typography.scss +14 -10
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/categories.scss +14 -13
- data/_sass/layout/home.scss +1 -3
- data/_sass/layout/post.scss +17 -4
- data/_tabs/about.md +1 -1
- data/_tabs/tags.md +1 -1
- data/assets/js/data/search.json +1 -1
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +1 -1
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +1 -1
- metadata +4 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1099c53078c24be7318bda910c6145b2f6d8b528a12b529c794b49d1a94d9f
|
4
|
+
data.tar.gz: 4dff4a15d5f96df5d7736e7175e6897fdf0e6c39b86733e6cfde858bcaf28119
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1093b0488316602056ffeaefdbd222b1ce381a6b03f569038cdba06f0017bdd8b3175ae2525178c2db3b7075dc7ea8877609e30597ac196a523bc063c55a899e
|
7
|
+
data.tar.gz: 550c5650f892bc01014ee9b7887ff7599ef07c0b694a78047f362a369a31c94da5b101e68aa93d900ebff3639a2a0675b58e8a127ad488ef1aa989a0423bd2e0
|
data/README.md
CHANGED
@@ -1,38 +1,27 @@
|
|
1
1
|
<div align="right">
|
2
|
-
|
3
|
-
|
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
|
-
|
10
|
+
# Chirpy Jekyll Theme
|
28
11
|
|
29
|
-
[
|
12
|
+
[](https://rubygems.org/gems/jekyll-theme-chirpy)
|
13
|
+
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
|
14
|
+
[](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
|
+
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
16
|
+
[](https://996.icu)
|
30
17
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
18
|
+
A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
|
19
|
+
|
20
|
+
[**Live Demo →**](https://chirpy.cotes.info)
|
21
|
+
|
22
|
+
[](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
|
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
|
-
|
51
|
+
### Creating a New Site
|
63
52
|
|
64
|
-
|
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
|
-
|
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
|
-
|
58
|
+
#### Option 1. Using the Chirpy Starter
|
70
59
|
|
71
|
-
|
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
|
-
|
62
|
+
#### Option 2. Forking on GitHub
|
76
63
|
|
77
|
-
|
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
|
-
$
|
69
|
+
$ bash tools/init.sh
|
85
70
|
```
|
86
71
|
|
87
|
-
|
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
|
-
|
90
|
-
$ cd "$(bundle info --path jekyll-theme-chirpy)"
|
91
|
-
```
|
74
|
+
The above command will:
|
92
75
|
|
93
|
-
|
76
|
+
1. Removes some files or directories from your repository:
|
77
|
+
- `.travis.yml`
|
78
|
+
- files under `_posts`
|
79
|
+
- folder `docs`
|
94
80
|
|
95
|
-
|
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
|
-
|
83
|
+
3. Removes item `Gemfile.lock` from `.gitignore`.
|
100
84
|
|
101
|
-
|
85
|
+
4. Creates a new commit to save the changes automatically.
|
102
86
|
|
103
|
-
|
87
|
+
### Installing Dependencies
|
104
88
|
|
105
|
-
|
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
|
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
|
-
```
|
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
|
-
|
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,
|
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
|
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
|
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 [
|
179
|
-
|
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
|
-
|
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
|
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
|
-

|
161
|
+

|
190
162
|
|
191
163
|
3. Visit your website at the address indicated by GitHub.
|
192
164
|
|
193
|
-
####
|
165
|
+
#### Manually Build and Deploy
|
194
166
|
|
195
|
-
On
|
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
|
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
|
175
|
+
Or build the site on Docker:
|
204
176
|
|
205
|
-
```
|
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
|
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
|
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
|
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
|
-
#
|
7
|
-
#
|
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:
|
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
|
-
-
|
162
|
+
- package.json
|
163
163
|
|
164
164
|
jekyll-archives:
|
165
165
|
enabled: [categories, tags]
|
data/_data/contact.yml
CHANGED
data/_includes/disqus.html
CHANGED
@@ -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
|
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"
|
128
|
-
| append:
|
129
|
-
| append: '
|
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-
|
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="{
|
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}
|
data/_includes/sidebar.html
CHANGED
@@ -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
|
-
{%
|
10
|
-
{
|
11
|
-
{
|
12
|
-
|
13
|
-
{
|
14
|
-
|
15
|
-
{
|
16
|
-
|
17
|
-
|
18
|
-
|
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 %}
|