1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 21:53:26 +00:00

Compare commits

..

19 Commits

Author SHA1 Message Date
Cotes Chung
f78747d841 Bump version to 3.2.2 2021-03-04 15:04:13 +08:00
Cotes Chung
cae953420d Fix the corners of the page navigation buttons of the latest/oldest post 2021-03-04 15:04:12 +08:00
Cotes Chung
693d3d8994 Change the bundle cache path on gh-actions
ubuntu-latest changed from 18.04 TLS to 20.04 LTS causes a file path change to the `ffi` gem, invalidating the gh-actions cache file, and causes the build to fail.

See: <https://github.com/ffi/ffi/issues/769>
2021-03-04 15:03:57 +08:00
Cotes Chung
20997d51a5 Fix image width in the list (when screen width is 768px) 2021-02-22 17:34:12 +08:00
Cotes Chung
125c23f19b Bump version to 3.2.1 2021-02-10 23:50:06 +08:00
Cotes Chung
6692416fd4 Restore the copy link button in the post sharing option
Affected version >= 3.0.3, <= 3.2.0
2021-02-10 23:50:04 +08:00
Cotes Chung
e13187cb1d Bump version to 3.2.0 2021-02-10 21:27:18 +08:00
Cotes Chung
89200f3109 Improve the bump tool 2021-02-10 21:15:58 +08:00
Cotes Chung
136773481e Add branches notice to the Docs 2021-02-10 21:15:58 +08:00
Cotes Chung
de7d2fab7c Optimize the language badge position in code block 2021-02-10 21:15:58 +08:00
Cotes Chung
1b1fa93cf6 Fix typo in readme & quick-start tutorial 2021-02-06 02:05:19 +08:00
Cotes Chung
7e31ba4103 Improve the width of search results items (fix #276) 2021-02-05 22:13:44 +08:00
Cotes Chung
34b7a80a78 Bump version to 3.1.1 2021-02-05 02:05:55 +08:00
Cotes Chung
ba6c7eceec Add a modification to Gemfile.lock in bump tool 2021-02-05 01:55:20 +08:00
Cotes Chung
5669f792a7 Fix search results slow scrolling (#273)
also:
- improve its responsive design
- fix the js path in gulp
2021-02-05 01:24:15 +08:00
Cotes Chung
f864b5c324 Hide empty categries/tags in search (#273) 2021-02-05 00:51:50 +08:00
Cotes Chung
c8ff81e79a Use regex in site exclusion list 2021-02-04 03:38:04 +08:00
Cotes Chung
2bcaabdab4 Give travis a new job: monitor the starter files 2021-02-04 03:15:20 +08:00
Cotes Chung
4faa595b04 Update dependencies in Gemfile.lock 2021-02-03 02:41:33 +08:00
21 changed files with 136 additions and 100 deletions

View File

@@ -25,7 +25,7 @@ jobs:
os: [ubuntu-latest, macos-latest]
env:
GEMS_PATH: ~/vendor/bundle
GEMS_PATH: vendor/bundle
steps:
- name: Checkout

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
env:
GEMS_PATH: ~/vendor/bundle
GEMS_PATH: vendor/bundle
steps:
- name: Checkout

View File

@@ -1,36 +1,50 @@
os: linux
dist: bionic
language: ruby
rvm: 2.7.0
language: minimal
cache:
directories:
- $TRAVIS_BUILD_DIR/vendor/bundle
jobs:
include:
before_install:
- gem install bundler:2.2.4 # match the Gemfile.lock, travis' bundle is 2.1.2
- bundle config path 'vendor/bundle'
- name: CD
language: ruby
rvm: 2.7.0
install:
# overriding to drop the travis `--development` flag
- bundle install --jobs=3 --retry=3
addons:
apt:
packages:
# required to avoid SSL error (for htmlproofer)
- libcurl4-openssl-dev
addons:
apt:
packages:
- libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer)
cache:
directories:
- $TRAVIS_BUILD_DIR/vendor/bundle
script:
before_install:
# match the Gemfile.lock, travis' bundler is 2.1.2
- gem install bundler:2.2.4
- bundle config path 'vendor/bundle'
install:
# overriding to drop the travis `--development` flag
- bundle install --jobs=3 --retry=3
script:
- eval "$BUILD_CMD"
git:
depth: false # for posts' lastmod
- name: Flush Starter
script:
- eval "$FLUSH_STARTER"
before_script:
- git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q
- eval "$BUILD_CMD"
branches:
only: /.*-stable$/
git:
depth: false # for posts lastmod
notifications:
email:
recipients:

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
jekyll-theme-chirpy (3.1.1)
jekyll-theme-chirpy (3.2.2)
jekyll (~> 4.1)
jekyll-archives (~> 2.2)
jekyll-paginate (~> 1.1)
@@ -33,7 +33,7 @@ GEM
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (1.8.7)
i18n (1.8.8)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
addressable (~> 2.4)

View File

@@ -5,7 +5,7 @@ Language: English | [简体中文](https://github.com/cotes2020/jekyll-theme-chi
[![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)
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg?color=blue)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
[![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, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you record and share your knowledge easily. [Live Demo »](https://chirpy.cotes.info)
@@ -21,7 +21,7 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Credits](#credits)
- [Supporting](#supporting)
- [Support](#support)
- [License](#license)
## Features
@@ -50,10 +50,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
There are two ways to get the theme:
- **Install from RubyGems** - Easy to upgrade, isolate irrelevant project files so you can focus on writing.
- **Fork from GitHub** - Convenient for custom development, but difficult to upgrade, only suitable for web developers.
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
### Install From RubyGems
### Installing the Theme Gem
Add this line to your Jekyll site's `Gemfile`:
@@ -77,15 +77,15 @@ Finally, copy the required files from the theme's gem (for detailed files, see [
> **Hint**: To locate the installed themes gem, execute:
>
```console
$ bundle info --path jekyll-theme-chirpy
```
> ```console
> $ bundle info --path jekyll-theme-chirpy
> ```
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
### Fork From GitHub
### Fork on GitHub
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
[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.)
Install gem dependencies by:
@@ -209,9 +209,13 @@ Also, thank [JetBrains][jb] for providing the open source license.
[![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][jb]
## Supporting
## Support
If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
If you like this theme or find it helpful, please consider sponsoring me, because it will encourage and help me better maintain the project, I will be very grateful!
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-orange?logo=buy-me-a-coffee&logoColor=white)](https://www.buymeacoffee.com/coteschung)
[![Wechat Pay](https://img.shields.io/badge/WeChat%20Pay-brightgreen?logo=wechat&logoColor=white)][cn-donation]
[![Alipay](https://img.shields.io/badge/Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
## License
@@ -220,5 +224,9 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
[starter]: https://github.com/cotes2020/chirpy-starter
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
<!-- ReadMe links -->
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
[cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/

View File

@@ -154,7 +154,8 @@ exclude:
- vendor
- Gemfile
- Gemfile.lock
- jekyll-theme-chirpy.gemspec
- '*.gem'
- '*.gemspec'
- tools
- docs
- README.md

View File

@@ -15,10 +15,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
There are two ways to get the theme:
- **Install from RubyGems** - Easy to upgrade, isolate irrelevant project files so you can focus on writing.
- **Fork from GitHub** - Convenient for custom development, but difficult to upgrade, only suitable for web developers.
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
### Install From RubyGems
### Installing the Theme Gem
Add this line to your Jekyll site's `Gemfile`:
@@ -42,15 +42,15 @@ Finally, copy the required files from the theme's gem (for detailed files, see [
> **Hint**: To locate the installed themes gem, execute:
>
```console
$ bundle info --path jekyll-theme-chirpy
```
> ```console
> $ bundle info --path jekyll-theme-chirpy
> ```
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
### Fork From GitHub
### Fork on GitHub
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
[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.)
Install gem dependencies by:

View File

@@ -941,7 +941,7 @@ $sidebar-display: "sidebar-display";
}
> div {
max-width: 100%;
width: 100%;
&:not(:last-child) {
margin-bottom: 1rem;
@@ -1390,7 +1390,7 @@ $sidebar-display: "sidebar-display";
}
#search-results > div {
max-width: 46%;
width: 46%;
&:nth-child(odd) {
margin-right: 1.5rem;
}

View File

@@ -157,7 +157,7 @@ div {
div[class^='language-']::before {
content: attr(lang);
position: absolute;
right: 1.8rem;
right: 2rem;
margin-top: 3px;
font-size: 0.7rem;
font-weight: 600;
@@ -170,3 +170,9 @@ div[class^='language-']::before {
right: 3.1rem;
}
}
@media (min-width: 1650px) {
div[class^='language-']::before {
right: 3.5rem;
}
}

View File

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

View File

@@ -66,11 +66,13 @@
@include btn-post-nav;
color: var(--link-color);
&:hover {
background: #2a408e;
color: #fff;
border-color: #2a408e;
}
&.disabled {
@include btn-post-nav;
@@ -78,19 +80,34 @@
cursor: not-allowed;
background: none;
color: gray;
&:hover {
border-color: none;
}
}
&.btn-outline-primary.disabled:focus {
box-shadow: none;
}
&::before {
color: var(--text-muted-color);
font-size: 0.65rem;
text-transform: uppercase;
content: attr(prompt);
}
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: 0.5px;
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: 0.5px;
}
}
p {
@@ -100,19 +117,6 @@
white-space: normal;
}
a {
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: 0.5px;
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: 0.5px;
}
}
} // .post-navigation
@keyframes fade-up {
@@ -226,10 +230,6 @@
vertical-align: middle;
user-select: none;
i {
font-weight: 400;
}
.share-icons {
font-size: 1.2rem;
a {
@@ -337,12 +337,6 @@
} // .post
}
@media all and (min-width: 768px) and (max-width: 830px) {
.post img {
max-width: calc(100% + 2rem);
}
}
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
.post-navigation {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@ Language: [English](https://github.com/cotes2020/jekyll-theme-chirpy#readme) |
[![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)
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg?color=blue)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
[![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)
@@ -90,7 +90,7 @@ $ bundle info --path jekyll-theme-chirpy
### 在 GitHub 上 Fork
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。(友情提示:默认分支的代码处于开发状态,如果您想博客更加稳定,请切换到最新的 [Tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) 开始写作。)
安装依赖:
@@ -214,7 +214,11 @@ $ docker run -it --rm \
## 赞助
如果您喜欢这个主题或者它对您有帮助,请考虑打赏作者:在 [项目主页](https://github.com/cotes2020/jekyll-theme-chirpy) 点击按钮 <kbd>:heart: Sponsor</kbd> 选择适合的链接即可完成(国内一般选第二个链接,支付宝/微信赞助),您的打赏将会极大地鼓励作者,并帮助作者更好地维护项目!
如果您喜欢这个主题或者它对您有帮助,请考虑打赏作者,您的支持将会极大地鼓励作者,并帮助作者更好地维护项目!
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-orange?logo=buy-me-a-coffee&logoColor=white)](https://www.buymeacoffee.com/coteschung)
[![Wechat Pay](https://img.shields.io/badge/WeChat%20Pay-brightgreen?logo=wechat&logoColor=white)][cn-donation]
[![Alipay](https://img.shields.io/badge/Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
## 许可证书
@@ -223,4 +227,8 @@ $ docker run -it --rm \
[starter]: https://github.com/cotes2020/chirpy-starter
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
<!-- ReadMe links -->
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
[cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/

View File

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

View File

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

View File

@@ -10,14 +10,14 @@
#
# 2. Create a git-tag on release branch
#
# 3. Build a rubygem package
# 3. Build a RubyGems package base on the latest git-tag
#
#
# Requires: gulp, rubygem
# Requires: Git, Gulp, RubyGems
set -eu
auto_release=true
manual_release=false
ASSETS=(
"_sass/jekyll-theme-chirpy.scss"
@@ -58,9 +58,8 @@ check() {
}
_bump_assets() {
_version="$1"
for i in "${!ASSETS[@]}"; do
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$_version/" "${ASSETS[$i]}"
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${ASSETS[$i]}"
done
gulp
@@ -118,21 +117,33 @@ release() {
_release_branch="$_major-$_minor-stable"
if $manual_release; then
echo -e "Bump version to $_version (manual release)\n"
bump "$_version"
exit 0
fi
if [[ -z $(git branch -v | grep "$_release_branch") ]]; then
git checkout -b "$_release_branch"
else
git checkout "$_release_branch"
# cherry-pick the latest 2 commit from master to release branch
git cherry-pick "$(git rev-parse master~1)" "$(git rev-parse master)"
# cherry-pick the latest commit from master branch to release branch
git cherry-pick "$(git rev-parse master)"
fi
echo -e "Bump version to $_version\n"
bump "$_version"
echo -e "Create tag v$_version\n"
git tag "v$_version"
echo -e "Build the gem pakcage for v$_version\n"
build_gem
# head back to master branch
git checkout master
# cherry-pick the latest commit from release branch to master branch
git cherry-pick "$_release_branch" -x
}
@@ -152,16 +163,10 @@ main() {
exit -1
fi
echo -e "Bump version to $_version\n"
bump "$_version"
echo -e "Release to v$_version\n"
if $auto_release; then
release "$_version"
fi
release "$_version"
else
echo "Error: Illegal version number: '$_version'"
fi
@@ -171,7 +176,7 @@ while (($#)); do
opt="$1"
case $opt in
-m | --manual)
auto_release=false
manual_release=true
shift
;;
*)