- {% capture _platform %} + {%- capture _platform -%} Jekyll - {% endcapture %} + {%- endcapture -%} - {% capture _theme %} + {%- capture _theme -%} Chirpy - {% endcapture %} + {%- endcapture -%} {{ site.data.locales[site.lang].meta - | default: 'Powered by :PLATFORM with :THEME theme.' + | default: 'Using the :PLATFORM theme :THEME.' | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index bf7a104..486251f 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -1254,6 +1254,7 @@ $sidebar-display: "sidebar-display"; div.d-flex { padding: 1.5rem 0; + line-height: 1.65; flex-wrap: wrap; justify-content: space-around !important; } From 09f9305d4cec70556786e42924710089205500f0 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 27 Dec 2022 21:41:45 +0800 Subject: [PATCH 24/32] chore: hide blur edge of LQIP images --- _sass/addon/commons.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 486251f..c1e1ae9 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -551,6 +551,7 @@ i { /* fontawesome icons */ .img-link { color: transparent; display: inline-flex; + overflow: hidden; } .shimmer { From 09e4ad245b5f1101eacbc55b89e8e8dee05df746 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 27 Dec 2022 21:43:43 +0800 Subject: [PATCH 25/32] chore(deps): update gem spec list - Jekyll 4.3.0 introduced `webrick` for Ruby 3.x - Jekyll's dependency `nokogiri` does not yet support Ruby 3.2. See: https://github.com/sparklemotion/nokogiri/issues/2740/ --- .github/workflows/ci.yml | 2 +- .github/workflows/pages-deploy.yml.hook | 2 +- Gemfile | 3 --- jekyll-theme-chirpy.gemspec | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08e6af9..a5b4672 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: - ruby: [2.7, 3] + ruby: ['2.7', '3.0', '3.1'] steps: - name: Checkout diff --git a/.github/workflows/pages-deploy.yml.hook b/.github/workflows/pages-deploy.yml.hook index b2da8d9..fed62a9 100644 --- a/.github/workflows/pages-deploy.yml.hook +++ b/.github/workflows/pages-deploy.yml.hook @@ -42,7 +42,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted + ruby-version: '3.1' # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted bundler-cache: true - name: Build site diff --git a/Gemfile b/Gemfile index ffef29a..6438466 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,3 @@ end # Performance-booster for watching directories on Windows gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? - -# Jekyll <= 4.2.0 compatibility with Ruby 3.0 -gem "webrick", "~> 1.7" diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index b3c6a37..21e7a8a 100644 --- a/jekyll-theme-chirpy.gemspec +++ b/jekyll-theme-chirpy.gemspec @@ -23,9 +23,9 @@ Gem::Specification.new do |spec| "plugin_type" => "theme" } - spec.required_ruby_version = ">= 2.5" + spec.required_ruby_version = [">= 2.5", "< 3.2"] - spec.add_runtime_dependency "jekyll", "~> 4.1" + spec.add_runtime_dependency "jekyll", "~> 4.3" spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" spec.add_runtime_dependency "jekyll-redirect-from", "~> 0.16" spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.7" From d7bcb40cdecaf2c8741814271af9bd1b13e18d19 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 27 Dec 2022 21:50:21 +0800 Subject: [PATCH 26/32] refactor: update deprecated syntax for SASS division --- _sass/addon/commons.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index c1e1ae9..9e1b1f1 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -816,7 +816,7 @@ $sidebar-display: "sidebar-display"; &:last-child { a { position: relative; - left: $cursor-width / 2; + left: calc($cursor-width / 2); width: 100%; } @@ -842,7 +842,7 @@ $sidebar-display: "sidebar-display"; @for $i from 1 through $tab-count { $offset: $tab-count - $i; - $top: -$offset * $tab-height + ($tab-height - $tab-cursor-height) / 2; + $top: -$offset * $tab-height + calc(($tab-height - $tab-cursor-height) / 2); @if $i < $tab-count { > li.active:nth-child(#{$i}), From 72700be7dd5226391f93c7ff01666e91575b39ff Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 27 Dec 2022 23:58:17 +0800 Subject: [PATCH 27/32] chore(ci): fix workflow trigger conditions --- .github/workflows/ci.yml | 2 -- .github/workflows/style-lint.yml | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5b4672..79d04c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: branches-ignore: - 'production' - 'docs' - tags-ignore: - - '**' paths-ignore: - '.github/**' - '!.github/workflows/ci.yml' diff --git a/.github/workflows/style-lint.yml b/.github/workflows/style-lint.yml index e0bdf6d..2f1cdd0 100644 --- a/.github/workflows/style-lint.yml +++ b/.github/workflows/style-lint.yml @@ -2,10 +2,11 @@ name: 'Style Lint' on: push: + branches-ignore: + - 'production' + - 'docs' paths: - '_sass/**/*.scss' - tags-ignore: - - '**' pull_request: paths: - '_sass/**/*.scss' From 5a191e79afacb4459d9767c3330ad6ecf3eacc9a Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 28 Dec 2022 01:10:27 +0800 Subject: [PATCH 28/32] chore: remove extension from tools --- .github/CONTRIBUTING.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/ci.yml | 2 +- tools/{init.sh => init} | 0 tools/{release.sh => release} | 0 tools/{run.sh => run} | 0 tools/{test.sh => test} | 0 7 files changed, 3 insertions(+), 3 deletions(-) rename tools/{init.sh => init} (100%) rename tools/{release.sh => release} (100%) rename tools/{run.sh => run} (100%) rename tools/{test.sh => test} (100%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9ac13dc..ef81bb0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -33,7 +33,7 @@ During JavaScript development, real-time debugging can be performed through the Firstly, start a Jekyll server: ```console -$ bash tools/run.sh +$ bash tools/run ``` And then open a new terminal tab and run: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5187ecc..d26834f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,7 +22,7 @@ Please select the desired item checkbox and change it to "[x]", then delete opti Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> -- [ ] I have run `bash ./tools/test.sh` (at the root of the project) locally and passed +- [ ] I have run `bash ./tools/test` (at the root of the project) locally and passed - [ ] I have tested this feature in the browser ### Test Configuration diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79d04c5..a927d91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,4 +35,4 @@ jobs: bundler-cache: true - name: Test Site - run: bash tools/test.sh + run: bash tools/test diff --git a/tools/init.sh b/tools/init similarity index 100% rename from tools/init.sh rename to tools/init diff --git a/tools/release.sh b/tools/release similarity index 100% rename from tools/release.sh rename to tools/release diff --git a/tools/run.sh b/tools/run similarity index 100% rename from tools/run.sh rename to tools/run diff --git a/tools/test.sh b/tools/test similarity index 100% rename from tools/test.sh rename to tools/test From 6fa1777eb0fbed03532b76e4da1de73de3b07200 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 28 Dec 2022 01:11:27 +0800 Subject: [PATCH 29/32] chore(tools): checkout latest tag on initialization --- tools/init | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/init b/tools/init index 656a641..f4a1f30 100755 --- a/tools/init +++ b/tools/init @@ -46,6 +46,11 @@ check_init() { fi } +checkout_latest_tag() { + tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + git reset --hard "$tag" +} + init_files() { if $_no_gh; then rm -rf .github @@ -100,4 +105,6 @@ while (($#)); do esac done +checkout_latest_tag + init_files From 8440d429849f26abff35d26a2fbc10d3ff21400e Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 28 Dec 2022 01:20:24 +0800 Subject: [PATCH 30/32] docs: add tutorial and example for new features --- _posts/2019-08-08-text-and-typography.md | 125 +++++++++++------------ _posts/2019-08-08-write-a-new-post.md | 65 ++++++++++-- 2 files changed, 113 insertions(+), 77 deletions(-) diff --git a/_posts/2019-08-08-text-and-typography.md b/_posts/2019-08-08-text-and-typography.md index 55e65c3..7cacc70 100644 --- a/_posts/2019-08-08-text-and-typography.md +++ b/_posts/2019-08-08-text-and-typography.md @@ -8,14 +8,12 @@ math: true mermaid: true image: path: /commons/devices-mockup.png - width: 800 - height: 500 + lqip: data:image/webp;base64,UklGRpoAAABXRUJQVlA4WAoAAAAQAAAADwAABwAAQUxQSDIAAAARL0AmbZurmr57yyIiqE8oiG0bejIYEQTgqiDA9vqnsUSI6H+oAERp2HZ65qP/VIAWAFZQOCBCAAAA8AEAnQEqEAAIAAVAfCWkAALp8sF8rgRgAP7o9FDvMCkMde9PK7euH5M1m6VWoDXf2FkP3BqV0ZYbO6NA/VFIAAAA alt: Responsive rendering of Chirpy theme on multiple devices. --- 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. - ## Titles --- # H1 - heading @@ -26,7 +24,6 @@ This post is to show Markdown syntax rendering on [**Chirpy**](https://github.co