- Migrate theme persistence from `sessionStorage` to `localStorage`
- Rename theme HTML attribute to `data-bs-theme` for Bootstrap compatibility
- Trim and compile CSS according to the chosen theme mode
Previously, theme switch events were lost if triggered before the
Giscus iframe was fully loaded (e.g., when deferred by lazy loading
or before the client script executed). This resulted in Giscus
rendering with the outdated initial theme once it finally appeared
in the viewport.
This commit handles these edge cases by:
1. Updating the `data-theme` attribute on the Giscus script node
if the iframe hasn't been created yet.
2. Modifying the `theme` query parameter in the iframe's `src` URL
if it is currently in a pending/lazy-loading state.
- Use a common post-snippet for search results to avoid line break issues
- Reduce Jekyll include files to speed up the build
- Remove outdated key from search.json
- Modularized the Sass architecture to enhance code maintainability and reduce the output file size
- Replaced deprecated `@import` with `@use` / `@forward`
Close stale issues and PRs / stale (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Style Lint / stylelint (push) Has been cancelled
Lint Commit Messages / commitlint (push) Has been cancelled
Build and Deploy / build (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
- Ensure inline scripts execute after the DOM has fully loaded.
- Use Rollup to bundle the theme-mode and Mermaid scripts, reducing the number of Jekyll include snippets.
The `rollup-plugin-license` has been using too many deprecated dependencies, so it is necessary to remove it.
As an alternative, this changes uses Rollup `output.banner` to insert copyright information. Since `terser` runs after `output`, it is not possible to insert the Front Matter defining permlink for `sw.js` through the same way (Jekyll Front Matter is YAML rather than JS, which would cause errors with terser).
Therefore, _Jekyll Collection_ is now used to add permlink to `sw.js`, with the collection named `app`, and the directory placed in `_app`. This directory is not tracked by git, but it will be included when building the gem.