From 32051dad03cb8f60fa4206969377b9674f9a3f0c Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 22 Dec 2024 02:29:29 +0800 Subject: [PATCH 1/4] fix: toc not visible when switching from mobile to desktop mode (#2139) --- _javascript/modules/components/toc.js | 3 +++ _javascript/modules/components/toc/toc-desktop.js | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/_javascript/modules/components/toc.js b/_javascript/modules/components/toc.js index e9086eedf9a..dec814f5c05 100644 --- a/_javascript/modules/components/toc.js +++ b/_javascript/modules/components/toc.js @@ -27,6 +27,9 @@ function init() { mobile.init(); } + const $tocWrapper = document.getElementById('toc-wrapper'); + $tocWrapper.classList.remove('invisible'); + desktopMode.onchange = refresh; } diff --git a/_javascript/modules/components/toc/toc-desktop.js b/_javascript/modules/components/toc/toc-desktop.js index 0aaba48fcc7..ea4986bac79 100644 --- a/_javascript/modules/components/toc/toc-desktop.js +++ b/_javascript/modules/components/toc/toc-desktop.js @@ -15,11 +15,6 @@ export class TocDesktop { } static init() { - const $tocWrapper = document.getElementById('toc-wrapper'); - - if ($tocWrapper) { - tocbot.init(this.options); - $tocWrapper.classList.remove('invisible'); - } + tocbot.init(this.options); } } From 1b93f6db9bc3e0c0895fcac10905512f7aadb9a9 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 22 Dec 2024 02:32:03 +0800 Subject: [PATCH 2/4] docs: update the setting name for the comments --- _posts/2019-08-08-write-a-new-post.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index 69eaf34acbe..085e7d67bf4 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -97,7 +97,7 @@ toc: false ## Comments -The global switch of comments is defined by variable `comments.active` in the file `_config.yml`{: .filepath}. After selecting a comment system for this variable, comments will be turned on for all posts. +The global setting for comments is defined by the `comments.provider` option in the `_config.yml`{: .filepath} file. Once a comment system is selected for this variable, comments will be enabled for all posts. If you want to close the comment for a specific post, add the following to the **Front Matter** of the post: From 8a4d0bc4ee9e142a11401cad80bc9605878f121d Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 22 Dec 2024 03:11:20 +0800 Subject: [PATCH 3/4] fix(ui): left borderline of TOC is notched (#2140) --- _includes/toc.html | 2 +- _sass/pages/_post.scss | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/_includes/toc.html b/_includes/toc.html index 888466d275b..0f877267b39 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -3,7 +3,7 @@ {% if enable_toc %}
{% endif %} diff --git a/_sass/pages/_post.scss b/_sass/pages/_post.scss index 9b8fa7e6d75..12a301f5cde 100644 --- a/_sass/pages/_post.scss +++ b/_sass/pages/_post.scss @@ -272,12 +272,8 @@ header { padding-left: 0; li { - &:not(:last-child) { - margin: 0.4rem 0; - } - a { - padding: 0.2rem 0 0.2rem 1.25rem; + padding: 0.4rem 0 0.4rem 1.25rem; } } From 5e41d874b3b9f9b2a5f043858e824bd6a9fdd5a7 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 21 Dec 2024 19:22:22 +0000 Subject: [PATCH 4/4] chore(release): 7.2.4 ## [7.2.4](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.3...v7.2.4) (2024-12-21) ### Bug Fixes * toc not visible when switching from mobile to desktop mode ([#2139](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2139)) ([32051da](https://github.com/cotes2020/jekyll-theme-chirpy/commit/32051dad03cb8f60fa4206969377b9674f9a3f0c)) * **ui:** left borderline of TOC is notched ([#2140](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2140)) ([8a4d0bc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8a4d0bc4ee9e142a11401cad80bc9605878f121d)) --- docs/CHANGELOG.md | 7 +++++++ jekyll-theme-chirpy.gemspec | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 74fb88ad445..0cfa89bfa34 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [7.2.4](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.3...v7.2.4) (2024-12-21) + +### Bug Fixes + +* toc not visible when switching from mobile to desktop mode ([#2139](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2139)) ([32051da](https://github.com/cotes2020/jekyll-theme-chirpy/commit/32051dad03cb8f60fa4206969377b9674f9a3f0c)) +* **ui:** left borderline of TOC is notched ([#2140](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2140)) ([8a4d0bc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8a4d0bc4ee9e142a11401cad80bc9605878f121d)) + ## [7.2.3](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.2...v7.2.3) (2024-12-15) ### Bug Fixes diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index 3d7dc5c3b30..e3ad5d675b1 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 = "7.2.3" + spec.version = "7.2.4" spec.authors = ["Cotes Chung"] spec.email = ["cotes.chung@gmail.com"] diff --git a/package.json b/package.json index b786e349b33..3fc089c2ef3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jekyll-theme-chirpy", - "version": "7.2.3", + "version": "7.2.4", "description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.", "repository": { "type": "git",