1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-08 00:27:58 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Cotes Chung
3c186dc32e Merge branch 'hotfix/4.3.4' 2021-11-29 21:06:24 +08:00
Cotes Chung
0126ab6d0b Prevent multiple reserse-footnote from overlapping (fix #439) 2021-11-29 20:03:12 +08:00
Cotes Chung
ca8e85a7ec Merge branch 'feature/code-style' into develop 2021-11-29 20:03:12 +08:00
Cotes Chung
a9b159299b Merge branch 'hotfix/4.3.3' 2021-10-20 06:29:16 +08:00
Cotes Chung
29ba2666ce Merge branch 'hotfix/4.3.2' 2021-10-15 00:56:42 +08:00
Cotes Chung
5ef1478148 Correct grammar and spelling in docs & issue templates
Also improve the Markdown code style
2021-10-12 03:27:28 +08:00
Cotes Chung
8877393fba Merge branch 'hotfix/4.3.1' 2021-10-01 18:49:21 +08:00
40 changed files with 268 additions and 194 deletions

View File

@ -1,6 +1,6 @@
# How to Contribute
I want to thank you for sparing a time to improve this project! Here are some guidelines for contributing
I want to thank you for sparing time to improve this project! Here are some guidelines for contributing
To ensure that the blog design is not confused, this project does not accept suggestions for design changes, such as color scheme, fonts, typography, etc. If your request is about an enhancement, it is recommended to first submit a [`Feature Request`](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md) issue to discuss whether your idea fits the project.
@ -13,4 +13,4 @@ Generally, contribute to the project by:
---
:tada: Your volunteering will make the open source world more beautiful, thanks again! :tada:
:tada: Your volunteering will make the open-source world more beautiful, thanks again! :tada:

View File

@ -6,10 +6,10 @@ about: Create a report to help us improve
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
## Checklist
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
- [ ] I have read the [tutorials](https://chirpy.cotes.info/categories/tutorial/) and know the correct effect of the functional design.
- [ ] There are no similar reports on existing issues (including closed ones).
- [ ] I found the bug on the latest code of `master` branch.
- [ ] I found the bug on the latest code of the `master` branch.
## Describe the bug
<!-- A clear and concise description of what the bug is. -->

View File

@ -7,9 +7,9 @@ labels: enhancement
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
## Checklist
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
- [ ] I have read the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
- [ ] There are no similar request on existing issues (including closed ones).
- [ ] There is no similar request on existing issues (including closed ones).
- [ ] I have read the [project progress](https://github.com/cotes2020/jekyll-theme-chirpy/projects) and know the current progress of the project.
- [ ] I was in the `master` branch of the latest code.

View File

@ -8,12 +8,12 @@ labels: question
## Checklist
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
- [ ] I have read the [tutorials](https://chirpy.cotes.info/categories/tutorial/) and know the correct effect of the functional design.
- [ ] There are no similar question on existing issues (including closed ones).
- [ ] I searched the Internet for related problems, but still couldn't solve it.
- [ ] My question is based on the latest code of `master` branch.
- [ ] There is no similar question on existing issues (including closed ones).
- [ ] I searched the Internet for related problems, but still couldn't solve them.
- [ ] My question is based on the latest code of the `master` branch.
## Description
<!-- Please describe your question in detail. -->

View File

@ -37,7 +37,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
<!-- Select checkboxes by change the "[ ]" to "[x]" -->
- [ ] My code follows the [Google style guidelines](https://google.github.io/styleguide/)
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works

View File

@ -3,7 +3,9 @@ dist: bionic
language: minimal
if: tag =~ /^v(\d)+(\.(\d)+){2}$/
branches:
only:
- /^release\/(\d)+(\.(\d)+){1}$/
jobs:
include:

View File

@ -1,7 +1,6 @@
<div align="right">
EN /
[中文(简体)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
EN / [中文](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
</div>
@ -9,15 +8,15 @@
# Chirpy Jekyll Theme
A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
[![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)
[![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)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cotes2020/jekyll-theme-chirpy&amp;utm_campaign=Badge_Grade)
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
**[Live Demo →](https://chirpy.cotes.info)**
[**Live Demo →**](https://chirpy.cotes.info)
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/commons/devices-mockup.png)](https://chirpy.cotes.info)
@ -44,7 +43,7 @@
## Prerequisites
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
## Installation
@ -52,9 +51,8 @@ Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installat
There are two ways to create a new repository for this theme:
- **[Using the Chirpy Starter](#option-1-using-the-chirpy-starter)** - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
- **[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.
- [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
- [**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.
#### Option 1. Using the Chirpy Starter
@ -62,7 +60,7 @@ Create a new repository from the [**Chirpy Starter**][use-starter] and name it `
#### Option 2. Forking on GitHub
[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.
[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.
And then execute:
@ -75,11 +73,12 @@ $ bash tools/init.sh
The above command will:
1. Removes some files or directories from your repository:
- `.travis.yml`
- files under `_posts`
- folder `docs`
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`.
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`.
3. Removes item `Gemfile.lock` from `.gitignore`.
@ -87,7 +86,7 @@ The above command will:
### Installing Dependencies
Before running for the first time, go the root directory of your site, and install dependencies as follows:
Before running for the first time, go to the root directory of your site, and install dependencies as follows:
```console
$ bundle
@ -106,7 +105,7 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
### Customing Stylesheet
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.
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.
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.
@ -131,7 +130,7 @@ After a while, the local service will be published at _<http://127.0.0.1:4000>_.
### Deployment
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base URL on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
Before the deployment begins, 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`.
Now you can choose ONE of the following methods to deploy your Jekyll site.
@ -145,7 +144,7 @@ Quickly check the files needed for GitHub Actions build:
- Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
- 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:
- 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:
```console
$ bundle lock --add-platform x86_64-linux
@ -189,7 +188,8 @@ Unless you specified the output path, the generated site files will be placed in
It depends on how you use the theme:
- 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:
- 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:
```diff
- gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
+ gem "jekyll-theme-chirpy", "~> 3.3", ">= 3.3.0"
@ -208,7 +208,7 @@ The merge is likely to conflict with your local modifications. Please be patient
## Documentation
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.
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.
## Contributing
@ -216,9 +216,9 @@ The old saying, "Two heads are better than one." Consequently, welcome to report
## Credits
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/).
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/).
: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.
: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.
Last but not least, thank [JetBrains][jb] for providing the open source license.

View File

@ -159,7 +159,7 @@ exclude:
- LICENSE
- gulpfile.js
- node_modules
- '*.json'
- package*.json
jekyll-archives:
enabled: [categories, tags]

View File

@ -41,8 +41,6 @@
{{ 'Perl' }}
{% when 'php','php3','php4','php5' %}
{{ 'PHP' }}
{% when 'plaintext', 'text' %}
{{ 'Text' }}
{% when 'py' %}
{{ 'Python' }}
{% when 'rb' %}
@ -65,7 +63,7 @@
{{ 'Vue.js' }}
{% when 'yml' %}
{{ 'YAML' }}
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml' %}
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %}
{{ _lang | upcase }}
{% else %}
{{ _lang | capitalize }}

View File

@ -5,7 +5,7 @@
{% capture result_elem %}
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
<a href="{{ site.url }}{url}">{title}</a>
<a href="{url}">{title}</a>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
{categories}
{tags}

View File

@ -6,6 +6,7 @@
<div class="profile-wrapper text-center">
<div id="avatar">
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
{% if site.avatar != '' and site.avatar %}
{% capture avatar_url %}
{%- if site.avatar contains '://' -%}
{{ site.avatar }}
@ -16,6 +17,7 @@
{%- endif -%}
{% endcapture %}
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
{% endif %}
</a>
</div>

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -20,8 +20,8 @@ $(function() {
const hash = decodeURI(this.hash);
let isFnRef = RegExp(/^#fnref:/).test(hash);
let isFn = RegExp(/^#fn:/).test(hash);
let selector = hash.includes(":") ? hash.replace(/\:/, "\\:") : hash;
let isFn = isFnRef? false : RegExp(/^#fn:/).test(hash);
let selector = hash.includes(":") ? hash.replace(/\:/g, "\\:") : hash;
let target = $(selector);
if (target.length) {

View File

@ -8,8 +8,8 @@ math: true
mermaid: true
image:
src: /commons/devices-mockup.png
width: 850
height: 585
width: 800
height: 500
---
This post is to show Markdown syntax rendering on [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork), you can also use it as an example of writing. Now, let's start looking at text and typography.
@ -72,7 +72,6 @@ Sun
Moon
: the natural satellite of the earth, visible by reflected light from the sun
## Block Quote
> This line to shows the Block Quote.
@ -89,12 +88,10 @@ Moon
<http://127.0.0.1:4000>
## Footnote
Click the hook will locate the footnote[^footnote], and here is another footnote[^fn-nth-2].
## Images
- Default (with caption)
@ -141,7 +138,6 @@ _shadow effect (visible in light mode)_
cherry :active, c, after b a, 1d
```
## Mathematics
The mathematics powered by [**MathJax**](https://www.mathjax.org/):
@ -152,12 +148,10 @@ When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
## Inline code
This is an example of `Inline Code`.
## Code block
### Common

View File

@ -24,15 +24,15 @@ tags: [TAG] # TAG names should always be lowercase
---
```
> **Note**: The posts' ***layout*** has been set to `post` by default, so there is no need to add the variable ***layout*** in Front Matter block.
> **Note**: The posts' ***layout*** has been set to `post` by default, so there is no need to add the variable ***layout*** in the Front Matter block.
### Timezone of date
In order to accurately record the release date of a post, you should not only setup the `timezone` of `_config.yml` but also provide the the post's timezone in field `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.
In order to accurately record the release date of a post, you should not only set up the `timezone` of `_config.yml` but also provide the post's timezone in variable `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.
### Categories and Tags
The `categories` of each post is designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity. For instance:
The `categories` of each post are designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity. For instance:
```yaml
categories: [Animal, Insect]
@ -41,7 +41,7 @@ tags: [bee]
## Table of Contents
By default, the **T**able **o**f **C**ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to `_config.yml` and set the value of variable `toc` to `false`. If you want to turn off TOC for specific post, add the following to post's [Front Matter](https://jekyllrb.com/docs/front-matter/):
By default, the **T**able **o**f **C**ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to `_config.yml` and set the value of variable `toc` to `false`. If you want to turn off TOC for a specific post, add the following to the post's [Front Matter](https://jekyllrb.com/docs/front-matter/):
```yaml
---
@ -51,7 +51,7 @@ toc: false
## Comments
Similar to TOC, the [Disqus](https://disqus.com/) comments is loaded by default in each post, and the global switch is defined by variable `comments` in file `_config.yml` . If you want to close the comment for specific post, add the following to the **Front Matter** of the post:
Similar to TOC, the [Disqus](https://disqus.com/) comments are loaded by default in each post, and the global switch is defined by variable `comments` in file `_config.yml` . If you want to close the comment for a specific post, add the following to the **Front Matter** of the post:
```yaml
---
@ -79,13 +79,13 @@ mermaid: true
---
```
Then you can use it like other markdown language: surround the graph code with ```` ```mermaid ```` and ```` ``` ````.
Then you can use it like other markdown languages: surround the graph code with ```` ```mermaid ```` and ```` ``` ````.
## Images
### Preview image
If you want to add an image to the top of the post contents, specify the attribute `src`, `width`, `height` and `alt` for the image:
If you want to add an image to the top of the post contents, specify the attribute `src`, `width`, `height`, and `alt` for the image:
```yaml
---
@ -121,7 +121,7 @@ In order to prevent the page content layout from shifting when the image is load
### Image position
By default, the image is centered, but you can specify the position by using one of class `normal` , `left` and `right`. For example:
By default, the image is centered, but you can specify the position by using one of the classes `normal`, `left`, and `right`. For example:
- **Normal position**
@ -159,14 +159,14 @@ The screenshots of the program window can be considered to show the shadow effec
### CDN URL
If you host the images on the CDN, you can save the time of repeatedly writing the CDN url by assigning the variable `img_cdn` of `_config.yml` file:
If you host the images on the CDN, you can save the time of repeatedly writing the CDN URL by assigning the variable `img_cdn` of `_config.yml` file:
```yaml
img_cdn: https://cdn.com
```
{: file='_config.yml' .nolineno}
Once `img_cdn` is assigned, the CDN url will be added to the path of all images (images of site avatar and posts) starting with `/`.
Once `img_cdn` is assigned, the CDN URL will be added to the path of all images (images of site avatar and posts) starting with `/`.
For instance, when using images:
@ -210,11 +210,11 @@ key: value
```
````
> **Limination**: The Jekyll style `highlight` tag ais not compatible with this theme.
> **Limitation**: The Jekyll style `highlight` tag is not compatible with this theme.
### Line Number
By default, all languages except `plaintext`, `console` and `terminal` will display line numbers. When you want to hide the line number of the code block, you can append `{: .nolineno}` at the next line:
By default, all languages except `plaintext`, `console`, and `terminal` will display line numbers. When you want to hide the line number of the code block, you can append `{: .nolineno}` at the next line:
````markdown
```shell
@ -253,4 +253,3 @@ Or adding `render_with_liquid: false` (Requires Jekyll 4.0 or higher) to the pos
## Learn More
For more knowledge about Jekyll posts, visit the [Jekyll Docs: Posts](https://jekyllrb.com/docs/posts/).

View File

@ -9,7 +9,7 @@ pin: true
## Prerequisites
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
## Installation
@ -17,9 +17,8 @@ Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installat
There are two ways to create a new repository for this theme:
- **[Using the Chirpy Starter](#option-1-using-the-chirpy-starter)** - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
- **[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.
- [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
- [**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.
#### Option 1. Using the Chirpy Starter
@ -44,7 +43,7 @@ The above command will:
- files under `_posts`
- folder `docs`
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`.
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`.
3. Removes item `Gemfile.lock` from `.gitignore`.
@ -52,7 +51,7 @@ The above command will:
### Installing Dependencies
Before running for the first time, go the root directory of your site, and install dependencies as follows:
Before running for the first time, go to the root directory of your site, and install dependencies as follows:
```console
$ bundle
@ -71,7 +70,7 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
### Customing Stylesheet
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.
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.
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.
@ -96,7 +95,7 @@ After a while, the local service will be published at _<http://127.0.0.1:4000>_.
### Deployment
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base URL on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash, e.g, `/project-name`.
Before the deployment begins, 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`.
Now you can choose ONE of the following methods to deploy your Jekyll site.
@ -110,7 +109,7 @@ Quickly check the files needed for GitHub Actions build:
- Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
- 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:
- 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:
```console
$ bundle lock --add-platform x86_64-linux
@ -154,7 +153,7 @@ Unless you specified the output path, the generated site files will be placed in
It depends on how you use the theme:
- 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:
- 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:
```diff
- gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"

View File

@ -6,11 +6,11 @@ categories: [Blogging, Tutorial]
tags: [favicon]
---
The [favicons](https://www.favicon-generator.org/about/) of [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) are placed in the directory `assets/img/favicons/`. You may want to replace them with your own. The following sections will guide you how to create and replace the default favicons.
The [favicons](https://www.favicon-generator.org/about/) of [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) are placed in the directory `assets/img/favicons/`. You may want to replace them with your own. The following sections will guide you to create and replace the default favicons.
## Generate the favicon
Prepare a square image (PNG, JPG, or SVG) with a size of 512x512 or more, and then go to the online tool [**Real Favicon Generator**](https://realfavicongenerator.net/) and click button <kbd>Select your Favicon image</kbd> to upload your image file.
Prepare a square image (PNG, JPG, or SVG) with a size of 512x512 or more, and then go to the online tool [**Real Favicon Generator**](https://realfavicongenerator.net/) and click the button <kbd>Select your Favicon image</kbd> to upload your image file.
In the next step, the webpage will show all usage scenarios. You can keep the default options, scroll to the bottom of the page, and click the button <kbd>Generate your Favicons and HTML code</kbd> to generate the favicon.
@ -23,7 +23,7 @@ Download the generated package, unzip and delete the following two from the extr
Now, copy the remaining image files (`PNG` and `ICO`) to cover the original files in the folder `assets/img/favicons/` of your Jekyll site. If your Jekyll site doesn't have this directory yet, just create one.
The following table will helps you understand the changes to the favicon files:
The following table will help you understand the changes to the favicon files:
| File(s) | From Online Tool | From Chirpy |
|---------------------|:---------------------------------:|:-----------:|

View File

@ -13,20 +13,20 @@ This post is to enable Page Views on the [**Chirpy**][chirpy-homepage] theme bas
### Create GA account and property
First, you need to setup your account on Google analytics. While your create your account, you must create your first **Property** as well.
First, you need to set up your account on Google analytics. While you create your account, you must create your first **Property** as well.
1. Head to <https://analytics.google.com/> and click on **Start Measuring**
2. Enter your desired _Account Name_ and choose the desired checkboxes
3. Enter your desired _Property Name_. This is the name of the tracker project that appears on your Google Analytics dashboard
4. Enter the required information _About your business_
5. Hit _Create_ and accept any license popup to setup your Google Analytics account and create your property
5. Hit _Create_ and accept any license popup to set up your Google Analytics account and create your property
### Create Data Stream
With your property created, you now need to set up Data Stream to track your blog traffic. After you signup, the prompt should automatically take you to creating your first **Data Stream**. If not, follow these steps:
With your property created, you now need to set up Data Stream to track your blog traffic. After you signup, the prompt should automatically take you to create your first **Data Stream**. If not, follow these steps:
1. Go to **Admin** on the left column
2. Select the desired property from the drop down on the second column
2. Select the desired property from the drop-down on the second column
3. Click on **Data Streams**
4. Add a stream and click on **Web**
5. Enter your blog's URL
@ -47,13 +47,13 @@ google_analytics:
```
{: file="_config.yml"}
When you push these changes to your blog, you should start seeing the traffic on your Google Analytics. Play around with Google Analytics dashboard to get familiar with the options available as it takes like 5 mins to pickup your changes. You should now be able to monitor your traffic in realtime.
When you push these changes to your blog, you should start seeing the traffic on your Google Analytics. Play around with the Google Analytics dashboard to get familiar with the options available as it takes like 5 mins to pick up your changes. You should now be able to monitor your traffic in real time.
![google-analytics-realtime](/posts/20210103/02-google-analytics-realtime.png){: width="616" height="557"}
## Setup Page Views
There is a detailed [tutorial](https://developers.google.com/analytics/solutions/google-analytics-super-proxy) available to set up Google Analytics superProxy. But, if you are interested to just quickly get your Chirpy-based blog display page views, follow along. These steps were tested on a Linux machine. If you are running Windows, you can use Git bash terminal to run Unix-like commands.
There is a detailed [tutorial](https://developers.google.com/analytics/solutions/google-analytics-super-proxy) available to set up Google Analytics superProxy. But, if you are interested to just quickly get your Chirpy-based blog display page views, follow along. These steps were tested on a Linux machine. If you are running Windows, you can use the Git bash terminal to run Unix-like commands.
### Setup Google App Engine
@ -67,7 +67,7 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
5. Select **Python** language and **Standard** environment
6. Enable billing account. Yeah, you have to link your credit card. But, you won't be billed unless you exceed your free quota. For a simple blog, free quota is more than sufficient.
6. Enable billing account. Yeah, you have to link your credit card. But, you won't be billed unless you exceed your free quota. For a simple blog, the free quota is more than sufficient.
7. Go to your App Engine dashboard on your browser and select **API & Services** from the left navigation menu
@ -77,7 +77,7 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
10. On the left, Click on _OAuth Consent Screen_ and accept **Configure Consent Screen**. Select **External** since your blog is probably hosted for the public. Click on **Publish** under _Publishing Status_
11. Click on **Credentials** on the left and create a new **OAuth Client IDs** credential. Make sure to add a entry under `Authorized redirect URIs` that matches: `https://<project-id>.<region>.r.appspot.com/admin/auth`
11. Click on **Credentials** on the left and create a new **OAuth Client IDs** credential. Make sure to add an entry under `Authorized redirect URIs` that matches: `https://<project-id>.<region>.r.appspot.com/admin/auth`
12. Note down the **Your Client ID** and **Your Client Secret**. You'll need this in the next section.
@ -114,12 +114,13 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
1. Clone the **Google Analytics superProxy** project on Github: <https://github.com/googleanalytics/google-analytics-super-proxy> to your local.
2. Remove the first 2 lines in the [`src/app.yaml`](https://github.com/googleanalytics/google-analytics-super-proxy/blob/master/src/app.yaml#L1-L2) file:
```diff
- application: your-project-id
- version: 1
- application: your-project-id
- version: 1
```
3. In `src/config.py`, add the `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` that you gathered from you App Engine Dashboard.
3. In `src/config.py`, add the `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` that you gathered from your App Engine Dashboard.
4. Enter any random key for `XSRF_KEY`, your `config.py` should look similar to this
@ -206,13 +207,12 @@ In order to reduce the returned results and reduce the network bandwidth, we add
If the `site.baseurl` is specified, change the first filtering rule to `ga:pagePath=~^/BASE_URL/posts/.*/$`, where `BASE_URL` is the value of `site.baseurl`.
After <kbd>Run Query</kbd>, copy the generated contents of **API Query URI** at the bottom of the page, and fill in the **Encoded URI for the query** of SuperProxy on GAE.
After <kbd>Run Query</kbd>, copy the generated contents of **API Query URI** at the bottom of the page and fill in the **Encoded URI for the query** of SuperProxy on GAE.
After the query is saved on GAE, a **Public Endpoint** (public access address) will be generated, and we will get the query result in JSON format when accessing it. Finally, click <kbd>Enable Endpoint</kbd> in **Public Request Endpoint** to make the query effective, and click <kbd>Start Scheduling</kbd> in **Scheduling** to start the scheduled task.
![superproxy-query](/posts/20210103/04-superproxy-query.png){: width="1100" height="126"}
## Configure Chirpy to Display Page View
Once all the hard part is done, it is very easy to enable the Page View on Chirpy theme. Your superProxy dashboard should look something like below and you can grab the required values.

View File

@ -6,12 +6,9 @@
@mixin mode-toggle($dark-mode: false) {
@if $dark-mode {
@include dark-scheme;
} @else {
@include light-scheme;
}
}
html:not([mode]),
@ -175,15 +172,18 @@ footer {
a {
color: var(--footer-link);
&:link {
@include no-text-decoration;
}
&:hover {
@extend %link-hover;
@include no-text-decoration;
}
}
.footer-right {
text-align: right;
}
@ -202,22 +202,28 @@ footer {
position: -webkit-sticky; /* Safari */
position: sticky;
}
&.topbar-down {
top: 6rem;
}
> div {
padding-left: 1rem;
border-left: 1px solid var(--main-border-color);
&:not(:last-child) {
margin-bottom: 4rem;
}
}
span {
@include panel-label;
}
.post-content {
font-size: 0.9rem;
}
}
#access-tags {
@ -234,6 +240,7 @@ footer {
border-radius: 0.8rem;
padding: 0.3rem 0.5rem;
margin: 0 0.35rem 0.5rem 0;
&:hover {
background-color: #2a408e;
border-color: #2a408e;
@ -244,7 +251,6 @@ footer {
}
#access-lastmod {
li {
height: 1.8rem;
overflow: hidden;
@ -270,15 +276,18 @@ footer {
.footnotes > ol {
padding-left: 2rem;
margin-top: 0.5rem;
> li {
&:not(:last-child) {
margin-bottom: 0.3rem;
}
> p {
margin-left: 0.25em;
margin-top: 0;
margin-bottom: 0;
}
// [scroll-focus] added by `smooth-scroll.js`
&:target:not([scroll-focus]),
&[scroll-focus=true] > p {
@ -310,10 +319,10 @@ footer {
.reversefootnote {
@at-root a#{&} {
font-size: 0.6rem;
position: absolute;
line-height: 1;
padding-top: 0.5em;
margin-left: 0.5em;
position: relative;
bottom: 0.25em;
margin-left: 0.25em;
border-bottom-style: none !important;
}
}
@ -323,9 +332,11 @@ footer {
margin-top: 3rem;
margin-bottom: 1rem;
}
em { /* MarkDown italic */
padding-right: 0.2rem;
}
a:hover {
code {
@extend %link-hover;
@ -346,6 +357,7 @@ footer {
thead {
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
th {
@extend %table-cell;
}
@ -354,18 +366,21 @@ footer {
tbody {
tr {
border-bottom: 1px solid var(--tb-border-color);
&:nth-child(2n) {
background-color: var(--tb-even-bg);
}
&:nth-child(2n + 1) {
background-color: var(--tb-odd-bg);
}
td {
@extend %table-cell;
}
}
}
}
} // tbody
}// table
}
/* --- post --- */
@ -377,12 +392,15 @@ footer {
.post-meta {
font-size: 0.85rem;
word-spacing: 1px;
a {
@extend %link-color;
@extend %link-underline;
&:not(:last-child) {
margin-right: 2px;
}
&:hover {
@extend %link-hover;
}
@ -416,7 +434,7 @@ footer {
margin: 0.5rem 0;
&[data-loaded=true] {
animation: fade-in linear .5s;
animation: fade-in linear 0.5s;
}
&.left {
@ -445,6 +463,7 @@ footer {
&:not(.img-link) {
@extend %link-color;
@extend %link-underline;
&:hover {
@extend %link-hover;
}
@ -473,6 +492,7 @@ footer {
margin: 0 0.4rem 0.2rem -1.4rem;
vertical-align: middle;
color: var(--checkbox-color);
&.checked {
color: var(--checkbox-checked-color);
}
@ -546,6 +566,7 @@ footer {
padding: 1px 3px;
border-radius: 3px;
color: var(--link-color);
&:focus {
box-shadow: none;
}
@ -755,7 +776,6 @@ $sidebar-display: "sidebar-display";
width: 100%;
&:last-child {
a {
position: relative;
left: $cursor-width / 2;
@ -871,6 +891,7 @@ $sidebar-display: "sidebar-display";
display: none;
height: 100%;
overflow: auto;
.post-content {
margin-top: 2rem;
}
@ -959,6 +980,7 @@ $sidebar-display: "sidebar-display";
&:focus {
box-shadow: none;
background: center;
&.form-control {
&::-webkit-input-placeholder { @include input-placeholder; }
&::-moz-placeholder { @include input-placeholder; }
@ -979,6 +1001,7 @@ $sidebar-display: "sidebar-display";
border: none;
padding: 0.5rem;
margin: 0 1rem 1rem 0;
&::before {
content: "#";
color: var(--text-muted-color);
@ -989,6 +1012,7 @@ $sidebar-display: "sidebar-display";
#search-results {
padding-bottom: 6rem;
a {
&:hover {
@extend %link-hover;
@ -1081,6 +1105,7 @@ $sidebar-display: "sidebar-display";
&:nth-child(2) {
margin-top: $topbar-height; /* same as the height of topbar */
}
&:first-child {
/* 3rem for topbar, 6rem for footer */
min-height: calc(100vh - #{$topbar-height} - #{$footer-height} - #{$post-extend-min-height});
@ -1088,8 +1113,7 @@ $sidebar-display: "sidebar-display";
}
#post-wrapper {
min-height: calc(
100vh - #{$topbar-height} - #{$footer-height} - #{$post-extend-min-height}) !important;
min-height: calc(100vh - #{$topbar-height} - #{$footer-height} - #{$post-extend-min-height}) !important;
}
#topbar-wrapper.row,
@ -1147,8 +1171,8 @@ $sidebar-display: "sidebar-display";
}
#post-wrapper {
min-height: calc(
100vh - #{$topbar-height} - #{$footer-height} - #{$post-extend-min-height}) !important;
min-height: calc(100vh - #{$topbar-height} - #{$footer-height} - #{$post-extend-min-height}) !important;
h1 {
margin-top: 2.2rem;
font-size: 1.55rem;
@ -1170,6 +1194,7 @@ $sidebar-display: "sidebar-display";
footer {
height: $footer-height;
> div.d-flex {
width: 100%;
padding: 1.5rem 0;
@ -1178,6 +1203,7 @@ $sidebar-display: "sidebar-display";
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.footer-left,
.footer-right {
text-align: center;
@ -1201,13 +1227,13 @@ $sidebar-display: "sidebar-display";
.footnotes ol > li {
padding-top: 3.5rem;
margin-top: -3.2rem;
&:first-child {
margin-top: -3.5rem;
}
}
[#{$sidebar-display}] {
#sidebar {
transform: translateX(0);
}
@ -1272,6 +1298,7 @@ $sidebar-display: "sidebar-display";
&.loaded ~ a {
margin-right: 1rem;
}
.fa-times-circle {
right: 5.2rem;
}
@ -1299,6 +1326,7 @@ $sidebar-display: "sidebar-display";
#page h1.dynamic-title {
display: none;
~ .post-content {
margin-top: 3rem;
}
@ -1373,7 +1401,6 @@ $sidebar-display: "sidebar-display";
/* Compact icons in sidebar & panel hidden */
@media all and (min-width: 850px) and (max-width: 1199px) {
#sidebar {
width: $sidebar-width-small;
@ -1387,6 +1414,7 @@ $sidebar-display: "sidebar-display";
span {
width: 2rem;
}
.icon-border {
left: -3px;
}
@ -1446,7 +1474,6 @@ $sidebar-display: "sidebar-display";
/* --- desktop mode, both sidebar and panel are visible --- */
@media all and (min-width: 1200px) {
#main > div.row > div.col-xl-8 {
-webkit-box-flex: 0;
-ms-flex: 0 0 75%;
@ -1476,12 +1503,15 @@ $sidebar-display: "sidebar-display";
#search-results > div {
width: 46%;
&:nth-child(odd) {
margin-right: 1.5rem;
}
&:nth-child(even) {
margin-left: 1.5rem;
}
&:last-child:nth-child(odd) {
position: relative;
right: 24.3%;
@ -1499,9 +1529,9 @@ $sidebar-display: "sidebar-display";
}
@media all and (min-width: 1400px) {
#main > div.row {
padding-left: calc((100% - #{$main-content-max-width}) / 2);
> div.col-xl-8 {
max-width: 850px;
}
@ -1509,6 +1539,7 @@ $sidebar-display: "sidebar-display";
#search-result-wrapper {
padding-right: 2rem;
> div {
max-width: 1110px;
}
@ -1527,13 +1558,13 @@ $sidebar-display: "sidebar-display";
}
@media all and (min-width: 1650px) {
#breadcrumb {
padding-left: 0;
}
#main > div.row > div.col-xl-8 {
padding-left: 0;
> div:first-child {
padding-left: 0.55rem !important;
padding-right: 1.9rem !important;
@ -1581,6 +1612,7 @@ $sidebar-display: "sidebar-display";
> a {
width: 6.2rem;
height: 6.2rem;
&.mx-auto {
margin-left: 0 !important;
}

View File

@ -76,6 +76,7 @@ div > pre {
table {
padding: 0;
border: 0;
td pre {
overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */
@ -157,6 +158,7 @@ div {
pre.lineno {
display: none;
}
td.rouge-code {
@extend %code-snippet-padding;
}

View File

@ -116,11 +116,13 @@
.card-header {
background-color: var(--card-header-bg);
}
.list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
border-color: var(--categories-border);
&:last-child {
border-bottom-color: var(--card-bg);
}
@ -128,13 +130,16 @@
}
#archives li:nth-child(odd) {
background-image: linear-gradient(
background-image:
linear-gradient(
to left,
rgb(26, 26, 30),
rgb(39, 39, 45),
rgb(39, 39, 45),
rgb(39, 39, 45),
rgb(26, 26, 30));
rgb(26, 26, 30)
);
}
} // dark-scheme

View File

@ -1,7 +1,7 @@
/*!
* The styles for Jekyll theme Chirpy
*
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -41,6 +41,7 @@
&:not(:first-child) {
position: relative;
left: 4px;
&::after {
left: 67px;
}
@ -98,6 +99,7 @@
.date {
white-space: nowrap;
display: inline-block;
&.month {
width: 1.4rem;
text-align: center;
@ -120,6 +122,7 @@
z-index: 1;
}
}
&.day {
font-size: 85%;
font-family: 'Lato', sans-serif;
@ -127,7 +130,7 @@
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
left: -0.15rem;
}
} // #archives .date
@ -136,6 +139,7 @@
@media all and (max-width: 576px) {
#archives {
margin-top: -1rem;
ul {
letter-spacing: 0;
}

View File

@ -3,7 +3,7 @@
*/
.dash {
margin: 0 .5rem .6rem .5rem;
margin: 0 0.5rem 0.6rem 0.5rem;
border-bottom: 2px dotted var(--dash-color);
}
@ -60,8 +60,9 @@
#page-tag {
ul > li {
&::before {
margin: 0 .5rem;
margin: 0 0.5rem;
}
> a {
white-space: nowrap;
overflow: hidden;

View File

@ -22,24 +22,29 @@
border-radius: 50%;
border: 1px solid var(--btn-paginator-border-color);
background-color: var(--button-bg);
&:hover {
background-color: var(--btn-paginator-hover-color);
}
}
&.active {
.page-link {
background-color: var(--btn-paginator-hover-color);
color: var(--btn-text-color);
}
}
&.disabled {
cursor: not-allowed;
.page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--btn-paginator-border-color);
background-color: var(--button-bg);
}
}
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
@ -70,6 +75,7 @@
i {
font-size: 0.73rem;
}
span:not(:last-child) {
margin-right: 1.2rem;
}
@ -79,6 +85,7 @@
margin-top: 0.6rem;
margin-bottom: 0.6rem;
color: var(--post-list-text-color);
> p {
/* Make preview shorter on the homepage */
margin: 0;
@ -96,13 +103,13 @@
padding-left: 3px;
color: var(--pin-color);
}
> span {
display: none;
}
}
} // .post-preview
} // #post-list
/* Hide SideBar and TOC */
@ -122,9 +129,9 @@
/* Sidebar is visible */
@media all and (min-width: 831px) {
#post-list {
margin-top: 1.5rem;
.post-preview .post-meta {
.pin {
background: var(--pin-bg);

View File

@ -131,9 +131,11 @@
top: 4rem;
transition: top 0.2s ease-in-out;
animation: fade-up 0.8s;
&.topbar-down {
top: 6rem;
}
> span {
@include panel-label;
}
@ -162,6 +164,7 @@ nav[data-toggle=toc] {
> h3 {
@include label(1.1rem, 600);
}
.card {
border-color: var(--card-border-color);
background-color: var(--card-bg);
@ -169,9 +172,11 @@ nav[data-toggle=toc] {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
h3 {
color: var(--text-color);
}
&:hover {
-webkit-transform: translate3d(0, -3px, 0);
transform: translate3d(0, -3px, 0);
@ -200,6 +205,7 @@ nav[data-toggle=toc] {
ul {
list-style-type: none;
padding-inline-start: 1.5rem;
> li::before {
background: #c2c9d4;
width: 5px;
@ -238,17 +244,21 @@ nav[data-toggle=toc] {
.share-icons {
font-size: 1.2rem;
a {
&:not(:last-child) {
margin-right: 0.25rem;
}
&:hover {
text-decoration: none;
> i {
@extend %btn-share-hovor;
}
}
}
> i {
position: relative;
bottom: 1px;
@ -259,16 +269,20 @@ nav[data-toggle=toc] {
@extend %btn-share-hovor;
}
}
.fab {
&.fa-twitter {
@include btn-sharing-color(rgba(29, 161, 242, 1));
}
&.fa-facebook-square {
@include btn-sharing-color(rgb(66, 95, 156));
}
&.fa-telegram {
@include btn-sharing-color(rgb(39, 159, 217));
}
&.fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43));
}
@ -292,8 +306,10 @@ nav[data-toggle=toc] {
.license-wrapper {
line-height: 1.2rem;
> a {
font-weight: 600;
&:hover {
@extend %link-hover;
}
@ -308,7 +324,8 @@ nav[data-toggle=toc] {
.post-tail-bottom {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
>div:first-child {
> div:first-child {
width: 100%;
margin-top: 1rem;
}
@ -324,9 +341,10 @@ nav[data-toggle=toc] {
@media all and (min-width: 768px) {
#post-wrapper {
.post-meta {
>div:not(:first-child)::before {
> div:not(:first-child)::before {
@include dot(0.5rem, 0.2rem);
}
&.flex-column {
-webkit-box-orient: horizontal !important;
-webkit-box-direction: normal !important;
@ -342,7 +360,7 @@ nav[data-toggle=toc] {
.post-navigation {
padding-left: 0;
padding-right: 0;
margin-left: -.5rem;
margin-right: -.5rem;
margin-left: -0.5rem;
margin-right: -0.5rem;
}
}

View File

@ -10,6 +10,7 @@
letter-spacing: 0;
border: 1px solid var(--tag-border) !important;
box-shadow: 0 0 3px 0 var(--tag-shadow);
span {
margin-left: 0.6em;
font-size: 0.7em;

View File

@ -6,7 +6,7 @@ layout: compress
{% for post in site.posts %}
{
"title": "{{ post.title | escape }}",
"url": "{{ site.baseurl }}{{ post.url }}",
"url": "{{ post.url | relative_url }}",
"categories": "{{ post.categories | join: ', '}}",
"tags": "{{ post.tags | join: ', ' }}",
"date": "{{ post.date }}",

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* Chirpy v4.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
* © 2019 Cotes Chung
* MIT Licensed
*/

View File

@ -1,7 +1,6 @@
<div align="right">
中文(简体) /
[EN](https://github.com/cotes2020/jekyll-theme-chirpy#readme)
[EN](https://github.com/cotes2020/jekyll-theme-chirpy#readme) / 中文
</div>
@ -9,15 +8,15 @@
# Chirpy Jekyll Theme
一款简约而强大、采用响应式设计的 Jekyll 主题,适合展示专业写作内容。
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
[![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)
[![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)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cotes2020/jekyll-theme-chirpy&amp;utm_campaign=Badge_Grade)
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
一款简约而强大、采用响应式设计的 Jekyll 主题,适合展示专业写作内容。
**[线上体验 →](https://chirpy.cotes.info)**
[**线上体验 →**](https://chirpy.cotes.info)
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/commons/devices-mockup.png)](https://chirpy.cotes.info)
@ -53,9 +52,8 @@
有两种方式可以创建一个使用本主题的仓库:
- **[使用 Chirpy Starter](#使用-chirpy-starter)** - 易于版本升级,隔离无关的主题项目文件,让您的仓库舒适清爽。
- **[从 GitHub 上 Fork](#从-github-上-fork)** - 对个性化二次开发友好,但是难于升级。除非您决定魔改此款主题或者参与代码贡献,否则不推荐使用此方式。
- [**使用 Chirpy Starter**](#使用-chirpy-starter) - 易于版本升级,隔离无关的主题项目文件,让您的仓库舒适清爽。
- [**从 GitHub 上 Fork**](#从-github-上-fork) - 对个性化二次开发友好,但是难于升级。除非您决定魔改此款主题或者参与代码贡献,否则不推荐使用此方式。
#### 使用 Chirpy Starter
@ -76,6 +74,7 @@ $ bash tools/init.sh
上述脚本将会:
1. 从您的仓库中删除了:
- `.travis.yml`
- `_posts` 下的文件
- `docs` 目录
@ -189,6 +188,7 @@ $ docker run -it --rm \
这取决于您如何使用这个 theme
- 如果您是使用 theme gem`Gemfile` 会有 `gem "jekyll-theme-chirpy"`),编辑 `Gemfile` 并更新 them gem 的版本号,譬如:
```diff
- gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
+ gem "jekyll-theme-chirpy", "~> 3.3", ">= 3.3.0"

View File

@ -89,6 +89,5 @@ exports.liveRebuild = () => {
`${ JS_SRC }/lib/*.js`
],
buildJs
)
}
);
};

View File

@ -2,7 +2,7 @@
Gem::Specification.new do |spec|
spec.name = "jekyll-theme-chirpy"
spec.version = "4.3.0"
spec.version = "4.3.4"
spec.authors = ["Cotes Chung"]
spec.email = ["cotes.chung@gmail.com"]

View File

@ -1,6 +1,6 @@
{
"name": "jekyll-theme-chirpy",
"version": "4.3.0",
"version": "4.3.4",
"description": "A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.",
"main": "index.js",
"directories": {

View File

@ -69,7 +69,7 @@ init_files() {
rm -f "$_workflow.$TEMP_SUFFIX"
## Cleanup image settings in site config
sed -i.$TEMP_SUFFIX "s/^img_cdn:.*/img_cdn: ''/;s/^avatar:.*/avatar: ''/" _config.yml
sed -i.$TEMP_SUFFIX "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
rm -f _config.yml.$TEMP_SUFFIX
fi
@ -83,7 +83,7 @@ init_files() {
rm -rf _posts/* docs
# save changes
git add -A && git add .github -f
git add -A
git commit -m "[Automation] Initialize the environment." -q
echo "[INFO] Initialization successful!"

View File

@ -28,6 +28,16 @@ check() {
fi
}
## Remove unnecessary theme settings
cleanup_config() {
cp _config.yml _config.yml.bak
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
}
resume_config() {
mv _config.yml.bak _config.yml
}
release() {
_default_branch="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')"
_version="$(grep "spec.version" jekyll-theme-chirpy.gemspec | sed 's/.*= "//;s/".*//')" # X.Y.Z
@ -49,9 +59,10 @@ release() {
# build a gem package
echo -e "Build the gem pakcage for v$_version\n"
cleanup_config
rm -f ./*.gem
gem build "$GEM_SPEC"
resume_config
}
main() {