diff --git a/CHANGELOG.md b/CHANGELOG.md index ea9759a..c6b54d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,17 @@ 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.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.0...v5.3.1) (2022-10-25) +## [5.3.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.1...v5.3.2) (2022-11-22) + + +### Bug Fixes + +* `mermaid` occasionally fails to initialize ([#536](https://github.com/cotes2020/jekyll-theme-chirpy/issues/536)) ([48f14e3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/48f14e39ac81bbfb3b9913ea3ee789d775b2d1ae)) +* **comment:** disqus doesn't follow theme mode switching ([b0d5956](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b0d5956f5a0ed894984d6b1754efeba04d8bc966)) +* restore full-text search ([#741](https://github.com/cotes2020/jekyll-theme-chirpy/issues/741)) ([6774e0e](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6774e0e1fb37cf467b14be481347412713763f05)) +* the image URL in the SEO-related tags is incomplete ([#754](https://github.com/cotes2020/jekyll-theme-chirpy/issues/754)) ([f6e9a3f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f6e9a3fccf7ab34db71f8aefaf86fdcc05861076)) + +## [5.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.0...v5.3.1) (2022-10-25) ### Bug Fixes diff --git a/README.md b/README.md index 443f4b6..33f312b 100644 --- a/README.md +++ b/README.md @@ -102,4 +102,4 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy -[cn-donation]: https://cotes2020.github.io/sponsor/ +[cn-donation]: https://sponsor.cotes.page/ diff --git a/_config.yml b/_config.yml index 391f5dc..a43d2a5 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://raw.githubusercontent.com/cotes2020/chirpy-images/main' +img_cdn: 'https://demo-img.cotes.page' # 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 317354a..a7d024e 100644 --- a/_data/assets/cross_origin.yml +++ b/_data/assets/cross_origin.yml @@ -27,7 +27,7 @@ bootstrap-toc: 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@5.11.2/css/all.min.css + css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css search: js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js diff --git a/_data/assets/self_host.yml b/_data/assets/self_host.yml index 4649b56..b6410a4 100644 --- a/_data/assets/self_host.yml +++ b/_data/assets/self_host.yml @@ -16,7 +16,7 @@ bootstrap-toc: js: /assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js fontawesome: - css: /assets/lib/fontawesome-free-5.15.4/css/all.min.css + css: /assets/lib/fontawesome-free-6.2.1/css/all.min.css search: js: /assets/lib/simple-jekyll-search-1.10.0/simple-jekyll-search.min.js diff --git a/_includes/comments/disqus.html b/_includes/comments/disqus.html index 8b4e633..6174d31 100644 --- a/_includes/comments/disqus.html +++ b/_includes/comments/disqus.html @@ -15,7 +15,6 @@ }; /* Lazy loading */ - var disqus_observer = new IntersectionObserver(function (entries) { if(entries[0].isIntersecting) { (function () { @@ -32,23 +31,24 @@ disqus_observer.observe(document.querySelector('#disqus_thread')); /* Auto switch theme */ - function reloadDisqus() { - /* Disqus hasn't been loaded */ - if (typeof DISQUS === "undefined") { - return; - } + if (event.source === window && event.data && + event.data.direction === ModeToggle.ID) { + /* Disqus hasn't been loaded */ + if (typeof DISQUS === "undefined") { + return; + } - if (document.readyState == 'complete') { - DISQUS.reset({ reload: true, config: disqus_config }); + if (document.readyState == 'complete') { + DISQUS.reset({ reload: true, config: disqus_config }); + } } } const modeToggle = document.querySelector(".mode-toggle"); if (typeof modeToggle !== "undefined") { - /* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */ - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus); + window.addEventListener("message", reloadDisqus); } diff --git a/_includes/head.html b/_includes/head.html index 0947587..03ab48f 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -22,23 +22,22 @@ {% seo title=false %} {% endcapture %} - {% if site.img_cdn and seo_tags contains 'og:image' %} - {% assign properties = 'og:image,twitter:image' | split: ',' %} + {% if page.image %} + {% assign img = page.image.path | default: page.image %} + {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %} + {% capture target %}"{{ img | absolute_url }}"{% endcapture %} - {% for prop in properties %} - {% if site.img_cdn contains '//' %} - - {% capture target %} + {%- capture replacement -%} + "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}" + {%- endcapture -%} + {% endif %} - {% assign seo_tags = seo_tags | replace: target, replacement %} - - {% endfor %} + {% assign seo_tags = seo_tags | replace: target, replacement %} {% endif %} {{ seo_tags }} diff --git a/_includes/mermaid.html b/_includes/mermaid.html index e89a12e..2ec8029 100644 --- a/_includes/mermaid.html +++ b/_includes/mermaid.html @@ -5,10 +5,11 @@ diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index 89b9908..6535e91 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -107,13 +107,7 @@ {% if page.img_path %} - {% assign _path = page.img_path %} - {% assign last_char = _path | slice: -1 %} - - {% unless last_char == '/' %} - {% assign _path = _path | append: '/' %} - {% endunless %} - + {% assign _path = page.img_path | append: '/' | replace: '//', '/' %} {% assign _src_prefix = _src_prefix | append: _path %} {% endif %} diff --git a/_javascript/copyright b/_javascript/copyright index c8063f6..a45813d 100644 --- a/_javascript/copyright +++ b/_javascript/copyright @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/_layouts/post.html b/_layouts/post.html index 44de48a..18b0503 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -26,13 +26,13 @@ tail_includes: {% endif %} - {% if page.image.path %} + {% if page.image %} {% capture bg %} {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %} {% endcapture %}
- {{ page.image.alt | default: .github.io` on GitHub. +Furthermore, if you have committed `Gemfile.lock`{: .filepath} to the repository and your local machine is not Linux, go the the root directory of your site and update the platform list: + +```console +$ bundle lock --add-platform x86_64-linux +``` + Now publish your Jekyll site: 1. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar. Then, in the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu. diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index a258516..1b9b4f1 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -461,21 +461,24 @@ img[data-src] { } } - > ol, - > ul { - -webkit-padding-start: 1.75rem; - padding-inline-start: 1.75rem; + ol, + ul { + &:not([class]), + &.task-list { + -webkit-padding-start: 1.75rem; + padding-inline-start: 1.75rem; - li { - margin: 0.25rem 0; - padding-left: 0.25rem; - } + li { + margin: 0.25rem 0; + padding-left: 0.25rem; + } - ol, - ul { - -webkit-padding-start: 1rem; - padding-inline-start: 1rem; - margin: 0.5rem 0; + ol, + ul { + -webkit-padding-start: 1.25rem; + padding-inline-start: 1.25rem; + margin: 0.5rem 0; + } } } diff --git a/_sass/jekyll-theme-chirpy.scss b/_sass/jekyll-theme-chirpy.scss index 2e04785..e1c42bc 100644 --- a/_sass/jekyll-theme-chirpy.scss +++ b/_sass/jekyll-theme-chirpy.scss @@ -1,7 +1,7 @@ /*! * The styles for Jekyll theme Chirpy * - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 1a766d9..2601ed0 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -12,7 +12,9 @@ swcache: true "tags": {{ post.tags | join: ', ' | jsonify }}, "date": "{{ post.date }}", {% include no-linenos.html content=post.content %} - "snippet": {{ content | strip_html | strip_newlines | truncate: 200 | jsonify }} + {% assign _content = content | strip_html | strip_newlines %} + "snippet": {{ _content | truncate: 200 | jsonify }}, + "content": {{ _content | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} ] diff --git a/assets/js/dist/categories.min.js b/assets/js/dist/categories.min.js index 8001135..b9a7ded 100644 --- a/assets/js/dist/categories.min.js +++ b/assets/js/dist/categories.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/commons.min.js b/assets/js/dist/commons.min.js index 1bd2d6a..177faf0 100644 --- a/assets/js/dist/commons.min.js +++ b/assets/js/dist/commons.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/home.min.js b/assets/js/dist/home.min.js index c9c6649..7640e03 100644 --- a/assets/js/dist/home.min.js +++ b/assets/js/dist/home.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/misc.min.js b/assets/js/dist/misc.min.js index c9c6649..7640e03 100644 --- a/assets/js/dist/misc.min.js +++ b/assets/js/dist/misc.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/page.min.js b/assets/js/dist/page.min.js index b17eb2a..235b74f 100644 --- a/assets/js/dist/page.min.js +++ b/assets/js/dist/page.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/post.min.js b/assets/js/dist/post.min.js index 522afc9..815349c 100644 --- a/assets/js/dist/post.min.js +++ b/assets/js/dist/post.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/pvreport.min.js b/assets/js/dist/pvreport.min.js index 6dce45c..f64fa4e 100644 --- a/assets/js/dist/pvreport.min.js +++ b/assets/js/dist/pvreport.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/lib b/assets/lib index b2842d6..5d177b3 160000 --- a/assets/lib +++ b/assets/lib @@ -1 +1 @@ -Subproject commit b2842d6583088cb6b33ad50093a39a3e2cf2c026 +Subproject commit 5d177b3cbbea89e3392eb48c0ee580c6a0ce41d1 diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index 34c3590..b3c6a37 100644 --- a/jekyll-theme-chirpy.gemspec +++ b/jekyll-theme-chirpy.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-chirpy" - spec.version = "5.3.1" + spec.version = "5.3.2" spec.authors = ["Cotes Chung"] spec.email = ["cotes.chung@gmail.com"] diff --git a/package.json b/package.json index 8abb7ac..5cd163a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jekyll-theme-chirpy", - "version": "5.3.1", + "version": "5.3.2", "description": "A minimal, responsive, and powerful Jekyll theme for presenting professional writing.", "repository": { "type": "git", diff --git a/tools/release.sh b/tools/release.sh index 0f5d85f..b9cdfbc 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -104,6 +104,10 @@ check() { _bump_file() { for i in "${!FILES[@]}"; do + if [[ ${FILES[$i]} == $NODE_CONFIG ]]; then + continue + fi + sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${FILES[$i]}" done @@ -183,7 +187,10 @@ main() { fi fi - _version="$(grep '"version":' package.json | sed 's/.*: "//;s/".*//')" + # Change heading of Patch version to level 2 (a bug from `standard-version`) + sed -i "s/^### \[/## \[/g" CHANGELOG.md + + _version="$(grep '"version":' "$NODE_CONFIG" | sed 's/.*: "//;s/".*//')" echo -e "Bump version number to $_version\n" bump "$_version"