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/_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.

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) => { 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 + }); + } } 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 6427099..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", @@ -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" } } 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',