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/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 0000000..af4a885
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,14 @@
+name: CD
+on:
+ push:
+ branches: [production, docs]
+
+jobs:
+ launch:
+ runs-on: ubuntu-latest
+ steps:
+ - run: |
+ curl -X POST -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer ${{ secrets.GH_PAT }}" \
+ https://api.github.com/repos/${{ secrets.BUILDER }}/dispatches \
+ -d '{"event_type":"deploy", "client_payload":{"branch": "${{ github.ref_name }}"}}'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 86c6370..a927d91 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,14 +2,11 @@ name: 'CI'
on:
push:
branches-ignore:
- - 'release/**'
+ - 'production'
- 'docs'
- tags-ignore:
- - '**'
paths-ignore:
- '.github/**'
- '!.github/workflows/ci.yml'
- - '.travis.yml'
- '.gitignore'
- 'README.md'
- 'LICENSE'
@@ -23,7 +20,7 @@ jobs:
strategy:
matrix:
- ruby: [2.5, 2.6, 2.7, 3]
+ ruby: ['2.7', '3.0', '3.1']
steps:
- name: Checkout
@@ -38,4 +35,4 @@ jobs:
bundler-cache: true
- name: Test Site
- run: bash tools/test.sh
+ run: bash tools/test
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/.github/workflows/style-lint.yml b/.github/workflows/style-lint.yml
index f54f3c3..2f1cdd0 100644
--- a/.github/workflows/style-lint.yml
+++ b/.github/workflows/style-lint.yml
@@ -2,11 +2,14 @@ name: 'Style Lint'
on:
push:
+ branches-ignore:
+ - 'production'
+ - 'docs'
paths:
- - '_sass/**.scss'
+ - '_sass/**/*.scss'
pull_request:
paths:
- - '_sass/**.scss'
+ - '_sass/**/*.scss'
jobs:
stylelint:
diff --git a/.gitignore b/.gitignore
index 3ff2312..9735d33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,6 @@
!.git*
!.editorconfig
!.nojekyll
-!.travis.yml
!.husky
!.commitlintrc.json
!.versionrc.json
diff --git a/.stylelintrc.json b/.stylelintrc.json
index 0dfc8b2..66c0ffb 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -11,12 +11,6 @@
"alpha-value-notation": "number",
"selector-not-notation": "simple",
"color-hex-length": "long",
- "declaration-block-single-line-max-declarations": 3,
- "font-family-no-missing-generic-family-keyword": [
- true,
- {
- "ignoreFontFamilies": ["Font Awesome 5 Free"]
- }
- ]
+ "declaration-block-single-line-max-declarations": 3
}
}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 56b7c5d..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-os: linux
-dist: bionic
-language: ruby
-rvm: 2.7.0
-
-addons:
- apt:
- packages:
- - libcurl4-openssl-dev # to avoid SSL error (for htmlproofer)
-
-# Overriding to drop the `--development` flag which requires the Gemfile.lock at build
-install: bundle install --jobs=3 --retry=3 --path=vendor/bundle
-
-before_script: git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q
-
-jobs:
- include:
- - stage: Upgrade
- cache: bundler
- git:
- depth: false # for posts' lastmod
- script: eval "$BUILD_CMD"
-
- - stage: Starter
- language: minimal
- install: true # skip install step
- script: eval "$FLUSH_STARTER"
-
- - stage: Docs
- cache: bundler
- git:
- depth: false # for posts' lastmod
- script: eval "$DOCS_CMD"
-
-stages:
- - name: Upgrade
- if: branch = production
- - name: Starter
- if: branch = production
- - name: Docs
- if: branch = docs
-
-notifications:
- email:
- recipients:
- - secure: "fFLqX7uOzFA8RE2AUFlU1mmxMw+rdV6DnODJ/1Gl+3ecNtrv5LeH3c5a4a5ShQqYTrx9BPfD40VRN7UB+lzOdXiWLI9yDGRPPxGG26/WfrKpdQPZilc8zAOEeDnLAJeGZLsUvgmNb3KCXW6S8NPqqh34CfWcTIzjCARhRgO33wcs8X5wP5cugtNqO5Ew/pUcfWcmiuXNX0GNT6l+nL5A7yN+IO5mRHqSRmlfYd5EHhGMTIL4La+Cd1CNv1m4Dl0Ah2cDeJwi5wLnVbqAgunLhAYmDtxIOCVYMTBrP37UiNe/7QeFelyJfODsmMg1mx3WCykbXydC753WVoAlTg6nNoeeI9fmK+/tuLK+sx/KnYfTVGBXQYq39DyV/2o/IfCzEAKImlzFKGD8R13+ddu4B5UML+cby5KBvhTKIGaC5tKoe39z/31UPpy11/EHMCof2BUOzIgu5Hsv4OSNJlw3oRE31oOPn8xP4e7uWR8bRUhAgzN0Cn0ht+UfpemfGAXrp0M3IXQdc9L4azEFqxRhivMTLK/P6INay7IM+DJ30Ht2dWylGw/sxcRTqyNm3YomJQnXIO4xeqTSLulWr80FFHTys3JEDJYrcKvJmpwLFEAOZtwKsZ6ZShrOIA4LE5fgQtakH3ZLJG9a7jVSlMcNIfaSKgjdDQOe6CoRQL7KouA="
- on_success: never
-
-env:
- global:
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6b54d6..2305a9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,31 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [5.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.2...v5.4.0) (2022-12-27)
+
+
+### Features
+
+* add `rel="me"` to Mastodon sidebar contact links for verification ([#807](https://github.com/cotes2020/jekyll-theme-chirpy/issues/807)) ([d2190c7](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d2190c726f61c8c9732b88b4aecf699dc8bc7deb))
+* add embed video support ([ed6dc53](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ed6dc539eff7003a3765bcd8c31ae5e91a863d65))
+* add shimmer background when image loads ([ab16fdc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ab16fdc7fc26811130b98a1773beb62bff6182e8))
+* set preview image ratio to 1.91 : 1 ([4b6ccbc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf))
+* support dark and light mode images ([#481](https://github.com/cotes2020/jekyll-theme-chirpy/issues/481)) ([9306c7b](https://github.com/cotes2020/jekyll-theme-chirpy/commit/9306c7b39ecf9d9146bc1a25eebedc38eb2c3dd6))
+* support LQIP for images ([bffaf63](https://github.com/cotes2020/jekyll-theme-chirpy/commit/bffaf6374f265cec96ef743d42b46fbec3b59797))
+
+
+### Bug Fixes
+
+* `hreflang` tag attribute of feed misses `site.alt_lang` ([7651d28](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7651d2851b4bb7d8f0d068b62c036c89a1089bbc))
+* `og:image` will be incorrect if the image uses a cross-domain URL ([8de1abd](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8de1abda6be3633982392178731431b0ddb1b52b))
+* refactoring error when the image URL contains parameters ([ec98f07](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ec98f07aca0b80a9c07fbcdc8e0d7d66dba98ed2))
+* spaces in post title are encoded when sharing ([7efd2f8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7efd2f8aa2ea1c3aeb7d740bf9a018881c26fe65))
+
+
+### Improvements
+
+* **cdn:** optimize cache policy for static assets ([7fb0ee0](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7fb0ee0bedb63eee3f90a49c6d7fb8b5d78c9830))
+
## [5.3.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.1...v5.3.2) (2022-11-22)
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/README.md b/README.md
index 33f312b..11774ad 100644
--- a/README.md
+++ b/README.md
@@ -12,30 +12,31 @@
[**Live Demo →**](https://cotes2020.github.io/chirpy-demo)
- [![Devices Mockup](https://raw.githubusercontent.com/cotes2020/chirpy-images/main/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
+ [![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
## Features
-- Localized Layout
- Dark/Light Theme Mode
+- Localized UI language
- Pinned Posts
- Hierarchical Categories
-- Last Modified Date for Posts
+- Trending Tags
- Table of Contents
-- Auto-generated Related Posts
+- Last Modified Date of Posts
- Syntax Highlighting
- Mathematical Expressions
- Mermaid Diagram & Flowchart
+- Dark/Light Mode Images
+- Embed Videos
- Disqus/Utterances/Giscus Comments
- Search
- Atom Feeds
- Google Analytics
-- GA Pageviews Reporting
+- Page Views Reporting
- SEO & Performance Optimization
-
## Quick Start
Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed.
diff --git a/_config.yml b/_config.yml
index a43d2a5..81090d3 100644
--- a/_config.yml
+++ b/_config.yml
@@ -78,7 +78,7 @@ theme_mode: # [light|dark]
# will be added to all image (site avatar & posts' images) paths starting with '/'
#
# e.g. 'https://cdn.com'
-img_cdn: 'https://demo-img.cotes.page'
+img_cdn: 'https://chirpy-img.netlify.app'
# the avatar on sidebar, support local or CORS resources
avatar: '/commons/avatar.jpg'
diff --git a/_data/assets/cross_origin.yml b/_data/assets/cross_origin.yml
index a7d024e..a3a8dfb 100644
--- a/_data/assets/cross_origin.yml
+++ b/_data/assets/cross_origin.yml
@@ -16,47 +16,47 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:w
# Libraries
jquery:
- js: https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
+ js: https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js
bootstrap:
- css: https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css
- js: https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.bundle.min.js
+ css: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css
+ js: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js
bootstrap-toc:
css: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.css
js: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js
fontawesome:
- css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.1/css/all.min.css
search:
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
mermaid:
- js: https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.min.js
+ js: https://cdn.jsdelivr.net/npm/mermaid@9.2.2/dist/mermaid.min.js
dayjs:
js:
- common: https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js
- locale: https://cdn.jsdelivr.net/npm/dayjs@1/locale/:LOCALE.min.js
- relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.min.js
- localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/localizedFormat.min.js
+ common: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/dayjs.min.js
+ locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/locale/:LOCALE.min.js
+ relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/relativeTime.min.js
+ localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/localizedFormat.min.js
countup:
js: https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js
magnific-popup:
- css: https://cdn.jsdelivr.net/npm/magnific-popup@1/dist/magnific-popup.min.css
- js: https://cdn.jsdelivr.net/npm/magnific-popup@1/dist/jquery.magnific-popup.min.js
+ css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
+ js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
-lozad:
- js: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
+lazysizes:
+ js: https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js
clipboard:
- js: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
+ js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
polyfill:
js: https://polyfill.io/v3/polyfill.min.js?features=es6
mathjax:
- js: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js
+ js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js
diff --git a/_data/assets/self_host.yml b/_data/assets/self_host.yml
index b6410a4..817c78e 100644
--- a/_data/assets/self_host.yml
+++ b/_data/assets/self_host.yml
@@ -38,8 +38,8 @@ magnific-popup:
css: /assets/lib/magnific-popup-1.1.0/magnific-popup.css
js: /assets/lib/magnific-popup-1.1.0/jquery.magnific-popup.min.js
-lozad:
- js: /assets/lib/lozad-1.16.0/lozad.min.js
+lazysizes:
+ js: /assets/lib/lazysizes-5.3.2/lazysizes.min.js
clipboard:
js: /assets/lib/clipboard-2.0.9/clipboard.min.js
diff --git a/_data/contact.yml b/_data/contact.yml
index 05da2f2..a94e555 100644
--- a/_data/contact.yml
+++ b/_data/contact.yml
@@ -19,7 +19,7 @@
# -
# type: mastodon
# icon: 'fab fa-mastodon' # icons powered by