From 6fec411c18ca5689c467c7b216ddeda02df23623 Mon Sep 17 00:00:00 2001 From: Song-Zi Vong Date: Wed, 22 Mar 2023 22:22:07 +0800 Subject: [PATCH 1/6] fix: mode-toggle leads to Disqus loading failure (#945) --- _includes/comments/disqus.html | 41 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/_includes/comments/disqus.html b/_includes/comments/disqus.html index 6174d31..d2f59df 100644 --- a/_includes/comments/disqus.html +++ b/_includes/comments/disqus.html @@ -1,41 +1,39 @@ - +
-

- Comments powered by Disqus. -

+

Comments powered by Disqus.

From bf199d779c6bc1f887780bd6abb6d70ed5511a1d Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 31 Mar 2023 03:46:02 +0800 Subject: [PATCH 2/6] chore(deps): upgrade npm packages --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6427099..2d5be33 100644 --- a/package.json +++ b/package.json @@ -21,15 +21,15 @@ "fixlint": "npm run test -- --fix" }, "devDependencies": { - "@babel/core": "^7.21.0", + "@babel/core": "^7.21.3", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/preset-env": "^7.20.2", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-terser": "^0.4.0", - "rimraf": "^4.4.0", - "rollup": "^3.19.1", + "rimraf": "^4.4.1", + "rollup": "^3.20.2", "rollup-plugin-license": "^3.0.1", - "stylelint": "^15.2.0", + "stylelint": "^15.3.0", "stylelint-config-standard-scss": "^7.0.1" } } From 6f97636fb9e3880b303d96f9f5c859728fbadead Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 31 Mar 2023 04:55:09 +0800 Subject: [PATCH 3/6] chore(build): set rollup watching path --- rollup.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rollup.config.js b/rollup.config.js index f662358..a0d063f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -16,6 +16,9 @@ function build(filename) { name: 'Chirpy', sourcemap: !isProd }, + watch: { + include: `${JS_SRC}/**` + }, plugins: [ babel({ babelHelpers: 'bundled', From 8b4f99c87f9a9227f47e84fb39d7b0f551d6f4dd Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 31 Mar 2023 04:58:21 +0800 Subject: [PATCH 4/6] fix: pageviews not updated immediately --- _javascript/modules/components/pageviews.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_javascript/modules/components/pageviews.js b/_javascript/modules/components/pageviews.js index 99e72ce..790fd95 100644 --- a/_javascript/modules/components/pageviews.js +++ b/_javascript/modules/components/pageviews.js @@ -193,8 +193,8 @@ function fetchProxyPageviews() { type: 'GET', url: PvOpts.getProxyMeta(), dataType: 'jsonp', - jsonpCallback: 'displayPageviews', success: (data) => { + displayPageviews(data); PvStorage.saveProxyCache(JSON.stringify(data)); }, error: (jqXHR, textStatus, errorThrown) => { From 8225174cb5e02fda7b3cc548ec821c876b0a5139 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 31 Mar 2023 05:05:33 +0800 Subject: [PATCH 5/6] fix(deps): `tocbot` has no initialization detection (#957) Resolves #957 --- _javascript/modules/components/toc.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/_javascript/modules/components/toc.js b/_javascript/modules/components/toc.js index ba0415d..dd46994 100644 --- a/_javascript/modules/components/toc.js +++ b/_javascript/modules/components/toc.js @@ -1,11 +1,13 @@ export function toc() { - // see: https://github.com/tscanlin/tocbot#usage - tocbot.init({ - tocSelector: '#toc', - contentSelector: '.post-content', - ignoreSelector: '[data-toc-skip]', - headingSelector: 'h2, h3', - orderedList: false, - scrollSmooth: false - }); + if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) { + // see: https://github.com/tscanlin/tocbot#usage + tocbot.init({ + tocSelector: '#toc', + contentSelector: '.post-content', + ignoreSelector: '[data-toc-skip]', + headingSelector: 'h2, h3', + orderedList: false, + scrollSmooth: false + }); + } } From c45f399e65fd481fd26e98cd4c711555cb5df69b Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 31 Mar 2023 05:46:34 +0800 Subject: [PATCH 6/6] chore(release): 5.6.1 --- CHANGELOG.md | 9 +++++++++ _sass/jekyll-theme-chirpy.scss | 2 +- jekyll-theme-chirpy.gemspec | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f0011..f667c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ 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.6.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.6.0...v5.6.1) (2023-03-30) + + +### Bug Fixes + +* **deps:** `tocbot` has no initialization detection ([#957](https://github.com/cotes2020/jekyll-theme-chirpy/issues/957)) ([8225174](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8225174cb5e02fda7b3cc548ec821c876b0a5139)) +* mode-toggle leads to Disqus loading failure ([#945](https://github.com/cotes2020/jekyll-theme-chirpy/issues/945)) ([6fec411](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6fec411c18ca5689c467c7b216ddeda02df23623)) +* pageviews not updated immediately ([8b4f99c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8b4f99c87f9a9227f47e84fb39d7b0f551d6f4dd)) + ## [5.6.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.2...v5.6.0) (2023-03-17) diff --git a/_sass/jekyll-theme-chirpy.scss b/_sass/jekyll-theme-chirpy.scss index 25e1a14..5716f9d 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.6.0 (https://github.com/cotes2020/jekyll-theme-chirpy) + * Chirpy v5.6.1 (https://github.com/cotes2020/jekyll-theme-chirpy) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index 1a98ecf..a5ee02f 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.6.0" + spec.version = "5.6.1" spec.authors = ["Cotes Chung"] spec.email = ["cotes.chung@gmail.com"] diff --git a/package.json b/package.json index 2d5be33..51c1ce1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jekyll-theme-chirpy", - "version": "5.6.0", + "version": "5.6.1", "description": "A minimal, responsive and feature-rich Jekyll theme for technical writing.", "repository": { "type": "git",