Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cotes2020/jekyll-theme-chirpy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.1
Choose a base ref
...
head repository: cotes2020/jekyll-theme-chirpy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.1.0
Choose a head ref

Commits on May 11, 2024

  1. Copy the full SHA
    90a4cc7 View commit details

Commits on May 18, 2024

  1. Copy the full SHA
    6cb1a5a View commit details
  2. feat: add Bluesky social links (#1759)

    jasontenpenny authored May 18, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0102aba View commit details

Commits on May 29, 2024

  1. docs: correct markdown syntax of tutorial (#1787)

    cotes2020 authored May 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    64ae7a3 View commit details

Commits on May 31, 2024

  1. refactor: restore shell script extensions

    Without an extension, the shell script configuration in `.gitattribute` will not work.
    cotes2020 committed May 31, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    1c5fa08 View commit details

Commits on Jun 3, 2024

  1. feat(dev): support vscode dev-container (#1781)

    cotes2020 authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1e3d4a6 View commit details
  2. build(deps-dev): bump the npm group across 1 directory with 8 updates

    Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/plugin-transform-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-properties), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env), [conventional-changelog-conventionalcommits](https://github.com/conventional-changelog/conventional-changelog/tree/HEAD/packages/conventional-changelog-conventionalcommits), [rollup](https://github.com/rollup/rollup), [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license), [semantic-release](https://github.com/semantic-release/semantic-release) and [stylelint](https://github.com/stylelint/stylelint) to permit the latest version.
    
    Updates `@babel/core` to 7.24.6
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.6/packages/babel-core)
    
    Updates `@babel/plugin-transform-class-properties` to 7.24.6
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.6/packages/babel-plugin-transform-class-properties)
    
    Updates `@babel/preset-env` to 7.24.6
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.6/packages/babel-preset-env)
    
    Updates `conventional-changelog-conventionalcommits` from 7.0.2 to 8.0.0
    - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases)
    - [Changelog](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/CHANGELOG.md)
    - [Commits](https://github.com/conventional-changelog/conventional-changelog/commits/conventional-changelog-conventionalcommits-v8.0.0/packages/conventional-changelog-conventionalcommits)
    
    Updates `rollup` to 4.18.0
    - [Release notes](https://github.com/rollup/rollup/releases)
    - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
    - [Commits](rollup/rollup@v4.17.2...v4.18.0)
    
    Updates `rollup-plugin-license` to 3.4.0
    - [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
    - [Commits](mjeanroy/rollup-plugin-license@v3.3.1...v3.4.0)
    
    Updates `semantic-release` from 23.1.1 to 24.0.0
    - [Release notes](https://github.com/semantic-release/semantic-release/releases)
    - [Commits](semantic-release/semantic-release@v23.1.1...v24.0.0)
    
    Updates `stylelint` to 16.6.1
    - [Release notes](https://github.com/stylelint/stylelint/releases)
    - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
    - [Commits](stylelint/stylelint@16.5.0...16.6.1)
    cotes2020 committed Jun 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    3b46629 View commit details

Commits on Jun 4, 2024

  1. build(deps): improve dependency grouping

    cotes2020 committed Jun 4, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    88b844c View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    250880c View commit details

Commits on Jun 5, 2024

  1. build(deps-dev): remove package rollup-plugin-license (#1796)

    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.
    cotes2020 authored Jun 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7ca9c59 View commit details

Commits on Jun 7, 2024

  1. chore: upgrade husky v9 settings

    cotes2020 committed Jun 7, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    cf853f1 View commit details
  2. build(devcontainer): add omz plugins & verify extension signature

    VSCode fixed signature validation hangs in v1.90
    cotes2020 committed Jun 7, 2024
    1

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    f1d3583 View commit details

Commits on Jun 16, 2024

  1. fix: adapt the giscus localization parameter (#1810)

    cotes2020 authored Jun 16, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0709854 View commit details

Commits on Jun 26, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    9ca7519 View commit details

Commits on Jun 30, 2024

  1. feat(ui): improve visibility of inline code (#1831)

    cotes2020 authored Jun 30, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c876731 View commit details

Commits on Jul 2, 2024

  1. chore: fix typos in project files and docs

    cotes2020 committed Jul 2, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    fbba0a4 View commit details

Commits on Jul 3, 2024

  1. refactor: fix typos in locale variable

    statment -> statement
    cotes2020 committed Jul 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    e6532ad View commit details
  2. build(deps-dev): bump the dev-deps group with 3 updates (#1824)

    Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/plugin-transform-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-properties) and [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) to permit the latest version.
    
    Updates `@babel/core` to 7.24.7
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-core)
    
    Updates `@babel/plugin-transform-class-properties` to 7.24.7
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-plugin-transform-class-properties)
    
    Updates `@babel/preset-env` to 7.24.7
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-preset-env)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      dependency-group: dev-deps
    - dependency-name: "@babel/plugin-transform-class-properties"
      dependency-type: direct:development
      dependency-group: dev-deps
    - dependency-name: "@babel/preset-env"
      dependency-type: direct:development
      dependency-group: dev-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    db9e58b View commit details
  3. feat(ui): make info-prompt icon looks like the letter "i" (#1835)

    cotes2020 authored Jul 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a07a57e View commit details

Commits on Jul 5, 2024

  1. feat: add Reddit social option (#1836)

    goodnightdaniel authored Jul 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8673e13 View commit details
  2. feat: add Threads social links (#1837)

    goodnightdaniel authored Jul 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e3a78b6 View commit details

Commits on Jul 10, 2024

  1. feat(dev): add vscode tasks (#1843)

    kungfux authored and cotes2020 committed Jul 10, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    e4db1a1 View commit details

Commits on Jul 11, 2024

  1. build(dev): support for running tasks in macOS

    cotes2020 committed Jul 11, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    8c30f0a View commit details

Commits on Jul 17, 2024

  1. fix: avoid caching pageviews data (#1849)

    kungfux authored Jul 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    979f86c View commit details
  2. ci: set node version to LTS

    There are some problems with the latest version.
    
    See: https://github.com/cotes2020/jekyll-theme-chirpy/actions/runs/9977150040
    cotes2020 committed Jul 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    b641b36 View commit details

Commits on Aug 18, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    5c5910f View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    35fdea0 View commit details
  3. build: update ruby version requirements

    `html-proofer` 5.x requires Ruby `>= 3.1, < 4.0`
    cotes2020 committed Aug 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    e347d06 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    23729c9 View commit details
  5. chore(tools): improve the init-script

    cotes2020 committed Aug 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    d74bfae View commit details

Commits on Aug 19, 2024

  1. refactor: improve the efficiency of GLightbox switching

    Repeatedly using `GLightbox.destroy()` (>= 4 times) will cause `GLightbox` to fail to generate new objects
    cotes2020 committed Aug 19, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    7f83c3d View commit details

Commits on Aug 21, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    efd2941 View commit details
  2. chore: remove duplicate config

    cotes2020 committed Aug 21, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    99eaf60 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    bf6c996 View commit details
  4. feat(analytics): add fathom analytics (#1913)

    juliusgb authored Aug 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    befc4ce View commit details

Commits on Aug 24, 2024

  1. feat(ui): improve block quote layout

    cotes2020 committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    80bd792 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    707a209 View commit details
  3. feat(ui): set <kbd> font to 'Lato'

    cotes2020 committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    64c7262 View commit details
  4. build(deps-dev): bump the dev-deps

    cotes2020 committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    8cfd721 View commit details
  5. build: upgrade dependencies

    cotes2020 committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    5f4dab1 View commit details

Commits on Aug 25, 2024

  1. refactor(ui): standardize the border radius (#1920)

    Impact:
    - Increase the border radius of inline code and `<kbd>` tags
    - Variable `$base-radius` renamed to `$radius-lg`
    cotes2020 authored Aug 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    31e19c6 View commit details
  2. chore(deps): correct Tocbot version number

    cotes2020 committed Aug 25, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    604e01e View commit details

Commits on Aug 26, 2024

  1. build: improve the JS build for PWA (#1923)

    cotes2020 authored Aug 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fc3d101 View commit details

Commits on Aug 27, 2024

  1. docs: update tutorial and readme

    Change Dev Containers logo in README:
    
    Simple Icons has removed all Microsoft icons due to copyright restrictions, see <simple-icons/simple-icons#11236>
    cotes2020 committed Aug 27, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    8b7dba7 View commit details
  2. Merge branch 'master' into production

    cotes2020 committed Aug 27, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    cotes2020 Cotes Chung
    Copy the full SHA
    a2bf5dc View commit details
  3. chore(release): 7.1.0

    ## [7.1.0](v7.0.1...v7.1.0) (2024-08-27)
    
    ### Features
    
    * add Bluesky social links ([#1759](#1759)) ([0102aba](0102aba))
    * add Reddit social option ([#1836](#1836)) ([8673e13](8673e13))
    * add Threads social links ([#1837](#1837)) ([e3a78b6](e3a78b6))
    * **analytics:** add fathom analytics ([#1913](#1913)) ([befc4ce](befc4ce))
    * **dev:** add vscode tasks ([#1843](#1843)) ([e4db1a1](e4db1a1))
    * **dev:** support vscode dev-container ([#1781](#1781)) ([1e3d4a6](1e3d4a6))
    * **ui:** improve block quote layout ([80bd792](80bd792))
    * **ui:** improve visibility of inline code ([#1831](#1831)) ([c876731](c876731))
    * **ui:** make `info-prompt` icon looks like the letter "i" ([#1835](#1835)) ([a07a57e](a07a57e))
    * **ui:** set `<kbd>` font to 'Lato' ([64c7262](64c7262))
    
    ### Bug Fixes
    
    * adapt the giscus localization parameter ([#1810](#1810)) ([0709854](0709854))
    * avoid caching pageviews data ([#1849](#1849)) ([979f86c](979f86c))
    * remove extra dual-mode images from lightbox ([#1883](#1883)) ([5c5910f](5c5910f))
    semantic-release-bot committed Aug 27, 2024
    Copy the full SHA
    a784f0a View commit details
Showing with 556 additions and 324 deletions.
  1. +29 −0 .devcontainer/devcontainer.json
  2. +18 −0 .devcontainer/post-create.sh
  3. +8 −5 .github/dependabot.yml
  4. +1 −1 .github/workflows/cd.yml
  5. +2 −2 .github/workflows/ci.yml
  6. +1 −1 .github/workflows/style-lint.yml
  7. +2 −1 .gitignore
  8. +1 −4 .husky/commit-msg
  9. +1 −11 .vscode/extensions.json
  10. +7 −4 .vscode/settings.json
  11. +64 −0 .vscode/tasks.json
  12. +7 −2 Gemfile
  13. +6 −5 README.md
  14. +14 −16 _config.yml
  15. +12 −0 _data/contact.yml
  16. +1 −1 _data/locales/ar.yml
  17. +1 −1 _data/locales/bg-BG.yml
  18. +1 −1 _data/locales/cs-CZ.yml
  19. +2 −2 _data/locales/de-DE.yml
  20. +1 −1 _data/locales/el-GR.yml
  21. +1 −1 _data/locales/en.yml
  22. +1 −1 _data/locales/es-ES.yml
  23. +1 −1 _data/locales/fi-FI.yml
  24. +1 −1 _data/locales/fr-FR.yml
  25. +1 −1 _data/locales/hu-HU.yml
  26. +1 −1 _data/locales/id-ID.yml
  27. +1 −1 _data/locales/it-IT.yml
  28. +1 −1 _data/locales/ko-KR.yml
  29. +1 −1 _data/locales/my-MM.yml
  30. +1 −1 _data/locales/pt-BR.yml
  31. +2 −2 _data/locales/ru-RU.yml
  32. +1 −1 _data/locales/sl-SI.yml
  33. +1 −1 _data/locales/sv-SE.yml
  34. +1 −1 _data/locales/th.yml
  35. +1 −1 _data/locales/tr-TR.yml
  36. +1 −1 _data/locales/uk-UA.yml
  37. +1 −1 _data/locales/vi-VN.yml
  38. +1 −1 _data/locales/zh-CN.yml
  39. +1 −1 _data/locales/zh-TW.yml
  40. +3 −3 _data/origin/basic.yml
  41. +8 −8 _data/origin/cors.yml
  42. +12 −0 _data/share.yml
  43. +7 −0 _includes/analytics/fathom.html
  44. +7 −1 _includes/comments/giscus.html
  45. +3 −4 _includes/js-selector.html
  46. +0 −1 _javascript/_copyright
  47. +48 −3 _javascript/modules/components/img-popup.js
  48. +1 −1 _javascript/modules/components/search-display.js
  49. +0 −3 _javascript/pwa/_frontmatter
  50. +14 −2 _javascript/pwa/sw.js
  51. +4 −4 _posts/2019-08-08-text-and-typography.md
  52. +7 −9 _posts/2019-08-08-write-a-new-post.md
  53. +72 −59 _posts/2019-08-09-getting-started.md
  54. +32 −22 _sass/addon/commons.scss
  55. +7 −14 _sass/addon/module.scss
  56. +5 −5 _sass/addon/syntax.scss
  57. +2 −1 _sass/addon/variables.scss
  58. +1 −1 _sass/colors/syntax-dark.scss
  59. +1 −5 _sass/colors/syntax-light.scss
  60. +7 −7 _sass/colors/typography-dark.scss
  61. +9 −9 _sass/colors/typography-light.scss
  62. +1 −1 _sass/layout/categories.scss
  63. +2 −2 _sass/layout/home.scss
  64. +2 −2 _sass/layout/post.scss
  65. +1 −1 assets/404.html
  66. +18 −8 assets/js/data/swconf.js
  67. +1 −1 assets/lib
  68. +21 −0 docs/CHANGELOG.md
  69. +2 −2 jekyll-theme-chirpy.gemspec
  70. +15 −14 package.json
  71. +34 −32 rollup.config.js
  72. +4 −4 tools/{init → init.sh}
  73. +1 −16 tools/{release → release.sh}
  74. +4 −0 tools/{run → run.sh}
  75. +1 −1 tools/{test → test.sh}
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Shell
"timonwong.shellcheck",
"mkhl.shfmt",
// Common formatter
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one",
// Git
"mhutchie.git-graph"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

if [ -f package.json ]; then
bash -i -c "nvm install --lts && nvm install-latest-npm"
npm i
npm run build
fi

# Install dependencies for shfmt extension
curl -sS https://webi.sh/shfmt | sh &>/dev/null

# Add OMZ plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc

# Avoid git log use less
echo -e "\nunset LESS" >>~/.zshrc
13 changes: 8 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -8,11 +8,10 @@ updates:
directory: "/"
versioning-strategy: increase
groups:
npm:
update-types:
- "major"
- "minor"
- "patch"
prod-deps:
dependency-type: production
dev-deps:
dependency-type: development
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
@@ -23,3 +22,7 @@ updates:
- "major"
schedule:
interval: "weekly"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*

- run: npm install
- run: npx semantic-release
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -36,10 +36,10 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*

- name: Build Assets
run: npm i && npm run build

- name: Test Site
run: bash tools/test
run: bash tools/test.sh
2 changes: 1 addition & 1 deletion .github/workflows/style-lint.yml
Original file line number Diff line number Diff line change
@@ -18,6 +18,6 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*
- run: npm i
- run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -17,9 +17,10 @@ package-lock.json

# IDE configurations
.idea
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/tasks.json

# Misc
_sass/dist
5 changes: 1 addition & 4 deletions .husky/commit-msg
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
npx --no -- commitlint --edit $1
12 changes: 1 addition & 11 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
{
"recommendations": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Common formatter
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one"
]
"recommendations": ["ms-vscode-remote.remote-containers"]
}
11 changes: 7 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.trailingComma": "none",
// Shopify Liquid
"files.associations": {
"*.html": "liquid"
@@ -15,13 +14,17 @@
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
"editor.defaultFormatter": "mkhl.shfmt"
},
// Disable vscode built-in stylelint
"css.validate": false,
"scss.validate": false,
"less.validate": false,
// Stylint extension settings
"stylelint.snippet": ["css", "less", "postcss", "scss"],
"stylelint.validate": ["css", "less", "postcss", "scss"]
"stylelint.snippet": ["css", "scss"],
"stylelint.validate": ["css", "scss"],
// Run tasks in macOS
"terminal.integrated.profiles.osx": {
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
}
}
64 changes: 64 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Jekyll Server",
"type": "shell",
"command": "./tools/run.sh",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "Runs the Jekyll server with live reload."
},
{
"label": "Build Jekyll Site",
"type": "shell",
"command": "./tools/test.sh",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build the Jekyll site for production."
},
{
"label": "Build JS (watch)",
"type": "shell",
"command": "npm run watch:js",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build JS files in watch mode."
},
{
"label": "Build CSS",
"type": "shell",
"command": "npm run build:css",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build CSS files."
},
{
"label": "Build JS & CSS",
"type": "shell",
"command": "npm run build",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build JS & CSS for production."
},
{
"label": "Run Jekyll Server + Build JS (watch)",
"dependsOn": ["Run Jekyll Server", "Build JS (watch)"],
"group": {
"kind": "build"
},
"detail": "Runs both the Jekyll server with live reload and build JS files in watch mode."
}
]
}
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -4,6 +4,11 @@ source "https://rubygems.org"

gemspec

group :test do
gem "html-proofer", "~> 5.0"
gem "html-proofer", "~> 5.0", group: :test

platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@

A minimal, responsive, and feature-rich Jekyll theme for technical writing.

[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)][gem]&nbsp;
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]&nbsp;
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]&nbsp;
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]&nbsp;
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
[![CI](https://img.shields.io/github/actions/workflow/status/cotes2020/jekyll-theme-chirpy/ci.yml?logo=github)][ci]&nbsp;
[![Codacy Badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy]&nbsp;
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy?color=goldenrod)][license]&nbsp;
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?&logo=RubyGems&logoColor=ghostwhite&label=gem&color=orange)][gem]&nbsp;
[![Open in Dev Containers](https://img.shields.io/badge/Dev_Containers-Open-deepskyblue?logo=linuxcontainers)][open-container]

[**Live Demo**][demo]

@@ -72,6 +72,7 @@ This project is published under [MIT License][license].
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
[open-container]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/cotes2020/jekyll-theme-chirpy
[jekyllrb]: https://jekyllrb.com/
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[demo]: https://cotes2020.github.io/chirpy-demo/
30 changes: 14 additions & 16 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -16,20 +16,20 @@ timezone: Asia/Shanghai

title: Chirpy # the main title

tagline: A text-focused Jekyll theme # it will display as the sub-title
tagline: A text-focused Jekyll theme # it will display as the subtitle

description: >- # used by seo meta and the atom feed
A minimal, responsive and feature-rich Jekyll theme for technical writing.
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
# E.g. 'https://username.github.io', note that it does not end with a '/'.
url: ""

github:
username: github_username # change to your github username
username: github_username # change to your GitHub username

twitter:
username: twitter_username # change to your twitter username
username: twitter_username # change to your Twitter username

social:
# Change to your full name.
@@ -38,8 +38,8 @@ social:
email: example@domain.com # change to your email address
links:
# The first element serves as the copyright owner's link
- https://twitter.com/username # change to your twitter homepage
- https://github.com/username # change to your github homepage
- https://twitter.com/username # change to your Twitter homepage
- https://github.com/username # change to your GitHub homepage
# Uncomment below to add more social links
# - https://www.facebook.com/username
# - https://www.linkedin.com/in/username
@@ -70,8 +70,10 @@ analytics:
domain: # fill in your Matomo domain
cloudflare:
id: # fill in your Cloudflare Web Analytics token
fathom:
id: # fill in your Fathom Site ID

# Pageviews settings
# Page views settings
pageviews:
provider: # now only supports 'goatcounter'

@@ -83,8 +85,8 @@ pageviews:
#
# Available options:
#
# light - Use the light color scheme
# dark - Use the dark color scheme
# light Use the light color scheme
# dark Use the dark color scheme
#
theme_mode: # [light | dark]

@@ -106,7 +108,7 @@ social_preview_image: # string, local or CORS resources
toc: true

comments:
# Global switch for the post comment system. Keeping it empty means disabled.
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
# The provider options are as follows:
disqus:
@@ -136,9 +138,9 @@ assets:
env: # [development | production]

pwa:
enabled: true # the option for PWA feature (installable)
enabled: true # The option for PWA feature (installable)
cache:
enabled: true # the option for PWA offline cache
enabled: true # The option for PWA offline cache
# Paths defined here will be excluded from the PWA cache.
# Usually its value is the `baseurl` of another website that
# shares the same domain name as the current website.
@@ -190,10 +192,6 @@ defaults:
values:
layout: page
permalink: /:title/
- scope:
path: assets/js/dist
values:
swcache: true

sass:
style: compressed
12 changes: 12 additions & 0 deletions _data/contact.yml
Original file line number Diff line number Diff line change
@@ -26,3 +26,15 @@
# - type: stack-overflow
# icon: 'fab fa-stack-overflow'
# url: '' # Fill with your stackoverflow homepage
#
# - type: bluesky
# icon: 'fa-brands fa-bluesky'
# url: '' # Fill with your Bluesky profile link
#
# - type: reddit
# icon: 'fa-brands fa-reddit'
# url: '' # Fill with your Reddit profile link
#
# - type: threads
# icon: 'fa-brands fa-threads'
# url: '' # Fill with your Threads profile link
2 changes: 1 addition & 1 deletion _data/locales/ar.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: باستخدام :PLATFORM السمة :THEME

not_found:
statment: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.
statement: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.

notification:
update_found: يتوفر اصدار جديد للمحتوى.
2 changes: 1 addition & 1 deletion _data/locales/bg-BG.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Създадено чрез :PLATFORM и :THEME тема

not_found:
statment: Съжалявам, но на този URL адрес няма налично съдържание.
statement: Съжалявам, но на този URL адрес няма налично съдържание.

notification:
update_found: Налична е нова версия на съдържанието.
2 changes: 1 addition & 1 deletion _data/locales/cs-CZ.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Použití :PLATFORM s motivem :THEME

not_found:
statment: Omlouváme se, adresu URL jsme špatně umístili nebo odkazuje na něco, co neexistuje.
statement: Omlouváme se, adresu URL jsme špatně umístili nebo odkazuje na něco, co neexistuje.

notification:
update_found: Je k dispozici nová verze obsahu.
4 changes: 2 additions & 2 deletions _data/locales/de-DE.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: Powered by :PLATFORM with :THEME theme

not_found:
statment: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.
statement: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.

notification:
update_found: Eine neue Version ist verfügbar.
@@ -76,7 +76,7 @@ df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"

# categories page
categories:
category_measure:
2 changes: 1 addition & 1 deletion _data/locales/el-GR.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Αξιοποιώντας την :PLATFORM theme :THEME

not_found:
statment: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει.
statement: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει.

notification:
update_found: Υπάρχει διαθέσιμη μια νέα έκδοση του περιεχομένου.
2 changes: 1 addition & 1 deletion _data/locales/en.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Using the :THEME theme for :PLATFORM.

not_found:
statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
statement: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.

notification:
update_found: A new version of content is available.
2 changes: 1 addition & 1 deletion _data/locales/es-ES.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Hecho con :PLATFORM usando el tema :THEME

not_found:
statment: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe.
statement: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe.

notification:
update_found: Hay una nueva versión de contenido disponible.
2 changes: 1 addition & 1 deletion _data/locales/fi-FI.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: Käytetään :PLATFORM iä Teema :THEME

not_found:
statment: Valitettavasti tällä URL-osoitteella ei ole saatavilla sisältöä.
statement: Valitettavasti tällä URL-osoitteella ei ole saatavilla sisältöä.

notification:
update_found: Uusi versio sisällöstä on saatavilla.
2 changes: 1 addition & 1 deletion _data/locales/fr-FR.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Propulsé par :PLATFORM avec le thème :THEME

not_found:
statment: Désolé, nous avons égaré cette URL ou elle pointe vers quelque chose qui n'existe pas.
statement: Désolé, nous avons égaré cette URL ou elle pointe vers quelque chose qui n'existe pas.

notification:
update_found: Une nouvelle version du contenu est disponible.
2 changes: 1 addition & 1 deletion _data/locales/hu-HU.yml
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ copyright:
meta: Készítve :PLATFORM motorral :THEME témával

not_found:
statment: Sajnáljuk, az URL-t rosszul helyeztük el, vagy valami nem létezőre mutat.
statement: Sajnáljuk, az URL-t rosszul helyeztük el, vagy valami nem létezőre mutat.

notification:
update_found: Elérhető a tartalom új verziója.
2 changes: 1 addition & 1 deletion _data/locales/id-ID.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Didukung oleh :PLATFORM dengan tema :THEME

not_found:
statment: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada.
statement: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada.

notification:
update_found: Versi konten baru tersedia.
2 changes: 1 addition & 1 deletion _data/locales/it-IT.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: Servizio offerto da :PLATFORM con tema :THEME
not_found:
statment: Ci scusiamo, non è stato possibile trovare l'URL in questione. Potrebbe puntare ad una pagina non esistente.
statement: Ci scusiamo, non è stato possibile trovare l'URL in questione. Potrebbe puntare ad una pagina non esistente.

notification:
update_found: Nuova versione del contenuto disponibile.
2 changes: 1 addition & 1 deletion _data/locales/ko-KR.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Powered by :PLATFORM with :THEME theme

not_found:
statment: 해당 URL은 존재하지 않습니다.
statement: 해당 URL은 존재하지 않습니다.

notification:
update_found: 새 버전의 콘텐츠를 사용할 수 있습니다.
2 changes: 1 addition & 1 deletion _data/locales/my-MM.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Powered by :PLATFORM with :THEME theme

not_found:
statment: ဝမ်းနည်းပါသည်၊ ကျွန်ုပ်တို့သည် အဆိုပါ URL ကို မှားယွင်းစွာ နေရာချထားခြင်း သို့မဟုတ် ၎င်းသည် မရှိသောအရာကို ညွှန်ပြနေပါသည်။
statement: ဝမ်းနည်းပါသည်၊ ကျွန်ုပ်တို့သည် အဆိုပါ URL ကို မှားယွင်းစွာ နေရာချထားခြင်း သို့မဟုတ် ၎င်းသည် မရှိသောအရာကို ညွှန်ပြနေပါသည်။

notification:
update_found: အကြောင်းအရာဗားရှင်းအသစ်ကို ရနိုင်ပါပြီ။
2 changes: 1 addition & 1 deletion _data/locales/pt-BR.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Feito com :PLATFORM usando o tema :THEME

not_found:
statment: Desculpe, a página não foi encontrada.
statement: Desculpe, a página não foi encontrada.

notification:
update_found: Uma nova versão do conteúdo está disponível.
4 changes: 2 additions & 2 deletions _data/locales/ru-RU.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: Использует тему :THEME для :PLATFORM

not_found:
statment: Извините, мы перепутали URL-адрес или он указывает на что-то несуществующее.
statement: Извините, мы перепутали URL-адрес или он указывает на что-то несуществующее.

notification:
update_found: Доступна новая версия контента.
@@ -76,7 +76,7 @@ df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"

# categories page
categories:
category_measure:
2 changes: 1 addition & 1 deletion _data/locales/sl-SI.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Uporabljena :PLATFORM tema :THEME #Using the :PLATFORM theme :THEME

not_found:
statment: Oprostite, hiperpovezava je neustrezna ali vsebina ne obstajata. #Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
statement: Oprostite, hiperpovezava je neustrezna ali vsebina ne obstajata. #Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.

notification:
update_found: Novejša različica vsebine je na voljo. #A new version of content is available.
2 changes: 1 addition & 1 deletion _data/locales/sv-SE.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Byggd med :PLATFORM och temat :THEME

not_found:
statment: Ursäkta, vi har tappat bort den här webbadressen eller så pekar den på något som inte längre finns.
statement: Ursäkta, vi har tappat bort den här webbadressen eller så pekar den på något som inte längre finns.

notification:
update_found: Det finns en ny version av innehållet.
2 changes: 1 addition & 1 deletion _data/locales/th.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: กำลังใช้ธีมของ :PLATFORM ชื่อ :THEME

not_found:
statment: ขออภัย เราวาง URL นั้นไว้ผิดที่ หรือมันชี้ไปยังสิ่งที่ไม่มีอยู่
statement: ขออภัย เราวาง URL นั้นไว้ผิดที่ หรือมันชี้ไปยังสิ่งที่ไม่มีอยู่

notification:
update_found: มีเวอร์ชันใหม่ของเนื้อหา
2 changes: 1 addition & 1 deletion _data/locales/tr-TR.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: :PLATFORM ve :THEME teması

not_found:
statment: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor.
statement: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor.

notification:
update_found: İçeriğin yeni bir sürümü mevcut.
2 changes: 1 addition & 1 deletion _data/locales/uk-UA.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ copyright:
meta: Powered by :PLATFORM with :THEME theme

not_found:
statment: Вибачте, це посилання вказує на ресурс, що не існує.
statement: Вибачте, це посилання вказує на ресурс, що не існує.

notification:
update_found: Доступна нова версія вмісту.
2 changes: 1 addition & 1 deletion _data/locales/vi-VN.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME

not_found:
statment: Xin lỗi, chúng tôi đã đặt nhầm URL hoặc đường dẫn trỏ đến một trang nào đó không tồn tại.
statement: Xin lỗi, chúng tôi đã đặt nhầm URL hoặc đường dẫn trỏ đến một trang nào đó không tồn tại.

notification:
update_found: Đã có phiên bản mới của nội dung.
2 changes: 1 addition & 1 deletion _data/locales/zh-CN.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: 本站采用 :PLATFORM 主题 :THEME

not_found:
statment: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。
statement: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。

notification:
update_found: 发现新版本的内容。
2 changes: 1 addition & 1 deletion _data/locales/zh-TW.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ copyright:
meta: 本網站使用 :PLATFORM 產生,採用 :THEME 主題

not_found:
statment: 抱歉,您可能正在存取一個已被移動的 URL,或者它從未存在。
statement: 抱歉,您可能正在存取一個已被移動的 URL,或者它從未存在。

notification:
update_found: 發現新版本更新。
6 changes: 3 additions & 3 deletions _data/origin/basic.yml
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ mermaid:
dayjs:
js:
common: /assets/lib/dayjs/dayjs.min.js
locale: /assets/lib/dayjs/locale/en.min.js
relativeTime: /assets/lib/dayjs/plugin/relativeTime.min.js
localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.min.js
locale: /assets/lib/dayjs/locale/en.js
relativeTime: /assets/lib/dayjs/plugin/relativeTime.js
localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.js

glightbox:
css: /assets/lib/glightbox/glightbox.min.css
16 changes: 8 additions & 8 deletions _data/origin/cors.yml
Original file line number Diff line number Diff line change
@@ -20,24 +20,24 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato:wght@300;400&family=Sour
# Libraries

toc:
css: https://cdn.jsdelivr.net/npm/tocbot@4.27.20/dist/tocbot.min.css
js: https://cdn.jsdelivr.net/npm/tocbot@4.27.20/dist/tocbot.min.js
css: https://cdn.jsdelivr.net/npm/tocbot@4.29.0/dist/tocbot.min.css
js: https://cdn.jsdelivr.net/npm/tocbot@4.29.0/dist/tocbot.min.js

fontawesome:
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/all.min.css

search:
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js

mermaid:
js: https://cdn.jsdelivr.net/npm/mermaid@10.9.0/dist/mermaid.min.js
js: https://cdn.jsdelivr.net/npm/mermaid@11.0.2/dist/mermaid.min.js

dayjs:
js:
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/dayjs.min.js
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/locale/:LOCALE.min.js
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/plugin/relativeTime.min.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/plugin/localizedFormat.min.js
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/dayjs.min.js
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/locale/:LOCALE.js
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/plugin/relativeTime.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/plugin/localizedFormat.js

glightbox:
css: https://cdn.jsdelivr.net/npm/glightbox@3.3.0/dist/css/glightbox.min.css
12 changes: 12 additions & 0 deletions _data/share.yml
Original file line number Diff line number Diff line change
@@ -36,3 +36,15 @@ platforms:
# link: "https://fosstodon.org/"
# - label: photog.social
# link: "https://photog.social/"
#
# - type: Bluesky
# icon: "fa-brands fa-bluesky"
# link: "https://bsky.app/intent/compose?text=TITLE%20URL"
#
# - type: Reddit
# icon: "fa-brands fa-square-reddit"
# link: "https://www.reddit.com/submit?url=URL&title=TITLE"
#
# - type: Threads
# icon: "fa-brands fa-square-threads"
# link: "https://www.threads.net/intent/post?text=TITLE%20URL"
7 changes: 7 additions & 0 deletions _includes/analytics/fathom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- Fathom -->
<script
src="https://cdn.usefathom.com/script.js"
data-site="{{ site.analytics.fathom.id }}"
defer>
</script>
<!-- End Fathom Code -->
8 changes: 7 additions & 1 deletion _includes/comments/giscus.html
Original file line number Diff line number Diff line change
@@ -17,6 +17,12 @@
initTheme = darkTheme;
}

let lang = '{{ site.comments.giscus.lang | default: lang }}';
{%- comment -%} https://github.com/giscus/giscus/tree/main/locales {%- endcomment -%}
if (lang.length > 2 && !lang.startsWith('zh')) {
lang = lang.slice(0, 2);
}

let giscusAttributes = {
src: 'https://giscus.app/client.js',
'data-repo': '{{ site.comments.giscus.repo}}',
@@ -29,7 +35,7 @@
'data-emit-metadata': '0',
'data-theme': initTheme,
'data-input-position': '{{ site.comments.giscus.input_position | default: 'bottom' }}',
'data-lang': '{{ site.comments.giscus.lang | default: lang }}',
'data-lang': lang,
'data-loading': 'lazy',
crossorigin: 'anonymous',
async: ''
7 changes: 3 additions & 4 deletions _includes/js-selector.html
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@

<!-- layout specified -->

{% assign js_dist = '/assets/js/dist/' %}

{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
{% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %}

@@ -62,7 +60,8 @@
{% assign js = 'commons' %}
{% endcase %}

{% capture script %}{{ js_dist }}{{ js }}.min.js{% endcapture %}
{% capture script %}/assets/js/dist/{{ js }}.min.js{% endcapture %}

<script src="{{ script | relative_url }}"></script>

{% if page.math %}
@@ -93,7 +92,7 @@
{% if jekyll.environment == 'production' %}
<!-- PWA -->
{% if site.pwa.enabled %}
<script defer src="{{ 'app.min.js' | prepend: js_dist | relative_url }}"></script>
<script defer src="{{ 'app.min.js' | relative_url }}"></script>
{% endif %}

<!-- Web Analytics -->
1 change: 0 additions & 1 deletion _javascript/_copyright

This file was deleted.

51 changes: 48 additions & 3 deletions _javascript/modules/components/img-popup.js
Original file line number Diff line number Diff line change
@@ -4,12 +4,57 @@
* Dependencies: https://github.com/biati-digital/glightbox
*/

const IMG_CLASS = 'popup';
const html = document.documentElement;
const lightImages = '.popup:not(.dark)';
const darkImages = '.popup:not(.light)';
let selector = lightImages;

function updateImages(current, reverse) {
if (selector === lightImages) {
selector = darkImages;
} else {
selector = lightImages;
}

if (reverse === null) {
reverse = GLightbox({ selector: `${selector}` });
}

[current, reverse] = [reverse, current];
}

export function imgPopup() {
if (document.getElementsByClassName(IMG_CLASS).length === 0) {
if (document.querySelector('.popup') === null) {
return;
}

GLightbox({ selector: `.${IMG_CLASS}` });
const hasDualImages = !(
document.querySelector('.popup.light') === null &&
document.querySelector('.popup.dark') === null
);

if (
(html.hasAttribute('data-mode') &&
html.getAttribute('data-mode') === 'dark') ||
(!html.hasAttribute('data-mode') &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
selector = darkImages;
}

let current = GLightbox({ selector: `${selector}` });

if (hasDualImages && document.getElementById('mode-toggle')) {
let reverse = null;

window.addEventListener('message', (event) => {
if (
event.source === window &&
event.data &&
event.data.direction === ModeToggle.ID
) {
updateImages(current, reverse);
}
});
}
}
2 changes: 1 addition & 1 deletion _javascript/modules/components/search-display.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This script make #search-result-wrapper switch to unloaded or shown automatically.
* This script make #search-result-wrapper switch to unload or shown automatically.
*/

const btnSbTrigger = document.getElementById('sidebar-trigger');
3 changes: 0 additions & 3 deletions _javascript/pwa/_frontmatter

This file was deleted.

16 changes: 14 additions & 2 deletions _javascript/pwa/sw.js
Original file line number Diff line number Diff line change
@@ -3,11 +3,23 @@ import { baseurl } from '../../_config.yml';
importScripts(`${baseurl}/assets/js/data/swconf.js`);

const purge = swconf.purge;
const interceptor = swconf.interceptor;

function verifyUrl(url) {
const requestPath = new URL(url).pathname;
const requestUrl = new URL(url);
const requestPath = requestUrl.pathname;

for (const path of swconf.denyPaths) {
if (!requestUrl.protocol.startsWith('http')) {
return false;
}

for (const prefix of interceptor.urlPrefixes) {
if (requestUrl.href.startsWith(prefix)) {
return false;
}
}

for (const path of interceptor.paths) {
if (requestPath.startsWith(path)) {
return false;
}
8 changes: 4 additions & 4 deletions _posts/2019-08-08-text-and-typography.md
Original file line number Diff line number Diff line change
@@ -18,16 +18,16 @@ image:

<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
# H1 - heading
# H1 heading
{: .mt-4 .mb-0 }

## H2 - heading
## H2 heading
{: data-toc-skip='' .mt-4 .mb-0 }

### H3 - heading
### H3 heading
{: data-toc-skip='' .mt-4 .mb-0 }

#### H4 - heading
#### H4 heading
{: data-toc-skip='' .mt-4 }
<!-- markdownlint-restore -->

16 changes: 7 additions & 9 deletions _posts/2019-08-08-write-a-new-post.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ tags: [TAG] # TAG names should always be lowercase

### Timezone of Date

In order to accurately record the release date of a post, you should not only set up the `timezone` of `_config.yml`{: .filepath} but also provide the post's timezone in variable `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.
To accurately record the release date of a post, you should not only set up the `timezone` of `_config.yml`{: .filepath} but also provide the post's timezone in variable `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.

### Categories and Tags

@@ -147,7 +147,7 @@ _Image Caption_

#### Size

In order to prevent the page content layout from shifting when the image is loaded, we should set the width and height for each image.
To prevent the page content layout from shifting when the image is loaded, we should set the width and height for each image.

```markdown
![Desktop View](/assets/img/sample/mockup.png){: width="700" height="400" }
@@ -284,7 +284,7 @@ If you want to embed a video file directly, use the following syntax:
{% include embed/video.html src='{URL}' %}
```

Where `URL` is an URL to a video file e.g. `/path/to/sample/video.mp4`.
Where `URL` is a URL to a video file e.g. `/path/to/sample/video.mp4`.

You can also specify additional attributes for the embedded video file. Here is a full list of attributes allowed.

@@ -295,7 +295,7 @@ You can also specify additional attributes for the embedded video file. Here is
- `muted=true` — audio will be initially silenced
- `types` — specify the extensions of additional video formats separated by `|`. Ensure these files exist in the same directory as your primary video file.

Consider an example utilizing all of the above:
Consider an example using all of the above:

```liquid
{%
@@ -318,14 +318,14 @@ If you want to embed an audio file directly, use the following syntax:
{% include embed/audio.html src='{URL}' %}
```

Where `URL` is an URL to an audio file e.g. `/path/to/audio.mp3`.
Where `URL` is a URL to an audio file e.g. `/path/to/audio.mp3`.

You can also specify additional attributes for the embedded audio file. Here is a full list of attributes allowed.

- `title='Text'` — title for an audio that appears below the audio and looks same as for images
- `types` — specify the extensions of additional audio formats separated by `|`. Ensure these files exist in the same directory as your primary audio file.

Consider an example utilizing all of the above:
Consider an example using all of the above:

```liquid
{%
@@ -365,7 +365,7 @@ There are several types of prompts: `tip`, `info`, `warning`, and `danger`. They
```
{: .nolineno }

### Filepath Hightlight
### Filepath Highlight

```md
`/path/to/a/file.extend`{: .filepath}
@@ -433,8 +433,6 @@ If you want to display the **Liquid** snippet, surround the liquid code with `{%

Or adding `render_with_liquid: false` (Requires Jekyll 4.0 or higher) to the post's YAML block.

```
## Mathematics

We use [**MathJax**][mathjax] to generate mathematics. For website performance reasons, the mathematical feature won't be loaded by default. But it can be enabled by:
131 changes: 72 additions & 59 deletions _posts/2019-08-09-getting-started.md
Original file line number Diff line number Diff line change
@@ -11,56 +11,74 @@ pin: true
media_subpath: '/posts/20180809'
---

## Prerequisites
## Creating a Site Repository

Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of the basic environment. [Git](https://git-scm.com/) also needs to be installed.
When creating your site repository, you have two options depending on your needs:

## Installation
### Option 1. Using the Starter (Recommended)

### Creating a New Site
This approach simplifies upgrades, isolates unnecessary files, and is perfect for users who want to focus on writing with minimal configuration.

There are two ways to create a new repository for this theme:
1. Sign in to GitHub and navigate to the [**starter**][starter].
2. Click the <kbd>Use this template</kbd> button and then select <kbd>Create a new repository</kbd>.
3. Name the new repository `<username>.github.io`, replacing `username` with your lowercase GitHub username.

- [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) — Easy to upgrade, isolates irrelevant project files so you can focus on writing.
- [**GitHub Fork**](#option-2-github-fork) — Convenient for custom development, but difficult to upgrade. Unless you are familiar with Jekyll and are determined to tweak or contribute to this project, this approach is not recommended.
### Option 2. Forking the Theme

#### Option 1. Using the Chirpy Starter
This approach is convenient for modifying features or UI design, but presents challenges during upgrades. So don't try this unless you are familiar with Jekyll and plan to heavily modify this theme.

Sign in to GitHub and browse to [**Chirpy Starter**][starter], click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
1. Sign in to GitHub.
2. [Fork the theme repository](https://github.com/cotes2020/jekyll-theme-chirpy/fork).
3. Name the new repository `<username>.github.io`, replacing `username` with your lowercase GitHub username.

#### Option 2. GitHub Fork
## Setting up the Environment

Sign in to GitHub to [fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork), and then rename it to `USERNAME.github.io` (`USERNAME` means your username).
Once your repository is created, it's time to set up your development environment. There are two primary methods:

Next, clone the repository to your local machine, make sure it has [Node.js][nodejs] installed, then go to the root directory of the repo and run the following command:
### Using Dev Containers (Recommended for Windows)

```console
$ bash tools/init
```
Dev Containers offer an isolated environment using Docker, which prevents conflicts with your system and ensures all dependencies are managed within the container.

> If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command.
{: .prompt-info }
**Steps**:

The above command will:
1. Install Docker:
- On Windows/macOS, install [Docker Desktop][docker-desktop].
- On Linux, install [Docker Engine][docker-engine].
2. Install [VS Code][vscode] and the [Dev Containers extension][dev-containers].
3. Clone your repository:
- For Docker Desktop: Start VS Code and [clone your repo in a container volume][dc-clone-in-vol].
- For Docker Engine: Clone your repo locally, then [open it in a container][dc-open-in-container] via VS Code.
4. Wait for the Dev Containers setup to complete.

1. Check out the code to the [latest tag][latest-tag] (to ensure the stability of your site: as the code for the default branch is under development).
2. Remove non-essential sample files and take care of GitHub-related files.
3. Build CSS/JS assets files and then make them tracked by Git.
4. Automatically create a new commit to save the changes above.
### Setting up Natively (Recommended for Unix-like OS)

### Installing Dependencies
For Unix-like systems, you can set up the environment natively for optimal performance, though you can also use Dev Containers as an alternative.

Before running local server for the first time, go to the root directory of your site and run:
**Steps**:

```console
$ bundle
```
1. Follow the [Jekyll installation guide](https://jekyllrb.com/docs/installation/) to install Jekyll and ensure [Git](https://git-scm.com/) is installed.
2. Clone your repository to your local machine.
3. If you forked the theme, install [Node.js][nodejs] and run `bash tools/init.sh` in the root directory to initialize the repository.
4. Run command `bundle` in the root of your repository to install the dependencies.

## Usage

### Start the Jekyll Server

To run the site locally, use the following command:

```terminal
$ bundle exec jekyll s
```

> If you are using Dev Containers, you must run that command in the **VS Code** Terminal.
{: .prompt-info }

After a few seconds, the local server will be available at <http://127.0.0.1:4000>.

### Configuration

Update the variables of `_config.yml`{: .filepath} as needed. Some of them are typical options:
Update the variables in `_config.yml`{: .filepath} as needed. Some typical options include:

- `url`
- `avatar`
@@ -69,70 +87,65 @@ Update the variables of `_config.yml`{: .filepath} as needed. Some of them are t

### Social Contact Options

Social contact options are displayed at the bottom of the sidebar. You can turn on/off the specified contacts in file `_data/contact.yml`{: .filepath }.

### Customizing Stylesheet

If you need to customize the stylesheet, copy the theme's `assets/css/jekyll-theme-chirpy.scss`{: .filepath} to the same path on your Jekyll site, and then add the custom style at the end of it.
Social contact options are displayed at the bottom of the sidebar. You can enable or disable specific contacts in the `_data/contact.yml`{: .filepath} file.

Starting with version `6.2.0`, if you want to overwrite the SASS variables defined in `_sass/addon/variables.scss`{: .filepath}, copy the main sass file `_sass/main.scss`{: .filepath} into the `_sass`{: .filepath} directory in your site's source, then create a new file `_sass/variables-hook.scss`{: .filepath} and assign new value.
### Customizing the Stylesheet

### Customing Static Assets
To customize the stylesheet, copy the theme's `assets/css/jekyll-theme-chirpy.scss`{: .filepath} file to the same path in your Jekyll site, and add your custom styles at the end of the file.

Static assets configuration was introduced in version `5.1.0`. The CDN of the static assets is defined by file `_data/origin/cors.yml`{: .filepath }, and you can replace some of them according to the network conditions in the region where your website is published.
Starting with version `6.2.0`, if you want to overwrite the SASS variables defined in `_sass/addon/variables.scss`{: .filepath}, copy the main SASS file `_sass/main.scss`{: .filepath} to the `_sass`{: .filepath} directory in your site's source, then create a new file `_sass/variables-hook.scss`{: .filepath} and assign your new values there.

Also, if you'd like to self-host the static assets, please refer to the [_chirpy-static-assets_](https://github.com/cotes2020/chirpy-static-assets#readme).
### Customizing Static Assets

### Running Local Server

You may want to preview the site contents before publishing, so just run it by:

```console
$ bundle exec jekyll s
```
Static assets configuration was introduced in version `5.1.0`. The CDN of the static assets is defined in `_data/origin/cors.yml`{: .filepath }. You can replace some of them based on the network conditions in the region where your website is published.

After a few seconds, the local service will be published at _<http://127.0.0.1:4000>_.
If you prefer to self-host the static assets, refer to the [_chirpy-static-assets_](https://github.com/cotes2020/chirpy-static-assets#readme) repository.

## Deployment

Before the deployment begins, check out the file `_config.yml`{: .filepath} and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base URL on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starts with a slash, e.g, `/project-name`.
Before deploying, check the `_config.yml`{: .filepath} file and ensure the `url` is configured correctly. If you prefer a [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or if you want to visit your website with a base URL on a web server other than **GitHub Pages**, remember to set the `baseurl` to your project name, starting with a slash, e.g., `/project-name`.

Now you can choose _ONE_ of the following methods to deploy your Jekyll site.

### Deploy by Using GitHub Actions
### Deploy Using Github Actions

There are a few things to get ready for.
Prepare the following:

- If you're on the GitHub Free plan, keep your site repository public.
- If you have committed `Gemfile.lock`{: .filepath} to the repository, and your local machine is not running Linux, go to the root of your site and update the platform list of the lock-file:
- If you have committed `Gemfile.lock`{: .filepath} to the repository, and your local machine is not running Linux, update the platform list of the lock file:

```console
$ bundle lock --add-platform x86_64-linux
```

Next, configure the _Pages_ service.
Next, configure the _Pages_ service:

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.
![Build source](pages-source-light.png){: .light .border .normal w='375' h='140' }
![Build source](pages-source-dark.png){: .dark .normal w='375' h='140' }
1. Go to your repository on GitHub. Select the _Settings_ tab, then click _Pages_ in the left navigation bar. In the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu.
![Build source](pages-source-light.png){: .light .border .normal w='375' h='140' }
![Build source](pages-source-dark.png){: .dark .normal w='375' h='140' }

2. Push any commits to GitHub to trigger the _Actions_ workflow. In the _Actions_ tab of your repository, you should see the workflow _Build and Deploy_ running. Once the build is complete and successful, the site will be deployed automatically.

At this point, you can go to the URL indicated by GitHub to access your site.
You can now visit the URL provided by GitHub to access your site.

### Manually Build and Deploy
### Manual Build and Deployment

On self-hosted servers, you cannot enjoy the convenience of **GitHub Actions**. Therefore, you should build the site on your local machine and then upload the site files to the server.
For self-hosted servers, you will need to build the site on your local machine and then upload the site files to the server.

Go to the root of the source project, and build your site as follows:
Navigate to the root of the source project, and build your site with the following command:

```console
$ JEKYLL_ENV=production bundle exec jekyll b
```

Unless you specified the output path, the generated site files will be placed in folder `_site`{: .filepath} of the project's root directory. Now you should upload those files to the target server.
Unless you specified the output path, the generated site files will be placed in the `_site`{: .filepath} folder of the project's root directory. Upload these files to your target server.

[nodejs]: https://nodejs.org/
[starter]: https://github.com/cotes2020/chirpy-starter
[pages-workflow-src]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
[latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags
[docker-desktop]: https://www.docker.com/products/docker-desktop/
[docker-engine]: https://docs.docker.com/engine/install/
[vscode]: https://code.visualstudio.com/
[dev-containers]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
[dc-clone-in-vol]: https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume
[dc-open-in-container]: https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-an-existing-folder-in-a-container
54 changes: 32 additions & 22 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* The common styles */

html {
font-size: 16px;

@media (prefers-color-scheme: light) {
&:not([data-mode]),
&[data-mode='light'] {
@@ -22,8 +24,6 @@ html {
@include light-scheme;
}
}

font-size: 16px;
}

body {
@@ -42,20 +42,29 @@ body {
@extend %heading;

@if $i > 1 {
@extend %section;
@extend %anchor;
}

@if $i < 5 {
$factor: 0.18rem;
$size-factor: 0.25rem;

@if $i == 1 {
$factor: 0.23rem;
@if $i > 1 {
$size-factor: 0.18rem;

main & {
@if $i == 2 {
margin: 2.5rem 0 1.25rem;
} @else {
margin: 2rem 0 1rem;
}
}
}

font-size: 1rem + (5 - $i) * $factor;
& {
font-size: 1rem + (5 - $i) * $size-factor;
}
} @else {
font-size: 1rem;
font-size: 1.05rem;
}
}
}
@@ -80,9 +89,10 @@ img {
}

blockquote {
border-left: 5px solid var(--blockquote-border-color);
border-left: 0.125rem solid var(--blockquote-border-color);
padding-left: 1rem;
color: var(--blockquote-text-color);
margin-top: 0.5rem;

> p:last-child {
margin-bottom: 0;
@@ -107,14 +117,14 @@ blockquote {
}
}

@include prompt('tip', '\f0eb', 'regular');
@include prompt('info', '\f06a');
@include prompt('tip', '\f0eb', $fa-style: 'regular');
@include prompt('info', '\f06a', $rotate: 180);
@include prompt('warning', '\f06a');
@include prompt('danger', '\f071');
}

kbd {
font-family: inherit;
font-family: Lato, sans-serif;
display: inline-block;
vertical-align: middle;
line-height: 1.3rem;
@@ -124,7 +134,7 @@ kbd {
padding-top: 0.1rem;
color: var(--kbd-text-color);
background-color: var(--kbd-bg-color);
border-radius: 0.25rem;
border-radius: $radius-sm;
border: solid 1px var(--kbd-wrap-color);
box-shadow: inset 0 -2px 0 var(--kbd-wrap-color);
}
@@ -218,13 +228,13 @@ i {

#access-lastmod {
a {
color: inherit;

&:hover {
@extend %link-hover;
}

@extend %no-bottom-border;

color: inherit;
}
}

@@ -682,15 +692,15 @@ $btn-mb: 0.5rem;
background: var(--sidebar-bg);
border-right: 1px solid var(--sidebar-border-color);

/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */

/* Hide scrollbar for Chrome, Safari and Opera */
&::-webkit-scrollbar {
display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */

%sidebar-link-hover {
&:hover {
color: var(--sidebar-active-color);
@@ -1036,16 +1046,16 @@ search {
padding-bottom: 3rem;

a {
font-size: 1.4rem;
line-height: 2.5rem;

&:hover {
@extend %link-hover;
}

@extend %link-color;
@extend %no-bottom-border;
@extend %heading;

font-size: 1.4rem;
line-height: 2.5rem;
}

> article {
21 changes: 7 additions & 14 deletions _sass/addon/module.scss
Original file line number Diff line number Diff line change
@@ -10,17 +10,6 @@
font-family: $font-family-heading;
}

%section {
main & {
margin-top: 2.5rem;
margin-bottom: 1.25rem;

&:focus {
outline: none; /* avoid outline in Safari */
}
}
}

%anchor {
.anchor {
font-size: 80%;
@@ -92,7 +81,7 @@
}

%rounded {
border-radius: $base-radius;
border-radius: $radius-lg;
}

%img-caption {
@@ -123,7 +112,7 @@
}

%text-highlight {
color: var(--text-muted-hightlight-color);
color: var(--text-muted-highlight-color);
font-weight: 600;
}

@@ -187,14 +176,18 @@
transform: translateX(-50%);
}

@mixin prompt($type, $fa-content, $fa-style: 'solid') {
@mixin prompt($type, $fa-content, $fa-style: 'solid', $rotate: 0) {
&.prompt-#{$type} {
background-color: var(--prompt-#{$type}-bg);

&::before {
content: $fa-content;
color: var(--prompt-#{$type}-icon-color);
font: var(--fa-font-#{$fa-style});

@if $rotate != 0 {
transform: rotate(#{$rotate}deg);
}
}
}
}
10 changes: 5 additions & 5 deletions _sass/addon/syntax.scss
Original file line number Diff line number Diff line change
@@ -50,13 +50,13 @@ html {
@extend %rounded;
@extend %code-snippet-bg;

overflow: auto;
padding-bottom: 0.75rem;

@at-root figure#{&} {
@extend %code-snippet-bg;
}

overflow: auto;
padding-bottom: 0.75rem;

pre {
margin-bottom: 0;
font-size: $code-font-size;
@@ -104,7 +104,7 @@ code {
font-size: $code-font-size;
padding: 3px 5px;
word-break: break-word;
border-radius: 4px;
border-radius: $radius-sm;
background-color: var(--inline-code-bg);
}

@@ -261,7 +261,7 @@ div {
.content > & {
@include ml-mr(0);

border-radius: $base-radius;
border-radius: $radius-lg;
}

.code-header {
3 changes: 2 additions & 1 deletion _sass/addon/variables.scss
Original file line number Diff line number Diff line change
@@ -16,7 +16,8 @@ $search-max-width: 200px !default;
$footer-height: 5rem !default;
$footer-height-large: 6rem !default; /* screen width: < 850px */
$main-content-max-width: 1250px !default;
$base-radius: 0.625rem !default;
$radius-sm: 6px !default;
$radius-lg: 10px !default;
$back2top-size: 2.75rem !default;

/* syntax highlight */
2 changes: 1 addition & 1 deletion _sass/colors/syntax-dark.scss
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
--highlight-bg-color: #151515;
--highlighter-rouge-color: #c9def1;
--highlight-lineno-color: #808080;
--inline-code-bg: #323238;
--inline-code-bg: rgba(255, 255, 255, 0.05);
--code-color: #b0b0b0;
--code-header-text-color: #6a6a6a;
--code-header-muted-color: #353535;
6 changes: 1 addition & 5 deletions _sass/colors/syntax-light.scss
Original file line number Diff line number Diff line change
@@ -8,17 +8,13 @@
--highlight-bg-color: #f6f8fa;
--highlighter-rouge-color: #3f596f;
--highlight-lineno-color: #9e9e9e;
--inline-code-bg: #f6f6f7;
--inline-code-bg: rgba(25, 25, 28, 0.05);
--code-color: #3a3a3a;
--code-header-text-color: #a3a3a3;
--code-header-muted-color: #e5e5e5;
--code-header-icon-color: #c9c8c8;
--clipboard-checked-color: #43c743;

[class^='prompt-'] {
--inline-code-bg: #fbfafa;
}

/* --- Syntax highlight theme from `rougify style github` --- */

.highlight table td {
14 changes: 7 additions & 7 deletions _sass/colors/typography-dark.scss
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
/* Common color */
--text-color: rgb(175, 176, 177);
--text-muted-color: #868686;
--text-muted-hightlight-color: #aeaeae;
--text-muted-highlight-color: #aeaeae;
--heading-color: #cccccc;
--label-color: #a7a7a7;
--blockquote-border-color: rgb(66, 66, 66);
@@ -84,27 +84,29 @@
--prompt-danger-bg: rgb(86, 28, 8, 0.8);
--prompt-danger-icon-color: #cd0202;

/* tags */
/* Tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
--dash-color: rgb(63, 65, 68);
--search-tag-bg: #292828;

/* categories */
/* Categories */
--categories-border: rgb(64, 66, 69, 0.5);
--categories-hover-bg: rgb(73, 75, 76);
--categories-icon-hover-color: white;

/* archives */
/* Archive */
--timeline-node-bg: rgb(150, 152, 156);
--timeline-color: rgb(63, 65, 68);
--timeline-year-dot-color: var(--timeline-color);

color-scheme: dark;

.light {
display: none;
}

/* categories */
/* Categories */
.categories.card,
.list-group-item {
background-color: var(--card-bg);
@@ -138,8 +140,6 @@
);
}

color-scheme: dark;

/* stylelint-disable-next-line selector-id-pattern */
#disqus_thread {
color-scheme: none;
18 changes: 9 additions & 9 deletions _sass/colors/typography-light.scss
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
/* Common color */
--text-color: #34343c;
--text-muted-color: #757575;
--text-muted-hightlight-color: inherit;
--text-muted-highlight-color: inherit;
--heading-color: #2a2a2a;
--label-color: #585858;
--blockquote-border-color: #eeeeee;
@@ -92,14 +92,6 @@
--tag-hover: rgb(222, 226, 230);
--search-tag-bg: #f8f9fa;

[class^='prompt-'] {
--link-underline-color: rgb(219, 216, 216);
}

.dark {
display: none;
}

/* Categories */
--categories-border: rgba(0, 0, 0, 0.125);
--categories-hover-bg: var(--btn-border-color);
@@ -109,4 +101,12 @@
--timeline-color: rgba(0, 0, 0, 0.075);
--timeline-node-bg: #c2c6cc;
--timeline-year-dot-color: #ffffff;

[class^='prompt-'] {
--link-underline-color: rgb(219, 216, 216);
}

.dark {
display: none;
}
} /* light-scheme */
2 changes: 1 addition & 1 deletion _sass/layout/categories.scss
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
}

.card-header {
$radius: calc($base-radius - 1px);
$radius: calc($radius-lg - 1px);

padding: 0.75rem;
border-radius: $radius;
4 changes: 2 additions & 2 deletions _sass/layout/home.scss
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
background: none;

%img-radius {
border-radius: $base-radius $base-radius 0 0;
border-radius: $radius-lg $radius-lg 0 0;
}

.preview-img {
@@ -131,7 +131,7 @@
/* Tablet */
@media all and (min-width: 768px) {
%img-radius {
border-radius: 0 $base-radius $base-radius 0;
border-radius: 0 $radius-lg $radius-lg 0;
}

#post-list {
4 changes: 2 additions & 2 deletions _sass/layout/post.scss
Original file line number Diff line number Diff line change
@@ -173,12 +173,12 @@ header {
}

&:first-child {
border-radius: $base-radius 0 0 $base-radius;
border-radius: $radius-lg 0 0 $radius-lg;
left: 0.5px;
}

&:last-child {
border-radius: 0 $base-radius $base-radius 0;
border-radius: 0 $radius-lg $radius-lg 0;
right: 0.5px;
}
}
2 changes: 1 addition & 1 deletion assets/404.html
Original file line number Diff line number Diff line change
@@ -11,4 +11,4 @@

{% include lang.html %}

<p class="lead">{{ site.data.locales[lang].not_found.statment }}</p>
<p class="lead">{{ site.data.locales[lang].not_found.statement }}</p>
26 changes: 18 additions & 8 deletions assets/js/data/swconf.js
Original file line number Diff line number Diff line change
@@ -22,14 +22,24 @@ const swconf = {
{% endfor %}
],

{%- comment -%} The request url with below path will not be cached. {%- endcomment -%}
denyPaths: [
{% for path in site.pwa.cache.deny_paths %}
{% unless path == empty %}
'{{ path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
{% endunless %}
{% endfor %}
],
interceptor: {
{%- comment -%} URLs containing the following paths will not be cached. {%- endcomment -%}
paths: [
{% for path in site.pwa.cache.deny_paths %}
{% unless path == empty %}
'{{ path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
{% endunless %}
{% endfor %}
],

{%- comment -%} URLs containing the following prefixes will not be cached. {%- endcomment -%}
urlPrefixes: [
{% if site.analytics.goatcounter.id != nil and site.pageviews.provider == 'goatcounter' %}
'https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/'
{% endif %}
]
},

purge: false
{% else %}
purge: true
21 changes: 21 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [7.1.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.0.1...v7.1.0) (2024-08-27)

### Features

* add Bluesky social links ([#1759](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1759)) ([0102aba](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0102abae062be24ec289fb7facb11950aca79e3f))
* add Reddit social option ([#1836](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1836)) ([8673e13](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8673e1335f0771eac364d0a2866f27476d61a58b))
* add Threads social links ([#1837](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1837)) ([e3a78b6](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e3a78b6243f7056105d72185bb6e94b436834e5b))
* **analytics:** add fathom analytics ([#1913](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1913)) ([befc4ce](https://github.com/cotes2020/jekyll-theme-chirpy/commit/befc4ce9c5026f67f99bce66e223d056229f0bdb))
* **dev:** add vscode tasks ([#1843](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1843)) ([e4db1a1](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e4db1a176f3f69f676cbc0bf27b1d5a657ece05e))
* **dev:** support vscode dev-container ([#1781](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1781)) ([1e3d4a6](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1e3d4a6323ba3eed06a57f8bf1b2edefd890b127))
* **ui:** improve block quote layout ([80bd792](https://github.com/cotes2020/jekyll-theme-chirpy/commit/80bd7928a02c75c843a550bd377d11b574e8bfda))
* **ui:** improve visibility of inline code ([#1831](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1831)) ([c876731](https://github.com/cotes2020/jekyll-theme-chirpy/commit/c876731901784a72ef9d2e9e2936df65ddff5f61))
* **ui:** make `info-prompt` icon looks like the letter "i" ([#1835](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1835)) ([a07a57e](https://github.com/cotes2020/jekyll-theme-chirpy/commit/a07a57ec922249d3a22da56fbcb30d83eadef728))
* **ui:** set `<kbd>` font to 'Lato' ([64c7262](https://github.com/cotes2020/jekyll-theme-chirpy/commit/64c7262245e878534971a2e3a2630b614daf72f3))

### Bug Fixes

* adapt the giscus localization parameter ([#1810](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1810)) ([0709854](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0709854dc8f6099d38c2578967a02f73b4be0dc8))
* avoid caching pageviews data ([#1849](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1849)) ([979f86c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/979f86cf64e1fcace4231fb070c7e6398fd4e5ec))
* remove extra dual-mode images from lightbox ([#1883](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1883)) ([5c5910f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5c5910f1fc661ec3dce203ac961c7f64f1991895))

## [7.0.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.0.0...v7.0.1) (2024-05-18)

### Bug Fixes
4 changes: 2 additions & 2 deletions jekyll-theme-chirpy.gemspec
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-chirpy"
spec.version = "7.0.1"
spec.version = "7.1.0"
spec.authors = ["Cotes Chung"]
spec.email = ["cotes.chung@gmail.com"]

@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
"plugin_type" => "theme"
}

spec.required_ruby_version = ">= 3.0"
spec.required_ruby_version = "~> 3.1"

spec.add_runtime_dependency "jekyll", "~> 4.3"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "jekyll-theme-chirpy",
"version": "7.0.1",
"version": "7.1.0",
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
"repository": {
"type": "git",
"url": "git+https://github.com/cotes2020/jekyll-theme-chirpy.git"
},
"author": "Cotes Chung",
"license": "MIT",
"since": 2019,
"bugs": {
"url": "https://github.com/cotes2020/jekyll-theme-chirpy/issues"
},
@@ -19,17 +20,18 @@
"watch:js": "rollup -c --bundleConfigAsCjs -w",
"lint:scss": "stylelint _sass/**/*.scss",
"lint:fix:scss": "npm run lint:scss -- --fix",
"test": "npm run lint:scss"
"test": "npm run lint:scss",
"prepare": "husky"
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.3"
},
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/plugin-transform-class-properties": "^7.24.1",
"@babel/preset-env": "^7.24.5",
"@commitlint/cli": "^19.3.0",
"@babel/core": "^7.25.2",
"@babel/plugin-transform-class-properties": "^7.25.4",
"@babel/preset-env": "^7.25.4",
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
@@ -39,13 +41,12 @@
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"concurrently": "^8.2.2",
"conventional-changelog-conventionalcommits": "^7.0.2",
"husky": "^9.0.11",
"conventional-changelog-conventionalcommits": "^8.0.0",
"husky": "^9.1.5",
"purgecss": "^6.0.0",
"rollup": "^4.17.2",
"rollup-plugin-license": "^3.3.1",
"semantic-release": "^23.1.1",
"stylelint": "^16.5.0",
"rollup": "^4.21.0",
"semantic-release": "^24.1.0",
"stylelint": "^16.8.2",
"stylelint-config-standard-scss": "^13.1.0"
},
"prettier": {
@@ -156,8 +157,8 @@
[
"@semantic-release/exec",
{
"prepareCmd": "bash tools/release --prepare",
"publishCmd": "bash tools/release"
"prepareCmd": "bash tools/release.sh --prepare",
"publishCmd": "bash tools/release.sh"
}
],
[
66 changes: 34 additions & 32 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
import license from 'rollup-plugin-license';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import fs from 'fs';
import path from 'path';
import yaml from '@rollup/plugin-yaml';
import fs from 'fs';
import pkg from './package.json';

const SRC_DEFAULT = '_javascript';
const DIST_DEFAULT = 'assets/js/dist';
const SRC_PWA = `${SRC_DEFAULT}/pwa`;
const DIST = 'assets/js/dist';

const banner = `/*!
* ${pkg.name} v${pkg.version} | © ${pkg.since} ${pkg.author} | ${pkg.license} Licensed | ${pkg.homepage}
*/`;

const frontmatter = `---\npermalink: /:basename\n---\n`;

const isProd = process.env.BUILD === 'production';

if (fs.existsSync(DIST_DEFAULT)) {
fs.rm(DIST_DEFAULT, { recursive: true, force: true }, (err) => {
if (err) {
throw err;
}
});
function cleanup() {
fs.rmSync(DIST, { recursive: true, force: true });
console.log(`> Directory "${DIST}" has been cleaned.`);
}

function build(filename, opts = {}) {
const src = opts.src || SRC_DEFAULT;
const dist = opts.dist || DIST_DEFAULT;
const bannerUrl =
opts.bannerUrl || path.join(__dirname, SRC_DEFAULT, '_copyright');
const commentStyle = opts.commentStyle || 'ignored';
function insertFrontmatter() {
return {
name: 'insert-frontmatter',
generateBundle(_, bundle) {
for (const chunkOrAsset of Object.values(bundle)) {
if (chunkOrAsset.type === 'chunk') {
chunkOrAsset.code = frontmatter + chunkOrAsset.code;
}
}
}
};
}

function build(filename, { src = SRC_DEFAULT, jekyll = false } = {}) {
return {
input: [`${src}/${filename}.js`],
input: `${src}/${filename}.js`,
output: {
file: `${dist}/${filename}.min.js`,
file: `${DIST}/${filename}.min.js`,
format: 'iife',
name: 'Chirpy',
banner,
sourcemap: !isProd
},
watch: {
@@ -46,29 +56,21 @@ function build(filename, opts = {}) {
}),
nodeResolve(),
yaml(),
isProd && commentStyle === 'none' && terser(),
license({
banner: {
commentStyle,
content: { file: bannerUrl }
}
}),
isProd && commentStyle !== 'none' && terser()
isProd && terser(),
jekyll && insertFrontmatter()
]
};
}

cleanup();

export default [
build('commons'),
build('home'),
build('categories'),
build('page'),
build('post'),
build('misc'),
build('app', { src: SRC_PWA }),
build('sw', {
src: SRC_PWA,
bannerUrl: path.join(__dirname, SRC_PWA, '_frontmatter'),
commentStyle: 'none'
})
build('app', { src: SRC_PWA, jekyll: true }),
build('sw', { src: SRC_PWA, jekyll: true })
];
8 changes: 4 additions & 4 deletions tools/init → tools/init.sh
Original file line number Diff line number Diff line change
@@ -80,13 +80,13 @@ init_files() {
rm -rf .github && mkdir -p .github/workflows
mv "$temp/$ACTIONS_WORKFLOW" .github/workflows/"$ACTIONS_WORKFLOW"
rm -rf "$temp"

## Cleanup image settings in site config
_sedi "s/(^timezone:).*/\1/;s/(^.*cdn:).*/\1/;s/(^avatar:).*/\1/" _config.yml
fi

# Cleanup image settings in site config
_sedi "s/(^timezone:).*/\1/;s/(^.*cdn:).*/\1/;s/(^avatar:).*/\1/" _config.yml

# remove the other files
rm -rf _posts/*
rm -rf tools/init.sh tools/release.sh _posts/*

# build assets
npm i && npm run build
17 changes: 1 addition & 16 deletions tools/release → tools/release.sh
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ help() {
echo " 2. Merge the release branch into the default branch"
echo
echo "Usage:"
echo " bash ./tools/release [options]"
echo " bash $0 [options]"
echo
echo "Options:"
echo " --prepare Preparation for release"
@@ -111,13 +111,6 @@ prepare() {

## Build a Gem package
build_gem() {
if $opt_pkg; then
BACKUP_PATH="$(mktemp -d)"
mkdir -p "$BACKUP_PATH"/css "$BACKUP_PATH"/js
[[ -d $CSS_DIST ]] && cp "$CSS_DIST"/* "$BACKUP_PATH"/css
[[ -d $JS_DIST ]] && cp "$JS_DIST"/* "$BACKUP_PATH"/js
fi

# Remove unnecessary theme settings
sed -i -E "s/(^timezone:).*/\1/;s/(^cdn:).*/\1/;s/(^avatar:).*/\1/" $CONFIG
rm -f ./*.gem
@@ -132,14 +125,6 @@ build_gem() {
echo -e "\n> Resume file changes ...\n"
git reset
git checkout .

if $opt_pkg; then
# restore the dist files for future development
mkdir -p "$CSS_DIST" "$JS_DIST"
cp "$BACKUP_PATH"/css/* "$CSS_DIST"
cp "$BACKUP_PATH"/js/* "$JS_DIST"
rm -rf "$BACKUP_PATH"
fi
}

# Push the gem to RubyGems.org (using $GEM_HOST_API_KEY)
4 changes: 4 additions & 0 deletions tools/run → tools/run.sh
Original file line number Diff line number Diff line change
@@ -46,5 +46,9 @@ if $prod; then
command="JEKYLL_ENV=production $command"
fi

if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then
command="$command --force_polling"
fi

echo -e "\n> $command\n"
eval "$command"
2 changes: 1 addition & 1 deletion tools/test → tools/test.sh
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ help() {
echo
echo "Usage:"
echo
echo " bash ./tools/test [options]"
echo " bash $0 [options]"
echo
echo "Options:"
echo ' -c, --config "<config_a[,config_b[...]]>" Specify config file(s)'