1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

Compare commits

..

248 Commits

Author SHA1 Message Date
Cotes Chung
795ff3f4c3 chore(release): 6.5.2 2024-03-01 03:51:25 +08:00
Cotes Chung
c41672b2e0 Merge branch 'hotfix/6.5.2' into production 2024-03-01 03:51:21 +08:00
Cotes Chung
9cc62e703f build(release): build the gem on the production branch (#1577) 2024-03-01 03:11:17 +08:00
Cotes Chung
19d6bafbe1 fix: correct the base URL parameter name (#1576)
#1553 introduced
2024-03-01 02:50:10 +08:00
Cotes Chung
388c1511d6 chore(release): 6.5.1 2024-02-27 02:44:31 +08:00
Cotes Chung
8849afe5cf Merge branch 'hotfix/6.5.1' into production 2024-02-27 02:44:29 +08:00
Cotes Chung
89b962557a fix: correct the generation of relative resource paths (#1553) 2024-02-23 03:07:17 +08:00
Josh Johanning
5de0153df4 build(ci): update actions versions (#1554) 2024-02-22 22:04:54 +08:00
Cotes Chung
ed4d304cd2 Merge branch 'production' 2024-02-15 00:18:40 +08:00
Cotes Chung
48564bda8d chore(release): 6.5.0 2024-02-15 00:18:39 +08:00
Cotes Chung
b9d053b3cd Merge branch 'master' into production 2024-02-15 00:18:35 +08:00
Cotes Chung
cd258c92c3 chore(deps): upgrade mermaid to 10.8.0 2024-02-15 00:18:09 +08:00
dependabot[bot]
6230d1d750 build(deps-dev): bump the npm group with 8 updates (#1540)
Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env), [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli), [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional), [husky](https://github.com/typicode/husky), [rollup](https://github.com/rollup/rollup), [stylelint](https://github.com/stylelint/stylelint) and [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) to permit the latest version.

Updates `@babel/core` to 7.23.9
- [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.23.9/packages/babel-core)

Updates `@babel/preset-env` to 7.23.9
- [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.23.9/packages/babel-preset-env)

Updates `@commitlint/cli` to 18.6.1
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v18.6.1/@commitlint/cli)

Updates `@commitlint/config-conventional` to 18.6.2
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v18.6.2/@commitlint/config-conventional)

Updates `husky` from 8.0.3 to 9.0.11
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v8.0.3...v9.0.11)

Updates `rollup` to 4.10.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.9.2...v4.10.0)

Updates `stylelint` to 16.2.1
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.1.0...16.2.1)

Updates `stylelint-config-standard-scss` from 12.0.0 to 13.0.0
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v12.0.0...v13.0.0)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@commitlint/config-conventional"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: rollup
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-15 00:12:45 +08:00
Cotes Chung
365abc6b3b build(deps-dev): set update interval to weekly 2024-02-14 23:59:22 +08:00
Cotes Chung
79c65b3e44 build(security): correct scan path for CodeQL 2024-02-14 01:06:30 +08:00
Cotes Chung
6b34901d94 refactor(pwa): revert to JS and Liquid mixing
The gem package won't be able to pass `/sw.min.js` to the user end
2024-02-13 23:35:32 +08:00
Benjamin van den Hout
90693ff95e feat: add analytics support for GoatCounter (#1526) 2024-02-06 22:19:28 +08:00
Cotes Chung
1a01c35e52 chore: update stale-bot settings 2024-02-05 07:28:35 +08:00
Cotes Chung
c335bc6ce7 build(security): stop scheduled scanning 2024-02-03 18:53:35 +08:00
Cotes Chung
f3ea7e9887 build(security): improve paths filter for CodeQL 2024-02-01 01:07:46 +08:00
Piotr Held
c13ec31163 perf: enable equation numbering in MathJax (#1520)
If you place your equations inside $$\begin{equation}...\end{equation}$$
you will get MathJax equation numbering. As described here:
https://docs.mathjax.org/en/latest/input/tex/eqnumbers.html

BREAKING CHANGES: if you used \begin{equation} inside $$ you will
get equation numbering which was not previously present.
2024-01-31 03:44:19 +08:00
yeonwlee
bbbb66b489 perf: allow TOC to start at heading 3 (#1512) 2024-01-30 08:22:03 +08:00
bigsk1
74f16623c9 fix: correct the Twitter Card in social share preview (#1498)
---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2024-01-28 05:53:54 +08:00
Cotes Chung
1127c43823 feat: add pwa.cache.* option to precisely control caching (#1501) 2024-01-28 02:22:33 +08:00
TroubleDog54
ea3a22e13c docs: fix typo in the "Getting Started" post (#1502) 2024-01-23 15:23:53 +08:00
Cotes Chung
c0018b66f3 build(editor): add VS Code config
Make it easy to initialize the development environment.
2024-01-22 02:50:52 +08:00
Cotes Chung
02e296ed75 fix: missing "/" at the end of URLs for categories and tags in breadcrumb (#1495) 2024-01-19 06:19:20 +08:00
Cotes Chung
4facf5b390 perf: allow no social links to be configured (#1494) 2024-01-19 05:48:26 +08:00
Cotes Chung
c5d11441bc build(deps-dev): install husky and commitlint locally
Signed-off-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2024-01-13 22:13:15 +08:00
Cotes Chung
96bdd7c1dd Merge branch 'production' 2024-01-13 22:04:40 +08:00
Cotes Chung
ba764c1380 chore(release): 6.4.2 2024-01-13 22:02:45 +08:00
Cotes Chung
c7cfde0930 fix: resume the blockquote display type (#1480)
Undo changes in #1449
2024-01-13 22:00:08 +08:00
Cotes Chung
13177979bb Merge branch 'production' 2024-01-11 02:13:03 +08:00
Cotes Chung
6a17a7d46c chore(release): 6.4.1 2024-01-11 02:13:01 +08:00
Cotes Chung
8c30b41e20 Merge branch 'master' into production 2024-01-11 02:12:58 +08:00
Cotes Chung
b2d1cb68db fix: og:image URL is incorrect (#1468)
Introduced by #1463
2024-01-11 02:11:25 +08:00
Cotes Chung
3589a6ee53 Merge branch 'production' 2024-01-10 23:11:38 +08:00
Cotes Chung
7efbed6a24 chore(release): 6.4.0 2024-01-10 23:11:36 +08:00
Cotes Chung
21d74f1183 Merge branch 'master' into production 2024-01-10 23:11:33 +08:00
Cotes Chung
d6d0098379 build(deps): upgrade 3rd-party libraries 2024-01-10 23:09:00 +08:00
Cotes Chung
241bb4df78 feat: add site-wide social preview image settings (#1463)
- Add configuration field `social_preview_image` that sets the site-wide default social preview image.  

   For pages that do not have `page.image` set in font matter, the seo tag will use the image specified by `site.social_preview_image` as the Open Graph image.

- Refactored the generation of image URLs to reduce redundant code and enhance fault tolerance for missing or repeated slash `/` when defining image paths.
2024-01-10 09:04:27 +08:00
Cotes Chung
82d8f2db98 perf: include the latest posts in the "Recently Updated" list (#1456)
Improve the "Recently Updated" list to include the most recent (only one Git commit) posts.

This change has two benefits:

1. The post update list is consistent with the git commit timeline.
2. Avoid users not having a list of updates to show when they first publish a site.
2024-01-08 05:13:56 +08:00
Cotes Chung
9882244bd9 refactor: remove extra margins from text within blockquote
Introduced by #1449
2024-01-07 06:27:09 +08:00
Cotes Chung
f243cbd858 docs: update the credits section in README 2024-01-06 19:15:31 +08:00
dependabot[bot]
d420b38329 build(deps-dev): bump the npm group with 5 updates (#1447) 2024-01-03 09:28:03 +00:00
Cotes Chung
ea2d238bd8 fix: image float breaks quotes and prompts (#1449)
Fixes #1441
2024-01-02 18:24:37 +08:00
dependabot[bot]
5234511a2f build(deps): bump the gh-actions group with 2 updates (#1448) 2024-01-01 19:52:24 +00:00
Cotes Chung
746a31e125 build(workflow): add more stale exemption labels (#1435)
New exemption labels:

- planning
- in progress
2023-12-31 16:10:25 +08:00
Cotes Chung
c45e031155 build(deps): specify the minor version number of ruby (#1431)
Resolves #1429
2023-12-27 23:56:39 +08:00
Mill Haruto
4a2b89d0b6 feat: add bilibili embed video support (#1406)
---------
Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-12-09 21:48:19 +08:00
Chuck Houpt
2a4fbf6a79 fix: url-less authors should not have empty links (#1410)
The url field from authors.yml is optional, so no link should be
build when the url is empty or not defined.

Fix #1403
2023-12-06 22:38:11 +08:00
dependabot[bot]
84ea68cab0 build(deps-dev): bump the npm group with 3 updates (#1399)
Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) and [rollup](https://github.com/rollup/rollup) to permit the latest version.

Updates `@babel/core` to 7.23.5
- [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.23.5/packages/babel-core)

Updates `@babel/preset-env` to 7.23.5
- [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.23.5/packages/babel-preset-env)

Updates `rollup` to 4.6.1
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.3.0...v4.6.1)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rollup
  dependency-type: direct:development
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-02 03:43:38 +08:00
Cotes Chung
3ed5eb1ee0 Merge branch 'production' 2023-11-13 04:21:05 +08:00
Cotes Chung
60836af606 chore(release): 6.3.1 2023-11-13 04:21:03 +08:00
Cotes Chung
739345ac24 Merge branch 'hotfix/6.3.1' into production 2023-11-13 04:21:00 +08:00
Cotes Chung
1a977a87a0 fix(home): responsive gap at the bottom of preview image
Range of impacted screen widths:

- (width >= 768px) and (width < 1150px)
- (width >= 1200px) and (width <= 1460px)
2023-11-13 04:09:28 +08:00
Cotes Chung
d1a5b57e4d Merge branch 'production' 2023-11-10 20:10:36 +08:00
Cotes Chung
2b9d379d70 chore(release): 6.3.0 2023-11-10 20:10:34 +08:00
Cotes Chung
bdee5d6b6d Merge branch 'master' into production 2023-11-10 20:09:30 +08:00
Cotes Chung
348f6bff8b chore: add a period at the end of the meta info 2023-11-10 20:08:08 +08:00
Cotes Chung
7a3d624364 chore(deps-dev): reduce external config files 2023-11-09 01:53:47 +08:00
Cotes Chung
06f1c6f256 refactor: align the position of the share buttons 2023-11-08 01:16:00 +08:00
Cotes Chung
4a7f33f7bb build(tools): improve the release script 2023-11-07 03:38:02 +08:00
Cotes Chung
e077d2911d chore(deps): upgrade dependent libraries 2023-11-07 03:29:28 +08:00
dependabot[bot]
5f2edb0914 build(deps-dev): bump the npm group with 8 updates (#1365)
Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env), [@rollup/plugin-babel](https://github.com/rollup/plugins/tree/HEAD/packages/babel), [@rollup/plugin-terser](https://github.com/rollup/plugins/tree/HEAD/packages/terser), [rollup](https://github.com/rollup/rollup), [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license), [stylelint](https://github.com/stylelint/stylelint) and [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) to permit the latest version.

Updates `@babel/core` to 7.23.2
- [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/@babel/core@7.23.2/packages/babel-core)

Updates `@babel/preset-env` to 7.23.2
- [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.23.2/packages/babel-preset-env)

Updates `@rollup/plugin-babel` to 6.0.4
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/babel/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/babel-v6.0.4/packages/babel)

Updates `@rollup/plugin-terser` to 0.4.4
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/terser/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/terser-v0.4.4/packages/terser)

Updates `rollup` from 3.29.4 to 4.3.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.4...v4.3.0)

Updates `rollup-plugin-license` to 3.2.0
- [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mjeanroy/rollup-plugin-license/compare/v3.1.0...v3.2.0)

Updates `stylelint` to 15.11.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.3...15.11.0)

Updates `stylelint-config-standard-scss` to 11.1.0
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v11.0.0...v11.1.0)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@rollup/plugin-babel"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@rollup/plugin-terser"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: rollup-plugin-license
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 15:33:59 +08:00
Cotes Chung
911206be80 build(gh): reduce the frequency of dependabot PR submissions 2023-11-06 15:26:09 +08:00
Cotes Chung
18808851a9 build(deps): upgrade rubygem-deps
Ruby 2.x has passed its end of life and is now unsupported.
2023-11-06 15:26:03 +08:00
Natalie Somersall
2bf87e0de7 feat: add Mastodon sharing link (#1344)
Adds a "share to Mastodon" button as a link sharing option using @justinribeiro's share-to-mastodon package

Discussion of proposed change - #1324

---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-10-30 02:02:58 +08:00
dependabot[bot]
f6d96ab2b8 build(deps): upgrade actions/checkout to v4 (#1340)
Bumps the gh-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).

- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 03:43:40 +08:00
Cotes Chung
59c55121c7 docs: update project description 2023-10-23 05:41:55 +08:00
Cotes Chung
9f174d9088 fix: resume lazy loading for Twitch videos (#1326)
The property of lazy load is missing in #1267
2023-10-16 05:20:42 +08:00
Cotes Chung
5810bcd1d7 fix(home): crop the preview image that doesn't match 1.91:1 (#1325) 2023-10-16 01:51:02 +08:00
Cotes Chung
897b57bfb4 chore(release): 6.2.3 2023-10-10 13:00:55 +08:00
Cotes Chung
fd83462ea4 chore(release): 6.2.3 2023-10-10 13:00:54 +08:00
Cotes Chung
fa8a2a0ada Merge branch 'master' into production 2023-10-10 13:00:51 +08:00
DmitriyFrogo
7b7e69a44d chore(i18n): update Russian locale (#1308) 2023-10-09 21:54:04 +08:00
Cotes Chung
e6e2984e77 chore(deps): update library versions
See also: https://github.com/cotes2020/chirpy-static-assets/pull/11
2023-10-09 21:13:37 +08:00
Zheng Yuan
d71711d2d3 docs: add more content in Mathematics and fix some typos (#1306)
1. Add docs for block math and inline math
2. Change a grammar mistake at line 137, the single form should be used
3. Change the comma from Chinese to English for consistency of the doc.

---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-10-08 19:17:59 +08:00
Cotes Chung
50835b4c71 refactor: optimize meta font size 2023-10-08 04:40:16 +08:00
Cotes Chung
575dc87d83 chore: update comments for configuration options baseurl and url
Avoid newbies from misusing these two options
2023-10-06 21:02:48 +08:00
Cotes Chung
753cd0499d chore: remove console log from copy link button 2023-10-06 02:04:19 +08:00
Cotes Chung
b7e9f3ec34 docs: correct spelling in README 2023-10-05 06:04:14 +08:00
Cotes Chung
42bf39e21c perf(ux): render background color before loading preview image (#1298) 2023-10-04 16:40:16 -05:00
Cotes Chung
45c2a18884 chore(deps): update dependent libraries (#1296)
- Updates `bootstrap` to 5.3.2
- Updates `dayjs` to 1.11.10
2023-10-04 15:13:08 -05:00
dependabot[bot]
3fd3c571b5 build(deps-dev): bump the npm group with 4 updates (#1289)
Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env), [rimraf](https://github.com/isaacs/rimraf) and [rollup](https://github.com/rollup/rollup) to permit the latest version.

Updates `@babel/core` to 7.23.0
- [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.23.0/packages/babel-core)

Updates `@babel/preset-env` to 7.22.20
- [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.22.20/packages/babel-preset-env)

Updates `rimraf` to 5.0.5
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v5.0.1...v5.0.5)

Updates `rollup` to 3.29.4
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.0...v3.29.4)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rimraf
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rollup
  dependency-type: direct:development
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 14:34:38 -05:00
Cotes Chung
2574118f40 perf(ui): standardize metadata text styles (#1295) 2023-10-04 14:29:44 -05:00
Cotes Chung
0e2d593b00 chore: always use dynamic polyfill for browsers 2023-10-04 19:01:48 +08:00
Cotes Chung
2bc3172444 refactor: optimize LQIP loading
- add blur effect for external WebP format LQIP
- remove the timeout delay
2023-10-04 18:15:22 +08:00
Cotes Chung
55659315c6 docs: update project docs 2023-10-04 18:15:22 +08:00
Cotes Chung
bbd92d11cc chore: move CHANGELOG.md to docs/ 2023-10-04 18:15:22 +08:00
Cotes Chung
475d181aac refactor: optimize the basic layouts 2023-10-04 18:15:22 +08:00
Cotes Chung
f49155f034 chore(post): restore margin at the bottom of TOC 2023-09-29 05:36:01 +08:00
Cotes Chung
109725d2dc fix(home): avoid LQIP dirty data passing to the next post (#1278) 2023-09-29 05:25:10 +08:00
Cotes Chung
e3b01636ac refactor(core): optimize image loading
- JavaScript runs so fast that LQIP will never be detected
- Increase the running priority of image processing in posts

Enhancement for #1267
2023-09-29 05:07:03 +08:00
Cotes Chung
b489da89ca style(scss): update rule-empty-line-before config 2023-09-28 01:27:24 +08:00
Cotes Chung
2d56597571 perf(pwa): enhance cache privacy protection (#1275)
Hiding the time zone of the build machine enhances privacy protection.
2023-09-27 21:13:15 +08:00
Cotes Chung
97004ddc44 docs: improve readme content 2023-09-27 21:03:12 +08:00
Jens
75ea77d574 chore(i18n): update German language localisation (#1265)
* Add common German date format.
* Fix translation of read time prompt to a more correct word.

---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-09-27 04:46:58 +08:00
Cotes Chung
bf3a34d054 perf(core): replace lazysizes with browser-level lazy loading (#1267) 2023-09-27 04:44:32 +08:00
Cotes Chung
5015fdecf3 style(core): avoid using < or > within capture tag
This interferes with the work of the editor Liquid-HTML plugin
2023-09-25 01:49:20 +08:00
Cotes Chung
de2dff354a chore(ui): increase block radius 2023-09-24 22:18:46 +08:00
Denny Korsukéwitz
3a022bc816 docs: fix the stylesheet name in tutorial (#1260)
Fixes stylesheet name in post `2019-08-09-getting-started.md`

---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-09-23 17:44:44 +08:00
Cotes Chung
9b74070d45 docs: delete the usage guide for jekyll-docker
The project [`jekyll-docker`](https://github.com/envygeeks/jekyll-docker/) has not been updated for more than a year and is not supported by `sass-cover-3.x` (`sass-embedded`) in Jekyll `4.3` due to the old OS version.

When developing sass code, we have to consider `sass-cover-2.x` (`sassc`) compatibility, which reduces web rendering performance and increases syntax maintenance costs.

Therefore, it makes no sense to maintain this awkward situation and the use of the deprecated image `jekyll/jekyll` should be removed from the documentation.

See also:

- https://github.com/envygeeks/jekyll-docker/issues/363
- https://github.com/jekyll/jekyll-sass-converter#migrate-from-2x-to-3x
2023-09-23 05:04:31 +08:00
Cotes Chung
af4102476e docs: compress heading example 2023-09-23 05:01:29 +08:00
Cotes Chung
9d9e3bbca3 chore: update footer meta info about the project 2023-09-22 03:32:42 +08:00
Cotes Chung
6f2d3ea2bd build(gem): remove outdated config from Gemfile
`sass-embedded` supports running on `musl-libc` from version `1.58.0` onwards.

See also: <https://github.com/ntkme/sass-embedded-host-ruby/issues/94>
2023-09-22 03:31:05 +08:00
Cotes Chung
8417927264 refactor(scss): replace #{$var} with $var
This change stops forward compatibility with `jekyll-sass-converter-2.x`
2023-09-22 03:27:20 +08:00
Cotes Chung
ca39e15a78 build(gh): update checklist of issue / discussion template 2023-09-21 01:48:10 +08:00
Cotes Chung
e9c920641b perf(comments): lazy load giscus (#1254)
Enable the `giscus` lazy loading option to improve web performance.
2023-09-20 05:48:14 +08:00
Cotes Chung
0a55e1297b build: add content to bug-report template 2023-09-20 05:48:13 +08:00
Cotes Chung
0465a985dc fix(posts): resume target highlighting for superscripts and footnotes (#1253)
`<sup>` and `<footnote>` are highlighted when in `:target` state, but this feature has been missing since `v6.1.0` due to an oversight in development.
2023-09-20 04:27:32 +08:00
Cotes Chung
73e171b0fb perf(layout): optimize the main block height calculation (#1249)
If the post content height is smaller than the panel, there will be a large blank space between the bottom of the post and "Further Reading" section.
2023-09-19 04:44:35 +08:00
Cotes Chung
726085c647 fix(posts): code snippet clipboard tooltip missing title (#1246)
The layout `page` missing the `lang` specification
2023-09-19 00:43:08 +08:00
Cotes Chung
b97fa93ffd docs: simplify PR template 2023-09-18 23:57:43 +08:00
Cotes Chung
13a3c3c906 perf(layout): improve margins for tail block (#1243)
Keeps the margin of the elements in the tail area consistent regardless of the number of siblings, or if a <script> is inserted.
2023-09-18 03:26:02 +08:00
Cotes Chung
e78f67d354 build(gh): improve Issue / Discussion templates with form schema 2023-09-16 23:31:41 +08:00
Cotes Chung
b34661efd7 fix: avoid utterances initialization failure (#1234)
This issue exists since Chirpy `v6.0.0`
2023-09-15 01:24:13 +08:00
Cotes Chung
bb589e8d31 style: prettify utteranc code snippet 2023-09-15 01:13:20 +08:00
Cotes Chung
f079bb7f5b chore(release): 6.2.2 2023-09-11 02:32:38 +08:00
Cotes Chung
ac4b402f97 Merge branch 'hotfix/6.2.2' 2023-09-11 02:32:36 +08:00
Cotes Chung
87a12be897 chore(release): 6.2.2 2023-09-11 02:32:35 +08:00
Cotes Chung
0614473893 Merge branch 'hotfix/6.2.2' into production 2023-09-11 02:32:32 +08:00
Cotes Chung
273b389c51 fix(sidebar): contact icons not stacking (#1224)
Fixes #1224
2023-09-11 02:28:16 +08:00
Cotes Chung
204cb44dc3 chore(release): 6.2.1 2023-09-11 00:36:55 +08:00
Cotes Chung
f949bda15b Merge branch 'hotfix/6.2.1' 2023-09-11 00:36:54 +08:00
Cotes Chung
b3005f4e1a chore(release): 6.2.1 2023-09-11 00:36:52 +08:00
Cotes Chung
14d3960ca0 Merge branch 'hotfix/6.2.1' into production 2023-09-11 00:36:50 +08:00
Cotes Chung
4da7406dfe fix(pwa): installation failure caused by outdated cache entries
Change `/assets/css/style.css` to `/assets/css/jekyll-theme-chirpy.css`
2023-09-11 00:35:56 +08:00
Cotes Chung
1a041e0443 style(pwa): use 2 spaces indentation for sw.js and swcache.js 2023-09-11 00:30:23 +08:00
Cotes Chung
7ec8425e03 chore(release): 6.2.0 2023-09-10 20:37:20 +08:00
Cotes Chung
52084f85d4 chore(release): 6.2.0 2023-09-10 20:37:18 +08:00
Cotes Chung
5c6df66324 Merge branch 'master' into production 2023-09-10 20:37:16 +08:00
Cotes Chung
3f9f5c79e8 docs: update tutorial & readme (#1222)
* docs(tutorials): add social options settings
* docs: update features in README
2023-09-10 20:35:10 +08:00
Cotes Chung
aff7566774 feat(ui): update the twitter icon (#1221) 2023-09-10 20:23:34 +08:00
Cotes Chung
4237d078fa build(release): improve version release strategy 2023-09-10 20:20:43 +08:00
Cotes Chung
806fa3aa1a refactor: simplify meta info 2023-09-10 20:01:29 +08:00
Cotes Chung
ec69bea841 build: remove _data/authors.yml from the gem 2023-09-10 20:01:29 +08:00
Cotes Chung
75a2504fd9 chore(colors): adapt to Bootstrap 5.3 2023-09-10 00:31:50 +08:00
Cotes Chung
8542b57e8b build(deps): upgrade libraries (#994) 2023-09-10 00:31:47 +08:00
Cotes Chung
ed9bda022d build(starter): update the html-proofer options for v4 2023-09-09 21:05:39 +08:00
Cotes Chung
25a27056e0 build(deps): bump actions/checkout from 3 to 4 (#1216) 2023-09-09 20:58:40 +08:00
dependabot[bot]
a069960439 build(deps-dev): bump the npm with 7 updates (#1218)
Updates the requirements on [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env), [@rollup/plugin-terser](https://github.com/rollup/plugins/tree/HEAD/packages/terser), [rollup](https://github.com/rollup/rollup), [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license), [stylelint](https://github.com/stylelint/stylelint) and [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) to permit the latest version.

Updates `@babel/core` to 7.22.17
- [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.22.17/packages/babel-core)

Updates `@babel/preset-env` to 7.22.15
- [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.22.15/packages/babel-preset-env)

Updates `@rollup/plugin-terser` to 0.4.3
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/terser/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/terser-v0.4.3/packages/terser)

Updates `rollup` to 3.29.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.20.2...v3.29.0)

Updates `rollup-plugin-license` to 3.1.0
- [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mjeanroy/rollup-plugin-license/compare/v3.0.1...v3.1.0)

Updates `stylelint` to 15.10.3
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.3.0...15.10.3)

Updates `stylelint-config-standard-scss` from 9.0.0 to 11.0.0
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v9.0.0...v11.0.0)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: "@rollup/plugin-terser"
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rollup
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: rollup-plugin-license
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint
  dependency-type: direct:development
  dependency-group: npm
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-09 20:36:16 +08:00
dependabot[bot]
c574166b51 build(deps-dev): update html-proofer requirement from ~> 3.18 to ~> 4.4 (#1217)
Updates the requirements on [html-proofer](https://github.com/gjtorikian/html-proofer) to permit the latest version.
- [Release notes](https://github.com/gjtorikian/html-proofer/releases)
- [Changelog](https://github.com/gjtorikian/html-proofer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/html-proofer/compare/v3.18.0...v4.4.3)

And updates `html-proofer` arguments

---
updated-dependencies:
- dependency-name: html-proofer
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-09 20:35:32 +08:00
Cotes Chung
ff87349fe7 build(gh): enable the dependabot 2023-09-09 20:14:33 +08:00
Cotes Chung
505e314a31 perf: refactor using semantic HTML (#1207)
Fixes #1196
2023-09-08 22:48:37 +08:00
Cotes Chung
41b8f9f519 feat(layout): center the footer 2023-09-07 01:58:03 +08:00
Cotes Chung
62bcd601fc feat(ui): redesign the pagination button on home page 2023-09-06 00:13:10 +08:00
Cotes Chung
414b8f97ce refactor(ui): optimize the color scheme 2023-09-05 00:34:35 +08:00
Cotes Chung
229c2a2e2b feat(posts): render heading 4 in TOC (#1023) 2023-09-03 20:20:14 +08:00
Cotes Chung
c4af75389a refactor: rename sass files 2023-09-03 20:13:00 +08:00
Cotes Chung
4f86b04a84 perf(ui): improve code snippet design
- Apply the new syntax color themes
- Center the text in the code snippet header
- Maintaining space to the left of a 3-digit line number or more
2023-09-03 20:13:00 +08:00
Cotes Chung
2a5c184373 refactor(core): remove redundant config options
`node_modules` is already part of the default exclusions.

See also: <https://jekyllrb.com/docs/configuration/options/#global-configuration>
2023-09-03 20:12:27 +08:00
Cotes Chung
7b43a83c40 refactor: move project files to docs folder 2023-08-19 12:55:24 +08:00
Cotes Chung
f659109de2 chore: update security support versions 2023-08-19 12:39:57 +08:00
Cotes Chung
b39c6b526c chore: route question to GitHub Discussions 2023-08-17 06:51:57 +08:00
Cotes Chung
7819fd0843 docs: enrich and improve the Contributing Guidelines 2023-08-14 11:06:37 +08:00
Cotes Chung
ba397a21aa docs: fix the badge links on README and improve the content 2023-08-14 08:51:15 +08:00
Cotes Chung
0d4103d47b perf(core): speed up the Jekyll build times (#1163)
Refactor `_includes/related-posts.html`
2023-08-08 09:09:29 +08:00
frostbird
54e1dbe325 chore(i18n): update the Turkish translation (#1159)
* Update tr-TR.yml

---------

Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-08-07 02:18:32 +08:00
Cotes Chung
37c976499e perf(ui): improve web accessibility (#447)
- Make color and contrast meets WCAG 2 AA and above
- Fixes `aria-label` on button "copy link" in posts
2023-08-02 21:08:56 +08:00
ItsNiceCraft
0fd4c0bd0f docs: new timezone picker (#1152) 2023-07-31 23:42:42 +08:00
Cotes Chung
0da2f80dd4 Merge branch 'master' into production 2023-07-02 21:25:57 +08:00
Cotes Chung
e8ef69ad17 chore(release): 6.1.0 2023-07-02 21:01:52 +08:00
Cotes Chung
2eb4267cdd build(release): remove extra blank lines in changelog 2023-07-02 21:01:52 +08:00
Anan
e4e76f0a11 chore(deps): upgrade actions/deploy-pages to version 2.x (#1121) 2023-07-02 20:25:53 +08:00
Cotes Chung
e07e6d46d7 refactor: revert media query range notation (#1072)
Media queries range syntax not supported by Safari for iOS under 16.4

See also:
- https://caniuse.com/?search=media-queries

This reverts commit 1682ce9d7c.
2023-07-02 20:16:36 +08:00
Cotes Chung
2bbfda79ad refactor(layout): improve margin bottom of the core block (#1116)
Improvement of commit 73af591
2023-06-28 20:21:30 +08:00
Cotes Chung
b0f4ae5eec chore(gh-actions): fix stale bot exempt condition 2023-06-28 20:16:20 +08:00
PENEKhun
8b0fbf5a83 fix: missing xml escape for alt of preview image (#1113)
Preview image display error when `alt` contains '<' or '>'


Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
2023-06-28 14:23:27 +08:00
PENEKhun
2639f8ed45 chore(tools): correct the file name in the tool's help message (#1114)
Removing `.sh` from the executable file name
2023-06-28 13:49:13 +08:00
Cotes Chung
926d1ca068 docs: update tutorial & readme (#1110)
- update feature list in README
- add screenshots to tutorial
2023-06-27 00:39:42 +08:00
Cotes Chung
df8ff546ec fix: the cached image is covered by shimmer (#1100) 2023-06-26 23:59:59 +08:00
Cotes Chung
c075e11a4e Revert "fix: shimmer has the potential to cover images (#1100)"
This reverts commit 74ab6f8adc.
2023-06-26 21:54:20 +08:00
Javen Leung
b6d1992f85 perf: CJK characters of the "Search Cancel" button will wrap (#1105) 2023-06-26 14:23:23 +08:00
Cotes Chung
74ab6f8adc fix: shimmer has the potential to cover images (#1100)
Resolves #1100
2023-06-24 21:23:30 +08:00
Cotes Chung
4fe145e980 perf(build): use jekyll-include-cache plugin to reduce build time (#1098)
Resolve #1094 and add margin bottom for layout tags

Co-authored-by: Jake Kerr <kodafox@gmail.com>
2023-06-19 14:41:40 +08:00
weeix
a60e90791d feat(i18n): add Thai locale file (#1087) 2023-06-13 00:57:40 +08:00
Cotes Chung
fa3257873e build: replace the stale app with gh-actions
The stale app is deprecated and  no longer maintained
2023-06-08 00:46:37 +08:00
Cotes Chung
1682ce9d7c style(scss): fix style-lint media-feature-range-notation issue (#1072)
See also: https://stylelint.io/user-guide/rules/media-feature-range-notation/
2023-06-04 12:29:33 +08:00
Cotes Chung
29a8bc26bc chore(deps): upgrade major version of npm packages
packages:
- rimraf
- stylelint-config-standard-scss
2023-06-04 12:21:16 +08:00
Cotes Chung
83625644ea refactor(core): remove GA page views report (#1071)
- Google Analytics superProxy has been archived and is no longer maintained.
- Google Analytics UA end of life.

See also: https://support.google.com/analytics/answer/11583528?hl=en
2023-06-04 10:56:31 +08:00
Cotes Chung
728094d1ba perf(ui): improve hover color of sidebar nav items in light mode 2023-06-04 09:36:32 +08:00
Cotes Chung
ce2f6f5abe perf(ui): avoid blank space at the bottom of the homepage preview image
When the title of the post has a line break, there will be a blank space at the bottom of the preview image.
2023-06-04 09:36:32 +08:00
Cotes Chung
c4da99c7ea fix(webfont): resume semi-bold of font family Source Sans Pro
font-weight 700
2023-06-04 09:36:29 +08:00
Cotes Chung
73af59194a fix(ui): min-height of page layout exceeds the mobile screen 2023-05-20 05:28:15 +08:00
Cotes Chung
f6bf6d0864 refactor: improve JS/HTML for button back2top (#1054)
The current "back to top" button is built by `<a>` tag, it would be more appropriate to replace it with the `<button>` tag.
2023-05-20 01:07:18 +08:00
Cotes Chung
bef2ac085e Merge branch 'hotfix/6.0.1' 2023-05-20 00:37:38 +08:00
Cotes Chung
7c9fa68331 Merge branch 'hotfix/6.0.1' into production 2023-05-20 00:37:36 +08:00
Cotes Chung
066c1cd039 chore(release): 6.0.1 2023-05-20 00:37:34 +08:00
Cotes Chung
98850e1e5d chore(build): tag on production branch instead of master (#1052) 2023-05-20 00:35:11 +08:00
Cotes Chung
83eecdabcb refactor: remove dead SCSS code (#1053) 2023-05-20 00:34:49 +08:00
Cotes Chung
a51d31c55a fix(typography): long string for update-list is not truncated (#1050)
Resolves #1049
2023-05-19 01:50:45 +08:00
Cotes Chung
eb40f51c84 fix(layout): restore the margin bottom of the main area (#1047) 2023-05-18 11:09:32 +08:00
Cotes Chung
3bd881da70 fix(post, page): image link loses shimmer effect (#1046) 2023-05-18 10:58:23 +08:00
Cotes Chung
aba9468b53 fix(home): preview image missing [alt] and img_path (#1044)
Close #1044
2023-05-18 10:46:15 +08:00
Cotes Chung
de6ec65932 Merge branch 'master' into production 2023-05-17 03:02:22 +08:00
Cotes Chung
c5f15a3af8 chore(release): 6.0.0 2023-05-17 03:02:20 +08:00
Cotes Chung
12ce8f9fa9 chore(i18n): remove outdated items 2023-05-17 03:01:51 +08:00
Cotes Chung
d81f836b06 refactor: simplify basic layout (#1039)
A dynamically expanding/collapsing topbar is difficult to maintain and not very useful.
2023-05-17 01:59:34 +08:00
Cotes Chung
52f5ee9cd3 perf: calculate heading font size dynamically (#983) 2023-05-13 11:35:55 +08:00
Cotes Chung
b3c4d741b2 refactor(img): disable transition effect in popup images 2023-05-13 08:17:41 +08:00
Cotes Chung
129c4b3fa6 docs: update tutorial & demo content 2023-05-13 07:48:57 +08:00
Cotes Chung
fe18011f8a Merge branch 'feature/v6-core' 2023-05-13 07:15:47 +08:00
Cotes Chung
25ec7649cd chore(deps): upgrade the version of depdencies (#953, #994)
Resolves #953, #994
2023-05-13 07:13:16 +08:00
Cotes Chung
ea6268d7a5 chore(ci): upgrade commit-lint actions 2023-05-13 07:03:16 +08:00
Cotes Chung
1967de1f1d refactor(js): reduce function complexity 2023-05-13 07:03:15 +08:00
Cotes Chung
c283e7782f refactor!: rename assets origin configuration files 2023-05-13 07:03:15 +08:00
Cotes Chung
9d97120197 perf(assets): reduce HTTP requests to CDN 2023-05-13 03:29:06 +08:00
Cotes Chung
016a9baddd Merge branch 'feature/v6-ui' (#1034)
The UI of the next major version
2023-05-13 02:25:05 +08:00
Cotes Chung
d9e1d84f08 refactor(deps): upgrade bootstrap from v4.6 to v5.2
- update class name of the spacing, font style, cards and toasts
- update attribute names &  tooltip usage
- remove custom smooth scroll
- syntax colors
2023-05-13 02:05:33 +08:00
Cotes Chung
3210c59466 feat(ui): new design footer content layout 2023-05-13 02:05:33 +08:00
Cotes Chung
83f1c34f92 feat(ui): improve the design for top bar 2023-05-13 02:05:33 +08:00
Cotes Chung
83bbe4ac93 feat(ui): redesign the sidebar 2023-05-13 02:05:33 +08:00
Cotes Chung
6d99f5cc36 feat(ui): improve code snippet design 2023-05-13 02:05:33 +08:00
Cotes Chung
0c80552d77 perf(ui): mute the marker in lists 2023-05-13 02:05:32 +08:00
Cotes Chung
e38309f3bd perf(ui): improve inline code in light mode 2023-05-13 02:05:32 +08:00
Cotes Chung
8cbbcfa26d perf(ui): improve the color of prompts in dark mode 2023-05-13 02:05:32 +08:00
Cotes Chung
003e7b60c9 perf(ux): improve LQIP fade in effect 2023-05-13 02:05:32 +08:00
Cotes Chung
7c23a4ebc5 perf(ui): lighten the link color in light-mode 2023-05-13 02:05:32 +08:00
Cotes Chung
2a4d67d65c refactor: uniform block border radius
scope:
- categories
- posts (prompt, code snippets)
2023-05-13 02:05:32 +08:00
Cotes Chung
414dd132ae perf(ui): improve categories color in dark mode 2023-05-13 02:05:32 +08:00
Cotes Chung
f0266c1f78 refactor(scss): update vendor prefix 2023-05-13 02:05:31 +08:00
Cotes Chung
7626e4d005 perf(ui): improve hover effect for post preview cards
- home cards
- navigator buttons at the bottom post
2023-05-13 02:05:31 +08:00
Cotes Chung
34499f0c92 perf(ui): improve hover effect of trending tags 2023-05-13 02:05:31 +08:00
Cotes Chung
aadf9393d5 perf(ui): uniform the muted text color 2023-05-13 02:05:31 +08:00
Cotes Chung
2918da9f29 perf(ui): improve related posts design 2023-05-13 02:05:31 +08:00
Cotes Chung
97b8dfeed6 feat(ui): show preview image in home page 2023-05-13 02:05:30 +08:00
Cotes Chung
ee88cec270 fix: parameter parsing error in image URL (#1022) 2023-05-13 01:02:15 +08:00
Darian Miller
8da583d403 feat: support hiding the modification date of a post (#1020)
There is the current ability to set `last_modified_at` in the front matter of post and use that datetime instead of the built in logic.
New feature in post.html:  if the modified date time matches the date of the post, then don't show "Updated xxxx"
2023-05-06 11:04:17 +08:00
Cotes Chung
61fdbcb83a perf(i18n): set the global default locales to "en" (#979)
Avoid missing labels caused by languages ​​outside of locales.
2023-05-06 07:22:29 +08:00
Penek Suksuda
aca79c1007 chore(tools): fix typos (#1018) 2023-05-06 07:10:08 +08:00
Song-Zi Vong
fe203417d9 feat: add a hook to insert custom metadata in head tag (#1015) 2023-05-06 07:10:08 +08:00
Cotes
e90461aa3c perf(tools): avoid initialization interruption in single branch forks (#992) 2023-04-17 02:40:25 +08:00
Cotes
6f6e309741 chore(github): simplify PR template (#991) 2023-04-17 02:34:13 +08:00
Miha Tisnikar
42a700aa37 feat(i18n): add sl-SI.yml with slovenian translations (#989) 2023-04-17 01:37:49 +08:00
Song-Zi Vong
7ec31e8948 refactor: enhance the configurability of fonts (#986) 2023-04-17 01:31:49 +08:00
Cotes Chung
b63b65d743 chore(stylelint): optimize the rule for font-family variables (#987)
Turn off the rule `value-keyword-case` for `font-family`

Resolves #987
2023-04-16 09:08:54 +08:00
Song-Zi Vong
1719d81d00 fix(rss): double quotes in the post title will break the XML structure (#965) 2023-04-10 18:35:11 +08:00
Jörgen Ivarsson
fe7047959e feat(i18n): added Swedish localization file (#969)
Nice PR @JorgenIvarsson, everything from the branch name to the commit messages perfectly meets the requirements. Thanks!
2023-04-10 06:23:03 +08:00
郭桓桓
d97f95fca0 feat(i18n): add Traditional Chinese (Taiwan) localization file (#961) 2023-04-02 22:13:22 +08:00
Cotes Chung
39b81aa4e0 docs: update issue template (#958)
Close #958
2023-03-31 21:44:22 +08:00
Cotes Chung
387f0ec64a Merge branch 'master' into production 2023-03-31 05:46:37 +08:00
Cotes Chung
c45f399e65 chore(release): 5.6.1 2023-03-31 05:46:34 +08:00
Cotes Chung
8225174cb5 fix(deps): tocbot has no initialization detection (#957)
Resolves #957
2023-03-31 05:05:33 +08:00
Cotes Chung
8b4f99c87f fix: pageviews not updated immediately 2023-03-31 04:58:21 +08:00
Cotes Chung
6f97636fb9 chore(build): set rollup watching path 2023-03-31 04:55:43 +08:00
Cotes Chung
bf199d779c chore(deps): upgrade npm packages 2023-03-31 04:55:43 +08:00
Song-Zi Vong
6fec411c18 fix: mode-toggle leads to Disqus loading failure (#945) 2023-03-22 22:22:07 +08:00
167 changed files with 4568 additions and 4520 deletions

View File

@@ -1,5 +0,0 @@
# https://github.com/browserslist/browserslist#browserslistrc
last 2 versions
> 0.2%
not dead

View File

@@ -1,8 +0,0 @@
{
"rules": {
"body-max-line-length": [
0,
"always"
]
}
}

View File

@@ -1,55 +0,0 @@
# How to Contribute
:tada: We really appreciate you taking the time to improve this project! :tada:
To ensure that the blog design is not confusing, this project does not accept
suggestions for design changes, such as color scheme, fonts, typography, etc.
If your request is about an enhancement, it is recommended to first submit a
[Feature Request][pr-issue] issue to discuss whether your idea fits the project.
Basically, you can follow these steps to complete the contribution.
1. Fork this project on GitHub and clone it locally.
2. Create a new branch from the default branch and give it a descriptive name
(format: `feature/<add-new-feat>` or `fix/<fix-a-bug>`).
3. After completing development, create a [Conventional Commit][cc] with git.
(See also: ["Verify the commits"](#verify-the-commits))
4. Create a [Pull Request][gh-pr].
## Make sure you can pass the CI tests
This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
please read the following.
### Check the core functionality
```console
bash ./tools/test
```
### Check the SASS syntax style
```console
npm test
```
### Verify the commits
Before you create a git commit, please complete the following setup.
Install `commitlint` & `husky`:
```console
npm i -g @commitlint/{cli,config-conventional} husky
```
And then enable `husky`:
```console
husky install
```
[pr-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
[cc]: https://www.conventionalcommits.org/
[ci]: https://en.wikipedia.org/wiki/Continuous_integration

26
.github/DISCUSSION_TEMPLATE/general.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
body:
- type: checkboxes
attributes:
label: Checklist
description: Following the guidelines can make you more likely to get responses.
options:
- label: >-
I have read and accepted the
[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
required: true
- type: dropdown
attributes:
label: What is the topic?
options:
- Sharing tips and tricks
- Just chatting
validations:
required: true
- type: textarea
attributes:
label: Description
description: Please describe in detail what you want to share.
validations:
required: true

40
.github/DISCUSSION_TEMPLATE/q-a.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
body:
- type: checkboxes
attributes:
label: Checklist
description: Following the guidelines can make you more likely to get responses.
options:
- label: >-
I have read and accepted the
[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
required: true
- type: dropdown
id: download
attributes:
label: How did you create the site?
options:
- Generated from `chirpy-starter`
- Built from `jekyll-theme-chirpy`
validations:
required: true
- type: textarea
attributes:
label: Description
description: Please describe your need in detail.
validations:
required: true
- type: textarea
attributes:
label: Operations you have already tried
description: Describe the effort you went through.
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Or logs? Anything that will give us more context about the issue you are encountering!

View File

@@ -1,68 +0,0 @@
---
name: Bug Report
about: Create a report to help us improve
---
**NOTE:** Before you start, the following should be completed.
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Make sure the bug is found in the latest code of the `master` branch.
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
## Describe the bug
<!-- A clear and concise description of what the bug is. -->
## To Reproduce
Steps to reproduce the behavior:
<!--
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## Logs/Screenshots
<!-- If applicable, add logs/screenshots to help explain your problem. -->
## Environment
| Command | Version |
|-----------------------------------|---------|
| `ruby -v` | |
| `gem -v` | |
| `bundle -v` | |
| `bundle exec jekyll -v` | |
| `bundle info jekyll-theme-chirpy` | |
<!-- If necessary, uncomment and fill in the following list:
### Desktop
- OS: [e.g. macOS 10.15.6]
- Browser: [e.g. Chrome 85.0.4183.83 (64-bit)]
-->
<!-- If necessary, uncomment and fill in the following list:
### Smartphone
- Device: [e.g. iPhone 6]
- OS: [e.g. iOS 13.6.1]
- Browser: [e.g. Chrome 22]
-->
## Additional context
<!-- Add any other context about the problem here. -->

64
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Bug Report
description: Create a report to help us improve
body:
- type: checkboxes
attributes:
label: Checklist
description: Following the guidelines can make you more likely to get responses.
options:
- label: >-
I have read and accepted the
[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
required: true
- type: dropdown
id: download
attributes:
label: How did you create the site?
options:
- Generated from `chirpy-starter`
- Built from `jekyll-theme-chirpy`
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Environment
value: |
- Ruby: <!-- run `ruby -v` -->
- Jekyll: <!-- run `bundle exec jekyll -v` -->
- Chirpy: <!-- run `bundle info jekyll-theme-chirpy` -->
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Or logs? Anything that will give us more context about the issue you are encountering!

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask the community for help
url: https://github.com/cotes2020/jekyll-theme-chirpy/discussions
about: Please ask and answer questions here.

View File

@@ -1,33 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project
labels: enhancement
---
**NOTE:** Before you start, the following should be completed.
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Make sure the request is based on the latest code in the `master` branch.
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
## Is your feature request related to a problem? Please describe
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
## Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
## Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
## Additional context
<!-- Add any other context or screenshots about the feature request here. -->

View File

@@ -0,0 +1,38 @@
name: Feature Request
description: Suggest an idea for this project
labels:
- enhancement
body:
- type: checkboxes
attributes:
label: Checklist
description: Following the guidelines can make you more likely to get responses.
options:
- label: >-
I have read and accepted the
[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

View File

@@ -1,28 +0,0 @@
---
name: Help Wanted
about: Need help that is not covered in the tutorial
labels: 'help wanted'
---
**NOTE:** Before you start, the following should be completed.
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
[forum]: https://talk.jekyllrb.com/
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
## Description
<!-- Please describe your need in detail. -->
## Operations you have already tried
<!-- Describe the effort you went through. -->
## Logs/Screenshots
<!-- If applicable, add logs/screenshots to help explain your problem. -->

View File

@@ -1,20 +0,0 @@
---
name: Question
about: Issues that differ from other templates
labels: question
---
**NOTE:** Before you start, the following should be completed.
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
[forum]: https://talk.jekyllrb.com/
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
## Description
<!-- Please describe your question in detail. -->

View File

@@ -1,34 +1,17 @@
## Description
<!--
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
e.g. Fixes #(issue)
-->
## Type of change
<!--
Please select the desired item checkbox and change it to "[x]", then delete options that are not relevant.
-->
<!-- Please select the desired item checkbox and change it from `[ ]` to `[x]` and then delete the irrelevant options. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Improvement (refactoring and improving code)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## How has this been tested
## Description
<!--
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->
- [ ] I have run `bash ./tools/test` (at the root of the project) locally and passed
- [ ] I have tested this feature in the browser
### Test Configuration
- Browser type & version:
- Operating system:
- Ruby version: <!-- by running: `ruby -v` -->
- Bundler version: <!-- by running: `bundle -v`-->
- Jekyll version: <!-- by running: `bundle list | grep " jekyll "` -->
## Additional context
<!-- e.g. Fixes #(issue) -->

12
.github/SECURITY.md vendored
View File

@@ -1,12 +0,0 @@
# Security Policy
## Supported Versions
| Version | Supported |
|---------| ------------------ |
| 5.x | :white_check_mark: |
| < 5.0.0 | :x: |
## Reporting a Vulnerability
If you find a vulnerability, please report it to `cotes.chung@gmail.com`. We will try our best to respond within a week. Thank you for your time!

2
.github/codeql/codeql-config.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
paths-ignore:
- "assets/js"

26
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
versioning-strategy: increase
groups:
bundler:
dependency-type: "production"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
versioning-strategy: increase
groups:
npm:
dependency-type: "development"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
groups:
gh-actions:
update-types:
- "major"
schedule:
interval: "weekly"

17
.github/stale.yml vendored
View File

@@ -1,17 +0,0 @@
# Clean up the stale issues
daysUntilStale: 30
daysUntilClose: 1
exemptLabels:
- in progress
- pending
staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
closeComment: false

View File

@@ -1,7 +1,10 @@
name: CD
on:
push:
branches: [production, docs]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- docs
jobs:
launch:

View File

@@ -8,6 +8,7 @@ on:
- ".github/**"
- "!.github/workflows/ci.yml"
- ".gitignore"
- "docs/**"
- "README.md"
- "LICENSE"
pull_request:
@@ -20,11 +21,11 @@ jobs:
strategy:
matrix:
ruby: [2.7, 3]
ruby: ["3.0", "3.1", "3.2"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # for posts's lastmod
@@ -35,7 +36,7 @@ jobs:
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- name: Build Assets
run: npm i && npm run build

View File

@@ -2,11 +2,9 @@ name: "CodeQL"
on:
push:
paths: ["**.js"]
paths: ["_javascript/**/*.js"]
pull_request:
paths: ["**.js"]
schedule:
- cron: "0 0 * * 5"
paths: ["_javascript/**/*.js"]
jobs:
analyze:
@@ -25,20 +23,21 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: "${{ matrix.language }}"
config-file: .github/codeql/codeql-config.yml
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"

View File

@@ -5,7 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
- uses: wagoid/commitlint-github-action@v5

View File

@@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# submodules: true
@@ -37,12 +37,12 @@ jobs:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted
ruby-version: 3.2
bundler-cache: true
- name: Build site
@@ -52,10 +52,12 @@ jobs:
- name: Test site
run: |
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href
bundle exec htmlproofer _site \
\-\-disable-external=true \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "_site${{ steps.pages.outputs.base_path }}"
@@ -68,4 +70,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4

32
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "0 0 * * *" # every day at 00:00 UTC
permissions:
issues: write
pull-requests: write
env:
STALE_LABEL: stale
EXEMPT_LABELS: "pending,planning,in progress"
MESSAGE: >
This conversation has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
Thank you for your contributions.
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
# 60 days before marking issues/PRs stale
days-before-close: -1 # does not close automatically
stale-issue-label: ${{ env.STALE_LABEL }}
exempt-issue-labels: ${{ env.EXEMPT_LABELS }}
stale-issue-message: ${{ env.MESSAGE }}
stale-pr-label: ${{ env.STALE_LABEL }}
exempt-pr-labels: ${{ env.EXEMPT_LABELS }}
stale-pr-message: ${{ env.MESSAGE }}

View File

@@ -17,9 +17,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- run: npm i
- run: npm test

1
.gitignore vendored
View File

@@ -16,7 +16,6 @@ package-lock.json
# IDE configurations
.idea
.vscode
# Misc
assets/js/dist

View File

@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no -- commitlint -x $(npm root -g)/@commitlint/config-conventional --edit
npx --no -- commitlint --edit ${1}

View File

@@ -1,3 +0,0 @@
{
"trailingComma": "none"
}

View File

@@ -1,21 +0,0 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"no-descending-specificity": null,
"shorthand-property-no-redundant-values": null,
"at-rule-no-vendor-prefix": null,
"property-no-vendor-prefix": null,
"selector-no-vendor-prefix": null,
"value-no-vendor-prefix": null,
"color-function-notation": "legacy",
"alpha-value-notation": "number",
"selector-not-notation": "simple",
"color-hex-length": "long",
"declaration-block-single-line-max-declarations": 3,
"scss/operator-no-newline-after": null,
"rule-empty-line-before": [
"always",
{ "ignore": ["after-comment", "first-nested", "inside-block"] }
]
}
}

View File

@@ -1,20 +0,0 @@
{
"skip": {
"commit": true,
"tag": true
},
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Improvements"
}
]
}

12
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"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"
]
}

24
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,24 @@
{
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.trailingComma": "none",
// Shopify Liquid
"files.associations": {
"*.html": "liquid"
},
// Formatter
"[html][liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
// 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"]
}

View File

@@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [5.6.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.2...v5.6.0) (2023-03-17)
### Features
* change TOC plugin to `tocbot` ([#774](https://github.com/cotes2020/jekyll-theme-chirpy/issues/774)) ([02b7bd5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/02b7bd5095a2affe5b4c5ed7b5b182baaf642ff3))
* **i18n:** add Greek Language Support. ([#903](https://github.com/cotes2020/jekyll-theme-chirpy/issues/903)) ([712a9b2](https://github.com/cotes2020/jekyll-theme-chirpy/commit/712a9b22401ce591cf4c0bb03fbdd1693fee30bb))
* **ux:** turn home page posts into clickable cards ([#895](https://github.com/cotes2020/jekyll-theme-chirpy/issues/895)) ([b85f633](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b85f6330dea666350631c4461b742cdb54c5f052))
### Bug Fixes
* css selector string escaping vulnerability ([#888](https://github.com/cotes2020/jekyll-theme-chirpy/issues/888)) ([5c6ec9d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5c6ec9d06b6571e2c0efe6652078442dca8af477))
* mathematics cannot scroll horizontally ([#760](https://github.com/cotes2020/jekyll-theme-chirpy/issues/760)) ([4681df7](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4681df715118a37ae1e91b588de0adb67f4e331a))
* notch status bar doesn't match theme color ([#918](https://github.com/cotes2020/jekyll-theme-chirpy/issues/918)) ([820ba62](https://github.com/cotes2020/jekyll-theme-chirpy/commit/820ba62e9e939090523a7077d01d01bd78ec84eb))
* some console snippets will be incompletely copied ([e8e4901](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e8e4901e340dd7e5fc5f656dd3c7bcd6c97b886a))
## [5.5.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.1...v5.5.2) (2023-01-30)
### Bug Fixes
* position of prompt icon is incorrect in paragraph on mobile ([5df953f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5df953f6c877e2aa3f1f4981c97a0b8007abe6d4))
## [5.5.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.0...v5.5.1) (2023-01-29)
### Bug Fixes
* the icon position of the prompts in the list is incorrect ([0c9558d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0c9558de8a01e9ab795778f351a8bbf4d6b21763))
## [5.5.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.4.0...v5.5.0) (2023-01-29)
### Features
* **i18n:** add Arabic translation ([#857](https://github.com/cotes2020/jekyll-theme-chirpy/issues/857)) ([765af53](https://github.com/cotes2020/jekyll-theme-chirpy/commit/765af53b77e5c63804784d5728f5970ae274c2c7))
* **i18n:** add Czech language ([#833](https://github.com/cotes2020/jekyll-theme-chirpy/issues/833)) ([98d48f5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/98d48f5da412276d4a0c99cd01a87b19349bc6bc))
* **i18n:** add Finnish translations ([#843](https://github.com/cotes2020/jekyll-theme-chirpy/issues/843)) ([d6d0318](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d6d03183eaf94b44e037cc48b6e1c47cee183f6e))
* **i18n:** add Italian translation ([#850](https://github.com/cotes2020/jekyll-theme-chirpy/issues/850)) ([9a011e1](https://github.com/cotes2020/jekyll-theme-chirpy/commit/9a011e14d66195d8b2fb9ec62f3e60a3e56cd032))
### Bug Fixes
* copy command line incomplete(`.gp` part) ([41ed331](https://github.com/cotes2020/jekyll-theme-chirpy/commit/41ed33145639415148aec8e85edc7a6fd0de0ca3))
* correct encoding of spaces in share URLs ([#835](https://github.com/cotes2020/jekyll-theme-chirpy/issues/835)) ([f2d2858](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f2d285844e6e2979f2b0eec1d20073d3c05b6c0c))
* post's image would cover the PWA update alert ([bd374dd](https://github.com/cotes2020/jekyll-theme-chirpy/commit/bd374dd383c50f89c8f018ecb4e25772eeb8f6d8))
* prompt with nested blockquotes renders incorrectly ([#846](https://github.com/cotes2020/jekyll-theme-chirpy/issues/846)) ([babb4a0](https://github.com/cotes2020/jekyll-theme-chirpy/commit/babb4a0c5a58ceb2e4093bc465670accdd526c18))
## [5.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.2...v5.4.0) (2022-12-27)
### Features
* add `rel="me"` to Mastodon sidebar contact links for verification ([#807](https://github.com/cotes2020/jekyll-theme-chirpy/issues/807)) ([d2190c7](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d2190c726f61c8c9732b88b4aecf699dc8bc7deb))
* add embed video support ([ed6dc53](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ed6dc539eff7003a3765bcd8c31ae5e91a863d65))
* add shimmer background when image loads ([ab16fdc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ab16fdc7fc26811130b98a1773beb62bff6182e8))
* set preview image ratio to 1.91 : 1 ([4b6ccbc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf))
* support dark and light mode images ([#481](https://github.com/cotes2020/jekyll-theme-chirpy/issues/481)) ([9306c7b](https://github.com/cotes2020/jekyll-theme-chirpy/commit/9306c7b39ecf9d9146bc1a25eebedc38eb2c3dd6))
* support LQIP for images ([bffaf63](https://github.com/cotes2020/jekyll-theme-chirpy/commit/bffaf6374f265cec96ef743d42b46fbec3b59797))
### Bug Fixes
* `hreflang` tag attribute of feed misses `site.alt_lang` ([7651d28](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7651d2851b4bb7d8f0d068b62c036c89a1089bbc))
* `og:image` will be incorrect if the image uses a cross-domain URL ([8de1abd](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8de1abda6be3633982392178731431b0ddb1b52b))
* refactoring error when the image URL contains parameters ([ec98f07](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ec98f07aca0b80a9c07fbcdc8e0d7d66dba98ed2))
* spaces in post title are encoded when sharing ([7efd2f8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7efd2f8aa2ea1c3aeb7d740bf9a018881c26fe65))
### Improvements
* **cdn:** optimize cache policy for static assets ([7fb0ee0](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7fb0ee0bedb63eee3f90a49c6d7fb8b5d78c9830))
## [5.3.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.1...v5.3.2) (2022-11-22)
### Bug Fixes
* `mermaid` occasionally fails to initialize ([#536](https://github.com/cotes2020/jekyll-theme-chirpy/issues/536)) ([48f14e3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/48f14e39ac81bbfb3b9913ea3ee789d775b2d1ae))
* **comment:** disqus doesn't follow theme mode switching ([b0d5956](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b0d5956f5a0ed894984d6b1754efeba04d8bc966))
* restore full-text search ([#741](https://github.com/cotes2020/jekyll-theme-chirpy/issues/741)) ([6774e0e](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6774e0e1fb37cf467b14be481347412713763f05))
* the image URL in the SEO-related tags is incomplete ([#754](https://github.com/cotes2020/jekyll-theme-chirpy/issues/754)) ([f6e9a3f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f6e9a3fccf7ab34db71f8aefaf86fdcc05861076))
## [5.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.3.0...v5.3.1) (2022-10-25)
### Bug Fixes
* 404 page missing title in tablet/desktop view ([5511b28](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5511b2883fd5a395fddfb642588d00c122f18da7))
* prompt content overflows horizontally ([#705](https://github.com/cotes2020/jekyll-theme-chirpy/issues/705)) ([fb13e32](https://github.com/cotes2020/jekyll-theme-chirpy/commit/fb13e3219b5eca0d2e4f86a1ecabfab75240369f))
* **tools:** multiple configuration files will fail the test ([80cb0b3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/80cb0b371754e96772a7907877a8ce196398ba3d))
### Improvements
* **layout:** improve the min-height of main content ([#674](https://github.com/cotes2020/jekyll-theme-chirpy/issues/674)) ([49bb93c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/49bb93cc0c89ad9cfaad5edcf9cb28c3d5134575))
* modify checkbox icon with `Liquid` ([1fd665b](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1fd665bf4990c26ae23635c511c5abc9640184d1))
* optimize the extra padding in lists ([#703](https://github.com/cotes2020/jekyll-theme-chirpy/issues/703)) ([39da11e](https://github.com/cotes2020/jekyll-theme-chirpy/commit/39da11e3f3685f49321757576d2b87a48bf25db5)), closes [#702](https://github.com/cotes2020/jekyll-theme-chirpy/issues/702)
* **posts:** improve core block bottom padding ([d2fb98b](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d2fb98b3e57f2f6c3fc3816551cd0721731adf40))
* truncate post content for search results ([647eea8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/647eea8dbd716f9d3cb8330c3139fa753903f51d))
* **typography:** optimize the line height of post content ([eac3f9b](https://github.com/cotes2020/jekyll-theme-chirpy/commit/eac3f9b434ca77e3dc64eea9cedea7b93e7b306b))
### Others
* **giscus:** add `reactions-enabled` option ([#712](https://github.com/cotes2020/jekyll-theme-chirpy/issues/712)) ([70662a0](https://github.com/cotes2020/jekyll-theme-chirpy/commit/70662a0365e6b9378602dc0a57462ddad5aebcf5))
* **locale:** restore options for changing date format ([#716](https://github.com/cotes2020/jekyll-theme-chirpy/issues/716)) ([f904e8c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f904e8cd48c343cc31e25859d9d50bfe2c056f41))
* remove site config option `prefer_datetime_locale` ([6852ceb](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6852ceb280927ff4e753a3e1131f2b396d9807d0))
## [5.3.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.2.1...v5.3.0) (2022-09-23)
### Features
* add multiple authors to a post ([#677](https://github.com/cotes2020/jekyll-theme-chirpy/issues/677)) ([f1d9e99](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f1d9e99bc02d3cd0a6b0cd1beac545f0cc7a24f8)), closes [#675](https://github.com/cotes2020/jekyll-theme-chirpy/issues/675)
* **i18n:** add Bulgarian support ([#612](https://github.com/cotes2020/jekyll-theme-chirpy/issues/612)) ([2fed338](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2fed338ce6d078bf528c9717201fbc475f88cd22))
* **i18n:** add German locale file ([#663](https://github.com/cotes2020/jekyll-theme-chirpy/issues/663)) ([940b281](https://github.com/cotes2020/jekyll-theme-chirpy/commit/940b2810e95065e30600ae8d5e4612e7183da60e))
* **i18n:** add Hungarian locale file ([#597](https://github.com/cotes2020/jekyll-theme-chirpy/issues/597), [#598](https://github.com/cotes2020/jekyll-theme-chirpy/issues/598)) ([b032977](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b0329775fc24d0323e5cc04cda46ece8b4531802))
* **i18n:** add Turkish language ([#631](https://github.com/cotes2020/jekyll-theme-chirpy/issues/631)) ([ad137fa](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ad137fa2945b1870b9c1dd5e9212a5f4af7c3580))
### Bug Fixes
* add missing color to linkedin icon for share list ([#683](https://github.com/cotes2020/jekyll-theme-chirpy/issues/683)) ([0dcd39d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0dcd39d491c9c49e4acf7f75f83fe6e1d1839e37))
* code contains spaces in headings ([#644](https://github.com/cotes2020/jekyll-theme-chirpy/issues/644)) ([3fa1bf3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/3fa1bf305451f645a7f3aa93863b076463c8f165))
* correct spelling of `panel` ([#686](https://github.com/cotes2020/jekyll-theme-chirpy/issues/686)) ([b288587](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b288587c1c3d113a1c52c2d25fb46cddda348961))
* correct the i18n for tab titles ([0c5b697](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0c5b697fd3b283b6a5c926742b61ed49d8688c18))
* the `code` doesn't wrap inside the prompt ([#626](https://github.com/cotes2020/jekyll-theme-chirpy/issues/626)) ([378b65a](https://github.com/cotes2020/jekyll-theme-chirpy/commit/378b65a0617787813519dde74d6f741f255eff3d))
## [5.2.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.2.0...v5.2.1) (2022-06-17)
### Bug Fixes
* exclude CHANGELOG from output ([971fe03](https://github.com/cotes2020/jekyll-theme-chirpy/commit/971fe03ec329ae49e7d60fe3af6101cfbd1acd6c))
* **PWA:** sometimes update notification is not triggered ([96af729](https://github.com/cotes2020/jekyll-theme-chirpy/commit/96af7291ea5b2c5ed6372e7b6f7725e67c69f1ba))
## [5.2.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.1.0...v5.2.0) (2022-06-09)
### Features
* add es-ES support to locales ([#533](https://github.com/cotes2020/jekyll-theme-chirpy/issues/533)) ([efe75ad](https://github.com/cotes2020/jekyll-theme-chirpy/commit/efe75adf2784956afb7a0b67f6634b146d9cb03b))
* add fr-FR support to locales ([#582](https://github.com/cotes2020/jekyll-theme-chirpy/issues/582)) ([94e8144](https://github.com/cotes2020/jekyll-theme-chirpy/commit/94e81447afa457b1a6b7e8f487c47502803556d7))
* add Vietnamese locale ([#517](https://github.com/cotes2020/jekyll-theme-chirpy/issues/517)) ([171463d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/171463d76da9b7bc25dd327b8f0a868ea79e388b))
* add pt-BR support to locales ([c2c503f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/c2c503f63336884282b6bda4ec0703d6ae76771b))
* add option to turn off PWA ([#527](https://github.com/cotes2020/jekyll-theme-chirpy/issues/527)) ([106c981](https://github.com/cotes2020/jekyll-theme-chirpy/commit/106c981bac71e7434204a77e1f0c9c61d6eb1509))
* **PWA:** add Service Worker update notification ([d127183](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d127183b9774f6321e409acdb66bf8a85d8814be))
* support showing description of preview image ([2bd6efa](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2bd6efa95a174ac44e30a3af1e57e6f40d6e0e3a))
### Bug Fixes
* alt is not a valid attribute for 'a' tag ([58928db](https://github.com/cotes2020/jekyll-theme-chirpy/commit/58928dbc9068db4e4cda4371eeae1865920dce6a))
* assets URL is missing `baseurl` in self-hosted mode ([#591](https://github.com/cotes2020/jekyll-theme-chirpy/issues/591)) ([54124d5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/54124d5134995fce52e4c2fc0a5d4d1743d6264d))
* correct the `twitter:creator` of Twitter summary card ([96a16c8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/96a16c868ede51e7dfa412de63ffa1e5a49add7f))
* correctly URL encode share links ([4c1c8d8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4c1c8d8b0eacecbbaa2d522bbdd6430f350ff760)), closes [#496](https://github.com/cotes2020/jekyll-theme-chirpy/issues/496)
* follow paginate_path config for pagination ([6900d9f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6900d9f2bc9380cbda4babf611c6eeff345291af))
* force checkout of `gh-pages` branch ([#544](https://github.com/cotes2020/jekyll-theme-chirpy/issues/544)) ([5402523](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5402523ae52a3740bcc15df0b226b2612644945d))
* horizontal scroll for long equations ([#545](https://github.com/cotes2020/jekyll-theme-chirpy/issues/545)) ([30787fc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/30787fc4cf151e955bb7afc26dfd859f1a06fce6))
* p is not allowed in span ([4f590e2](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4f590e2bba0639751771211bc0d357828ae70404))
* remove whitespace from avatar URL ([#537](https://github.com/cotes2020/jekyll-theme-chirpy/issues/537)) ([0542b51](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0542b5149c8287dca60e37f46ee36f31b43455e4))
* resume the preview image SEO tag ([#529](https://github.com/cotes2020/jekyll-theme-chirpy/issues/529)) ([b8d1bcd](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b8d1bcd3dea0abd1afef7ef154a4501fbb18938d))
* script code should be in head or body, not in between ([2103191](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2103191b2faf714a8e4418c7c347a1f942b51af8))
* spurious header closing tags ([59e9557](https://github.com/cotes2020/jekyll-theme-chirpy/commit/59e955745f02f9b57c65af70b0979cd4a98bf53f))
* table bypass refactoring when it contains IAL ([#519](https://github.com/cotes2020/jekyll-theme-chirpy/issues/519)) ([5d85ccb](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5d85ccb9943aac88dbbefebe1c2234cdcbae5c53))
* **theme mode:** `SCSS` syntax error ([#588](https://github.com/cotes2020/jekyll-theme-chirpy/issues/588)) ([76a1b6a](https://github.com/cotes2020/jekyll-theme-chirpy/commit/76a1b6a068c369138422dcd18ba08ec8cc3749a6))
* use `jsonify` to generate valid json ([#521](https://github.com/cotes2020/jekyll-theme-chirpy/issues/521)) ([dd9d5a7](https://github.com/cotes2020/jekyll-theme-chirpy/commit/dd9d5a7207b746342d07176d8969dc4f2c380bf2))
* when the `site.img_cdn` is set to the local path, the preview-image path loses the `baseurl` ([9cefe58](https://github.com/cotes2020/jekyll-theme-chirpy/commit/9cefe58993d9ea3a3a28424e7ffd8e0911567c5c))
### Improvements
* avoid post pageviews from shifting while loading ([135a16f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/135a16f13ee783d9308669ff9a824847a73c951c))
* avoid the layout shift for post datetime ([6d35f5f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6d35f5f8da044cfad071628bb53776de03efaae4))
* **categories:** support singular and plural forms of locale ([#595](https://github.com/cotes2020/jekyll-theme-chirpy/issues/595)) ([35cadf9](https://github.com/cotes2020/jekyll-theme-chirpy/commit/35cadf969dd0161ee62503e242c545f006f7072b))
* improve the responsive design for ultrawide screens ([#540](https://github.com/cotes2020/jekyll-theme-chirpy/issues/540)) ([5d6e8c5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5d6e8c5ef6aa71b4d2600c5305f6e8ba540557f7))

View File

@@ -5,7 +5,7 @@ source "https://rubygems.org"
gemspec
group :test do
gem "html-proofer", "~> 3.18"
gem "html-proofer", "~> 4.4"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
@@ -21,8 +21,3 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
# Lock jekyll-sass-converter to 2.x on Linux-musl
if RUBY_PLATFORM =~ /linux-musl/
gem "jekyll-sass-converter", "~> 2.0"
end

100
README.md
View File

@@ -2,15 +2,15 @@
# Chirpy Jekyll Theme
A minimal, responsive and feature-rich Jekyll theme for technical writing.
A minimal, responsive, and feature-rich Jekyll theme for technical writing.
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cotes2020/jekyll-theme-chirpy&amp;utm_campaign=Badge_Grade)
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
[![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)
[**Live Demo →**][demo]
[**Live Demo** →][demo]
[![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)][demo]
@@ -18,78 +18,64 @@
## Features
<details>
<summary>
<i>Click to view features</i>
</summary>
<p>
- Dark / Light Theme Mode
- Localized UI language
- Pinned Posts
- Hierarchical Categories
- Trending Tags
- Table of Contents
- Last Modified Date of Posts
- Syntax Highlighting
- Mathematical Expressions
- Mermaid Diagram & Flowchart
- Dark / Light Mode Images
- Embed Videos
- Disqus / Utterances / Giscus Comments
- Search
- Atom Feeds
- Google Analytics
- Page Views Reporting
- SEO & Performance Optimization
</p>
</details>
- Dark / Light Theme Mode
- Localized UI language
- Pinned Posts on Home Page
- Hierarchical Categories
- Trending Tags
- Table of Contents
- Last Modified Date
- Syntax Highlighting
- Mathematical Expressions
- Mermaid Diagrams & Flowcharts
- Dark / Light Mode Images
- Embed Videos
- Disqus / Giscus / Utterances Comments
- Built-in Search
- Atom Feeds
- PWA
- Google Analytics / GoatCounter
- SEO & Performance Optimization
## Documentation
To explore usage, development, and upgrade guide of the project, please refer to
the [Wiki][wiki].
To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki].
## Contributing
Welcome to report bugs, help improve the code or submit new features.
For more information, please see the ["Contributing Guidelines"][contribute-guide].
Contributions (_pull requests_, _issues_, and _discussions_) are what make the open-source community such an amazing place
to learn, inspire, and create. Any contributions you make are greatly appreciated.
For details, see the "[Contributing Guidelines][contribute-guide]".
## Credits
This theme is mainly built with [Jekyll][jekyllrb] ecosystem,
[Bootstrap][bootstrap], [Font Awesome][icons] and some other [wonderful tools][lib].
The avatar and favicon design come from [Clipart Max][image].
### Contributors
Thanks to all the [contributors][contributors]. Also, folks who submitted issues
or unmerged PRs should not be forgotten. Because they reported bugs, shared ideas,
or inspired me to write more readable documentation.
Thanks to [all the contributors][contributors] involved in the development of the project!
Last but not least, thanks to [JetBrains][jetbrains] for providing the
_Open Source Development_ license.
[![all-contributors](https://contrib.rocks/image?repo=cotes2020/jekyll-theme-chirpy&columns=16)][contributors]
<sub> —— Made with [contrib.rocks](https://contrib.rocks)</sub>
## Sponsoring
### Third-Party Assets
If you'd like to sponsor this project, the following options are available.
This project is built on the [Jekyll][jekyllrb] ecosystem and some [great libraries][lib], and is developed using [VS Code][vscode] as well as tools provided by [JetBrains][jetbrains] under a non-commercial open-source software license.
[![Ko-fi](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff5f5f?logo=ko-fi&logoColor=white)](https://ko-fi.com/coteschung)
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][donation]
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][donation]
The avatar and favicon for the project's website are from [ClipartMAX][clipartmax].
## License
This work is published under [MIT][mit] License.
This project is published under [MIT License][license].
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
[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
[jekyllrb]: https://jekyllrb.com/
[bootstrap]: https://getbootstrap.com/
[icons]: https://fontawesome.com/
[image]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[demo]: https://cotes2020.github.io/chirpy-demo/
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
[lib]: https://github.com/cotes2020/chirpy-static-assets
[vscode]: https://code.visualstudio.com/
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
[donation]: https://sponsor.cotes.page/
[mit]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE

View File

@@ -3,16 +3,12 @@
# Import the theme
theme: jekyll-theme-chirpy
# Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
# and doesn't have a custom domain.
baseurl: ""
# The language of the webpage http://www.lingoes.net/en/translator/langcode.htm
# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
# otherwise, the layout language will use the default value of 'en'.
lang: en
# Change to your timezone http://www.timezoneconverter.com/cgi-bin/findzone/findzone
# Change to your timezone https://kevinnovak.github.io/Time-Zone-Picker
timezone: Asia/Shanghai
# jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
@@ -25,7 +21,8 @@ tagline: A text-focused Jekyll theme # it will display as the sub-title
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'
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
url: ""
github:
@@ -54,10 +51,9 @@ google_site_verification: # fill in to your verification string
google_analytics:
id: # fill in your Google Analytics ID
# Google Analytics pageviews report settings
pv:
proxy_endpoint: # fill in the Google Analytics superProxy endpoint of Google App Engine
cache_path: # the local PV cache data, friendly to visitors from GFW region
goatcounter:
id: # fill in your Goatcounter ID
# Prefer color scheme setting.
#
@@ -70,7 +66,7 @@ google_analytics:
# light - Use the light color scheme
# dark - Use the dark color scheme
#
theme_mode: # [light|dark]
theme_mode: # [light | dark]
# The CDN endpoint for images.
# Notice that once it is assigned, the CDN url
@@ -82,6 +78,10 @@ img_cdn: "https://chirpy-img.netlify.app"
# the avatar on sidebar, support local or CORS resources
avatar: "/commons/avatar.jpg"
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
# It can be overridden by a customized `page.image` in front matter.
social_preview_image: # string, local or CORS resources
# boolean type, the global switch for TOC in posts.
toc: true
@@ -111,13 +111,23 @@ assets:
enabled: # boolean, keep empty means false
# specify the Jekyll environment, empty means both
# only works if `assets.self_host.enabled` is 'true'
env: # [development|production]
env: # [development | production]
pwa:
enabled: true # the option for PWA feature
enabled: true # the option for PWA feature (installable)
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.
deny_paths:
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA
paginate: 10
# The base URL of your site
baseurl: ""
# ------------ The following options are not recommended to be modified ------------------
kramdown:
@@ -157,10 +167,6 @@ defaults:
values:
layout: page
permalink: /:title/
- scope:
path: assets/img/favicons
values:
swcache: true
- scope:
path: assets/js/dist
values:
@@ -181,12 +187,11 @@ compress_html:
exclude:
- "*.gem"
- "*.gemspec"
- docs
- tools
- README.md
- CHANGELOG.md
- LICENSE
- rollup.config.js
- node_modules
- package*.json
jekyll-archives:

View File

@@ -1,62 +0,0 @@
# CDNs
cdns:
# Google Fonts
- url: https://fonts.googleapis.com
- url: https://fonts.gstatic.com
args: crossorigin
- url: https://fonts.googleapis.com
# jsDelivr CDN
- url: https://cdn.jsdelivr.net
# fonts
webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap
# Libraries
jquery:
js: https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js
bootstrap:
css: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css
js: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js
toc:
css: https://cdn.jsdelivr.net/npm/tocbot@4.20.1/dist/tocbot.min.css
js: https://cdn.jsdelivr.net/npm/tocbot@4.20.1/dist/tocbot.min.js
fontawesome:
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.1/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@9.2.2/dist/mermaid.min.js
dayjs:
js:
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/dayjs.min.js
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/locale/:LOCALE.min.js
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/relativeTime.min.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/localizedFormat.min.js
countup:
js: https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js
magnific-popup:
css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
lazysizes:
js: https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js
clipboard:
js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
polyfill:
js: https://polyfill.io/v3/polyfill.min.js?features=es6
mathjax:
js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js

View File

@@ -4,7 +4,7 @@
icon: "fab fa-github"
- type: twitter
icon: "fab fa-twitter"
icon: "fa-brands fa-x-twitter"
- type: email
icon: "fas fa-envelope"

View File

@@ -40,7 +40,7 @@ copyright:
ما لم يذكر خلاف ذلك ، يتم ترخيص منشورات المدونة على هذا الموقع
بموجب ترخيص Creative Commons Attribution 4.0 International (CC BY 4.0) من قبل المؤلف.
meta: باستخدام :PLATFORM السمة :THEME.
meta: باستخدام :PLATFORM السمة :THEME
not_found:
statment: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.
@@ -70,18 +70,16 @@ post:
share_link:
title: أنسخ الرابط
succeed: تم نسخ الرابط بنجاح!
# pinned prompt of posts list on homepage
pin_prompt: مثبت
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Освен ако не е посочено друго, публикациите в блога на този сайт са лицензирани
под лиценза Creative Commons Attribution 4.0 (CC BY 4.0) от автора.
meta: Създадено чрез :PLATFORM и :THEME тема.
meta: Създадено чрез :PLATFORM и :THEME тема
not_found:
statment: Съжалявам, но на този URL адрес няма налично съдържание.
@@ -70,8 +70,6 @@ post:
share_link:
title: Копирай линк
succeed: Линкът е копиран успешно!
# pinned prompt of posts list on homepage
pin_prompt: Прикрепенa
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Pokud není uvedeno jinak, jsou příspěvky na tomto webu licencovány
pod licencí Creative Commons Attribution 4.0 International (CC BY 4.0) Licence autora.
meta: Použití :PLATFORM s motivem :THEME.
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.
@@ -70,18 +70,16 @@ post:
share_link:
title: Kopírovat odkaz
succeed: Zkopírováno!
# pinned prompt of posts list on homepage
pin_prompt: Připnuto
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:

View File

@@ -39,7 +39,7 @@ copyright:
verbose: >-
Alle Einträge auf dieser Seite stehen, soweit nicht anders angegeben, unter der Lizenz Creative Commons Attribution 4.0 (CC BY 4.0).
meta: Powered by :PLATFORM with :THEME theme.
meta: Powered by :PLATFORM with :THEME theme
not_found:
statment: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.
@@ -58,7 +58,7 @@ post:
pageview_measure: Aufrufe
read_time:
unit: Minuten
prompt: lesen
prompt: Lesezeit
relate_posts: Weiterlesen
share: Teilen
button:
@@ -69,9 +69,14 @@ post:
share_link:
title: Link kopieren
succeed: Link erfolgreich kopiert!
# pinned prompt of posts list on homepage
pin_prompt: Angepinnt
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"
# categories page
categories:
category_measure:

View File

@@ -40,7 +40,7 @@ copyright:
Εκτός αλλού ή οπουδήποτε αλλού, τα blog posts σε αυτήν την σελίδα βρίσκονται υπο την άδεια
Creative Commons Attribution 4.0 International (CC BY 4.0) του δημιουργού.
meta: Αξιοποιώντας την :PLATFORM theme :THEME.
meta: Αξιοποιώντας την :PLATFORM theme :THEME
not_found:
statment: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει.
@@ -70,18 +70,16 @@ post:
share_link:
title: Αντιγραφή συνδέσμου
succeed: Η διεύθυνση αντιγράφθηκε με επιτυχία!
# pinned prompt of posts list on homepage
pin_prompt: Pinned
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:
@@ -90,4 +88,4 @@ categories:
plural: Κατηγορίες
post_measure:
singular: Δημοσίευση
plural: Δημοσιεύσεις
plural: Δημοσιεύσεις

View File

@@ -40,7 +40,7 @@ copyright:
Except where otherwise noted, the blog posts on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
meta: Using the :PLATFORM theme :THEME.
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.
@@ -70,18 +70,16 @@ post:
share_link:
title: Copy link
succeed: Link copied successfully!
# pinned prompt of posts list on homepage
pin_prompt: Pinned
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Salvo que se indique explícitamente, las entradas de este blog están licenciadas
bajo la Creative Commons Attribution 4.0 International (CC BY 4.0) License por el autor.
meta: Hecho con :PLATFORM usando el tema :THEME.
meta: Hecho con :PLATFORM usando el tema :THEME
not_found:
statment: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe.
@@ -59,7 +59,7 @@ post:
pageview_measure: visitas
read_time:
unit: min
prompt: ' de lectura'
prompt: " de lectura"
relate_posts: Lecturas adicionales
share: Compartir
button:
@@ -70,8 +70,6 @@ post:
share_link:
title: Copiar enlace
succeed: ¡Enlace copiado!
# pinned prompt of posts list on homepage
pin_prompt: Fijado
# categories page
categories:

View File

@@ -39,7 +39,7 @@ copyright:
verbose: >-
Paitsi jos erikseen mainitaan on kaikki sisältö Creative Commons Attribution 4.0 International (CC BY 4.0) Lisensoitu kirjoittajan toimesta.
meta: Käytetään :PLATFORM iä Teema :THEME.
meta: Käytetään :PLATFORM iä Teema :THEME
not_found:
statment: Valitettavasti tällä URL-osoitteella ei ole saatavilla sisältöä.
@@ -69,18 +69,16 @@ post:
share_link:
title: Kopioi linkki
succeed: Linkki kopioitu onnistuneesti!
# pinned prompt of posts list on homepage
pin_prompt: Kiinnitetty
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:

View File

@@ -70,8 +70,6 @@ post:
share_link:
title: Copier le lien
succeed: Lien copié avec succès !
# pinned prompt of posts list on homepage
pin_prompt: Épinglé
# categories page
categories:

View File

@@ -38,11 +38,11 @@ copyright:
# Displayed in the footer
brief: Néhány jog fenntartva.
verbose: >-
Az oldalon található tartalmak
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
hacsak másképp nincs jelezve.
Az oldalon található tartalmak
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
hacsak másképp nincs jelezve.
meta: Készítve :PLATFORM motorral :THEME témával.
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.
@@ -72,8 +72,6 @@ post:
share_link:
title: Link másolása
succeed: Link sikeresen másolva!
# pinned prompt of posts list on homepage
pin_prompt: Kitűzve
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Kecuali jika dinyatakan, Postingan blog di situs ini dilisensikan
di bawah Lisensi Creative Commons Attribution 4.0 International (CC BY 4.0) oleh penulis.
meta: Didukung oleh :PLATFORM dengan tema :THEME.
meta: Didukung oleh :PLATFORM dengan tema :THEME
not_found:
statment: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada.
@@ -70,8 +70,6 @@ post:
share_link:
title: Salin tautan
succeed: Tautan berhasil disalin!
# pinned prompt of posts list on homepage
pin_prompt: Disematkan
# categories page
categories:

View File

@@ -40,8 +40,7 @@ copyright:
Eccetto quando esplicitamente menzionato, i post di questo blog sono da ritenersi sotto
i termini di licenza Creative Commons Attribution 4.0 International (CC BY 4.0).
meta: Servizio offerto da :PLATFORM con tema :THEME.
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.
@@ -70,18 +69,16 @@ post:
share_link:
title: Copia link
succeed: Link copiato con successo!
# pinned prompt of posts list on homepage
pin_prompt: In alto
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
명시되지 않는 한 이 사이트의 블로그 게시물은 작성자의
Creative Commons Attribution 4.0 International(CC BY 4.0) 라이선스에 따라 사용이 허가되었습니다.
meta: Powered by :PLATFORM with :THEME theme.
meta: Powered by :PLATFORM with :THEME theme
not_found:
statment: 해당 URL은 존재하지 않습니다.
@@ -70,15 +70,13 @@ post:
share_link:
title: 링크 복사하기
succeed: 링크가 복사되었습니다!
# pinned prompt of posts list on homepage
pin_prompt:
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%Y/%m/%d'
dayjs: 'YYYY/MM/DD'
strftime: "%Y/%m/%d"
dayjs: "YYYY/MM/DD"
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
အခြားမှတ်သားထားချက်များမှလွဲ၍ ဤဆိုက်ရှိ ဘလော့ဂ်ပို့စ်များသည် စာရေးသူ၏
Creative Commons Attribution 4.0 International (CC BY 4.0) အောက်တွင် လိုင်စင်ရထားပါသည်။
meta: Powered by :PLATFORM with :THEME theme.
meta: Powered by :PLATFORM with :THEME theme
not_found:
statment: ဝမ်းနည်းပါသည်၊ ကျွန်ုပ်တို့သည် အဆိုပါ URL ကို မှားယွင်းစွာ နေရာချထားခြင်း သို့မဟုတ် ၎င်းသည် မရှိသောအရာကို ညွှန်ပြနေပါသည်။
@@ -70,8 +70,6 @@ post:
share_link:
title: လင့်ခ်ကို ကူးယူရန်
succeed: လင့်ခ်ကို ကူးယူလိုက်ပြီ။
# pinned prompt of posts list on homepage
pin_prompt: ချိတ်ထားသည်။
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Exceto onde indicado de outra forma, as postagens do blog neste site são licenciadas sob a
Creative Commons Attribution 4.0 International (CC BY 4.0) License pelo autor.
meta: Feito com :PLATFORM usando o tema :THEME.
meta: Feito com :PLATFORM usando o tema :THEME
not_found:
statment: Desculpe, a página não foi encontrada.
@@ -70,8 +70,6 @@ post:
share_link:
title: Copie o link
succeed: Link copiado com sucesso!
# pinned prompt of posts list on homepage
pin_prompt: Fixado
# categories page
categories:

View File

@@ -3,14 +3,14 @@
# ----- Commons label -----
layout:
post: Публикация
post: Пост
category: Категория
tag: Тег
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Домашняя страница
home: Главная
categories: Категории
tags: Теги
archives: Архив
@@ -19,8 +19,8 @@ tabs:
# the text displayed in the search bar & search results
search:
hint: поиск
cancel: Отменить
no_results: Ох! Ничего не найдено.
cancel: Отмена
no_results: Упс! Ничего не найдено.
panel:
lastmod: Недавно обновлено
@@ -30,50 +30,58 @@ panel:
copyright:
# Shown at the bottom of the post
license:
template: Публикация защищена лицензией :LICENSE_NAME.
template: Авторский пост защищен лицензией :LICENSE_NAME.
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/
# Displayed in the footer
brief: Некоторые права защищены.
verbose: >-
Публикации на сайте защищены лицензией Creative Commons Attribution 4.0 International (CC BY 4.0),
если в тексте публикации не указано иное.
Если не указано иное, авторские посты на этом сайте защищены лицензией Creative Commons Attribution 4.0 International (CC BY 4.0).
meta: Powered by :PLATFORM with :THEME theme.
meta: Использует тему :THEME для :PLATFORM
not_found:
statment: Извините, эта ссылка указывает на ресурс который не существует.
statment: Извините, мы перепутали URL-адрес или он указывает на что-то несуществующее.
notification:
update_found: Доступна новая версия контента.
update: Обновлять
update: Обновить
# ----- Posts related labels -----
post:
written_by: Автор
posted: Время публикации
posted: Опубликовано
updated: Обновлено
words: слов
pageview_measure: просмотров
read_time:
unit: минут
unit: мин.
prompt: чтения
relate_posts: Вам также может быть интересно
relate_posts: Похожие посты
share: Поделиться
button:
next: Предыдущая публикация
previous: Следующая публикация
next: Следующий пост
previous: Предыдущий пост
copy_code:
succeed: Скопировано успешно!
succeed: Скопировано!
share_link:
title: Скопировать ссылку
succeed: Ссылка успешно скопирована!
# pinned prompt of posts list on homepage
pin_prompt: Закреплено
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"
# categories page
categories:
category_measure: категории
post_measure: публикации
category_measure:
singular: категория
plural: категории
post_measure:
singular: пост
plural: посты

91
_data/locales/sl-SI.yml Normal file
View File

@@ -0,0 +1,91 @@
# The layout text of site
# ----- Commons label -----
layout:
post: Objava #Post
category: Kategorija #Category
tag: Oznaka #Tag
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Domov #Home
categories: Kategorije #Categories
tags: Oznake #Tags
archives: Arhiv #Archives
about: O meni #About
# the text displayed in the search bar & search results
search:
hint: išči #search
cancel: Prekliči #Cancel
no_results: Ups! Vsebina ni bila najdena #Oops! No results found.
panel:
lastmod: Nedavno Posodobljeno #Recently Updated
trending_tags: Priljubljene Oznake #Trending Tags
toc: Vsebina #Contents
copyright:
# Shown at the bottom of the post
license:
template: Ta objava je licencirana pod :LICENCE_NAME s strani avtorja. #This post is licensed under :LICENSE_NAME by the author.
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/
# Displayed in the footer
brief: Nekatere pravice pridržane. #Some rights reserved.
verbose: >-
Razen kjer navedeno drugače, vse objave spletnega dnevnika so licencirane
pod Creative Commons Attribution 4.0 International (CC BY 4.0) s strani avtorja.
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.
notification:
update_found: Novejša različica vsebine je na voljo. #A new version of content is available.
update: Posodobi #Update
# ----- Posts related labels -----
post:
written_by: Od #By
posted: Objavljeno #Posted
updated: Posodobljeno #Updated
words: besede #words
pageview_measure: ogledi #views
read_time:
unit: min
prompt: beri #read
relate_posts: Nadaljnje branje #Further Reading
share: Deli #Share
button:
next: Novejše #Newer
previous: Starejše #Older
copy_code:
succeed: Kopirano! #Copied!
share_link:
title: Kopiraj povezavo #Copy link
succeed: Povezava uspešno kopirana! #Link copied successfully!
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%e %b, %Y"
dayjs: "ll"
archives:
strftime: "%b"
dayjs: "MMM"
# categories page
categories:
category_measure:
singular: kategorija #category
plural: kategorije #categories
post_measure:
singular: objava #post
plural: objave #posts

91
_data/locales/sv-SE.yml Normal file
View File

@@ -0,0 +1,91 @@
# The layout text of site
# ----- Commons label -----
layout:
post: Inlägg #Post
category: Kategori #Category
tag: Tagga #Tag
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Hem #Home
categories: Kategorier #Categories
tags: Taggar #Tags
archives: Arkiv #Archives
about: Om #About
# the text displayed in the search bar & search results
search:
hint: sök
cancel: Avbryt
no_results: Hoppsan! Hittade inga sökträffar.
panel:
lastmod: Senast uppdaterad
trending_tags: Trendande taggar
toc: Innehåll
copyright:
# Shown at the bottom of the post
license:
template: Den här posten är publicerad under licensen :LICENSE_NAME av författaren.
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/
# Displayed in the footer
brief: Vissa rättigheter är reserverade.
verbose: >-
Om inte annat anges är blogginläggen på denna webbplats licensierade
under Creative Commons Attribution 4.0 International (CC BY 4.0) av författaren.
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.
notification:
update_found: Det finns en ny version av innehållet.
update: Uppdatera sidan
# ----- Posts related labels -----
post:
written_by: Av
posted: Postad
updated: Uppdaterad
words: ord
pageview_measure: visningar
read_time:
unit: min
prompt: läsning
relate_posts: Mer läsning
share: Dela
button:
next: Nyare
previous: Äldre
copy_code:
succeed: Kopierat!
share_link:
title: Kopiera länk
succeed: Länken har kopierats!
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: "%b"
dayjs: "MMM"
# categories page
categories:
category_measure:
singular: kategori
plural: kategorier
post_measure:
singular: inlägg
plural: inlägg

91
_data/locales/th.yml Normal file
View File

@@ -0,0 +1,91 @@
# The layout text of site
# ----- Commons label -----
layout:
post: โพสต์
category: หมวดหมู่
tag: แท็ก
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: หน้าแรก
categories: หมวดหมู่
tags: แท็ก
archives: คลังเก็บ
about: เกี่ยวกับ
# the text displayed in the search bar & search results
search:
hint: ค้นหา
cancel: ยกเลิก
no_results: โอ๊ะ! ไม่พบผลลัพธ์
panel:
lastmod: อัปเดตล่าสุด
trending_tags: แท็กยอดนิยม
toc: เนื้อหา
copyright:
# Shown at the bottom of the post
license:
template: โพสต์นี้อยู่ภายใต้การอนุญาต :LICENSE_NAME โดยผู้เขียน
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/
# Displayed in the footer
brief: สงวนลิขสิทธิ์เป็นบางส่วน
verbose: >-
เว้นแต่ว่าจะระบุเป็นอย่างอื่น โพสต์บนเว็บไซต์นี้อยู่ภายใต้
สัญญาอนุญาตครีเอทีฟคอมมอนส์แบบ 4.0 นานาชาติ (CC BY 4.0) โดยผู้เขียน
meta: กำลังใช้ธีมของ :PLATFORM ชื่อ :THEME
not_found:
statment: ขออภัย เราวาง URL นั้นไว้ผิดที่ หรือมันชี้ไปยังสิ่งที่ไม่มีอยู่
notification:
update_found: มีเวอร์ชันใหม่ของเนื้อหา
update: อัปเดต
# ----- Posts related labels -----
post:
written_by: โดย
posted: โพสต์เมื่อ
updated: อัปเดตเมื่อ
words: คำ
pageview_measure: ครั้ง
read_time:
unit: นาที
prompt: อ่าน
relate_posts: อ่านต่อ
share: แชร์
button:
next: ใหม่กว่า
previous: เก่ากว่า
copy_code:
succeed: คัดลอกแล้ว!
share_link:
title: คัดลอกลิงก์
succeed: คัดลอกลิงก์เรียบร้อยแล้ว!
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: "%b"
dayjs: "MMM"
# categories page
categories:
category_measure:
singular: หมวดหมู่
plural: หมวดหมู่
post_measure:
singular: โพสต์
plural: โพสต์

View File

@@ -23,7 +23,7 @@ search:
no_results: Hop! Öyle bir şey bulamadım.
panel:
lastmod: Yeni Güncellendi
lastmod: Son Güncellenenler
trending_tags: Yükselen Etiketler
toc: İçindekiler
@@ -38,9 +38,9 @@ copyright:
brief: Bazı hakları saklıdır.
verbose: >-
Aksi belirtilmediği sürece, bu sitedeki gönderiler Creative Commons Atıf 4.0 Uluslararası (CC BY 4.0) Lisansı altındadır.
Kısaca sayfa linkini de vererek paylaşabilir veya düzenleyip paylaşabilirsin.
Kısaca sayfa linkini vererek değiştirebilir / paylaşabilirsiniz.
meta: :PLATFORM ve :THEME teması.
meta: :PLATFORM ve :THEME teması
not_found:
statment: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor.
@@ -53,8 +53,8 @@ notification:
post:
written_by: Yazan
posted: Gönderilme Tarihi
updated: Güncellenme Tarihi
posted: Gönderim
updated: Güncelleme
words: sözcük
pageview_measure: görüntülenme
read_time:
@@ -70,8 +70,6 @@ post:
share_link:
title: Linki kopyala
succeed: Link kopyalandı.
# pinned prompt of posts list on homepage
pin_prompt: Sabitlendi
# categories page
categories:

View File

@@ -40,7 +40,7 @@ copyright:
Публікації на сайті захищено ліцензією Creative Commons Attribution 4.0 International (CC BY 4.0),
якщо інше не вказано в тексті.
meta: Powered by :PLATFORM with :THEME theme.
meta: Powered by :PLATFORM with :THEME theme
not_found:
statment: Вибачте, це посилання вказує на ресурс, що не існує.
@@ -70,8 +70,6 @@ post:
share_link:
title: Скопіювати посилання
succeed: Посилання успішно скопійовано!
# pinned prompt of posts list on homepage
pin_prompt: Закріплено
# categories page
categories:

View File

@@ -38,7 +38,8 @@ copyright:
brief: Một số quyền được bảo lưu.
verbose: >-
Trừ khi có ghi chú khác, các bài viết đăng trên trang này được cấp phép bởi tác giả theo giấy phép Creative Commons Attribution 4.0 International (CC BY 4.0).
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME.
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.
@@ -68,8 +69,6 @@ post:
share_link:
title: Sao chép đường dẫn
succeed: Đã sao chép đường dẫn thành công!
# pinned prompt of posts list on homepage
pin_prompt: Bài ghim
# categories page
categories:

View File

@@ -39,7 +39,7 @@ copyright:
verbose: >-
除非另有说明,本网站上的博客文章均由作者按照知识共享署名 4.0 国际 (CC BY 4.0) 许可协议进行授权。
meta: 本站 :PLATFORM 生成,采用 :THEME 主题。
meta: 本站采用 :PLATFORM 主题 :THEME
not_found:
statment: 抱歉,我们放错了该 URL或者它指向了不存在的内容。
@@ -69,15 +69,13 @@ post:
share_link:
title: 分享链接
succeed: 链接已复制!
# pinned prompt of posts list on homepage
pin_prompt: 顶置
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%Y/%m/%d'
dayjs: 'YYYY/MM/DD'
strftime: "%Y/%m/%d"
dayjs: "YYYY/MM/DD"
# categories page
categories:

83
_data/locales/zh-TW.yml Normal file
View File

@@ -0,0 +1,83 @@
# The layout text of site
# ----- Commons label -----
layout:
post: 文章
category: 分類
tag: 標籤
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: 首頁
categories: 分類
tags: 標籤
archives: 封存
about: 關於
# the text displayed in the search bar & search results
search:
hint: 搜尋
cancel: 取消
no_results: 沒有搜尋結果
panel:
lastmod: 最近更新
trending_tags: 熱門標籤
toc: 文章摘要
copyright:
# Shown at the bottom of the post
license:
template: 本文章以 :LICENSE_NAME 授權
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/
# Displayed in the footer
brief: 保留部份權利。
verbose: >-
除非另有說明,否則本網誌的文章均由作者按照姓名標示 4.0 國際 (CC BY 4.0) 授權條款進行授權。
meta: 本網站使用 :PLATFORM 產生,採用 :THEME 主題
not_found:
statment: 抱歉,您可能正在存取一個已被移動的 URL或者它從未存在。
notification:
update_found: 發現新版本更新。
update: 更新
# ----- Posts related labels -----
post:
written_by: 作者
posted: 發布於
updated: 更新於
words:
pageview_measure: 次瀏覽
read_time:
unit: 分鐘
prompt: 閱讀
relate_posts: 相關文章
share: 分享
button:
next: 下一篇
previous: 上一篇
copy_code:
succeed: 已複製!
share_link:
title: 分享連結
succeed: 已複製連結!
# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%Y/%m/%d"
dayjs: "YYYY/MM/DD"
# categories page
categories:
category_measure: 個分類
post_measure: 篇文章

View File

@@ -31,21 +31,16 @@ dayjs:
relativeTime: /assets/lib/dayjs/plugin/relativeTime.min.js
localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.min.js
countup:
js: /assets/lib/countup.js/countUp.min.js
magnific-popup:
css: /assets/lib/magnific-popup/magnific-popup.css
js: /assets/lib/magnific-popup/jquery.magnific-popup.min.js
lazysizes:
js: /assets/lib/lazysizes/lazysizes.min.js
lazy-polyfill:
css: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.min.css
js: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.umd.min.js
clipboard:
js: /assets/lib/clipboard/clipboard.min.js
polyfill:
js: /assets/lib/polyfill-v3-es6/polyfill.min.js
mathjax:
js: /assets/lib/mathjax/tex-chtml.js

59
_data/origin/cors.yml Normal file
View File

@@ -0,0 +1,59 @@
# CDNs
cdns:
# Google Fonts
- url: https://fonts.googleapis.com
- url: https://fonts.gstatic.com
args: crossorigin
- url: https://fonts.googleapis.com
# jsDelivr CDN
- url: https://cdn.jsdelivr.net
# polyfill.io for math
- url: https://polyfill.io
# fonts
webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap
# Libraries
jquery:
js: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
bootstrap:
css: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css
js: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js
toc:
css: https://cdn.jsdelivr.net/npm/tocbot@4.25.0/dist/tocbot.min.css
js: https://cdn.jsdelivr.net/npm/tocbot@4.25.0/dist/tocbot.min.js
fontawesome:
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/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.8.0/dist/mermaid.min.js
dayjs:
js:
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/dayjs.min.js
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/locale/:LOCALE.min.js
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/relativeTime.min.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/localizedFormat.min.js
magnific-popup:
css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
lazy-polyfill:
css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.min.css
js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.umd.min.js
clipboard:
js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
mathjax:
js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js

View File

@@ -3,7 +3,7 @@
platforms:
- type: Twitter
icon: "fab fa-twitter"
icon: "fa-brands fa-square-x-twitter"
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
- type: Facebook
@@ -23,3 +23,16 @@ platforms:
# - type: Weibo
# icon: "fab fa-weibo"
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
#
# - type: Mastodon
# icon: "fa-brands fa-mastodon"
# # See: https://github.com/justinribeiro/share-to-mastodon#properties
# instances:
# - label: mastodon.social
# link: "https://mastodon.social/"
# - label: mastodon.online
# link: "https://mastodon.online/"
# - label: fosstodon.org
# link: "https://fosstodon.org/"
# - label: photog.social
# link: "https://photog.social/"

View File

@@ -1,41 +1,40 @@
<!--
The Disqus lazy loading.
-->
<div id="disqus_thread" class="pt-2 pb-2">
<p class="text-center text-muted small">
Comments powered by <a href="https://disqus.com/">Disqus</a>.
</p>
<!-- The Disqus lazy loading. -->
<div id="disqus_thread">
<p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
</div>
<script type="text/javascript">
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url }}';
};
/* Lazy loading */
var disqus_observer = new IntersectionObserver(function (entries) {
if(entries[0].isIntersecting) {
var disqus_observer = new IntersectionObserver(
function (entries) {
if (entries[0].isIntersecting) {
(function () {
var d = document, s = d.createElement('script');
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
var d = document,
s = d.createElement('script');
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
disqus_observer.disconnect();
}
}, { threshold: [0] });
}
},
{ threshold: [0] }
);
disqus_observer.observe(document.querySelector('#disqus_thread'));
/* Auto switch theme */
function reloadDisqus() {
if (event.source === window && event.data &&
event.data.direction === ModeToggle.ID) {
if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
/* Disqus hasn't been loaded */
if (typeof DISQUS === "undefined") {
if (typeof DISQUS === 'undefined') {
return;
}
@@ -45,10 +44,7 @@
}
}
const modeToggle = document.querySelector(".mode-toggle");
if (typeof modeToggle !== "undefined") {
window.addEventListener("message", reloadDisqus);
if (document.querySelector('.mode-toggle')) {
window.addEventListener('message', reloadDisqus);
}
</script>

View File

@@ -1,44 +1,55 @@
<!-- https://giscus.app/ -->
<script type="text/javascript">
$(function () {
const origin = "https://giscus.app";
const iframe = "iframe.giscus-frame";
const lightTheme = "light";
const darkTheme = "dark_dimmed";
let initTheme = lightTheme;
(function () {
const origin = 'https://giscus.app';
const iframe = 'iframe.giscus-frame';
const lightTheme = 'light';
const darkTheme = 'dark_dimmed';
if ($("html[data-mode=dark]").length > 0
|| ($("html[data-mode]").length == 0
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
let initTheme = lightTheme;
const html = document.documentElement;
if (
(html.hasAttribute('data-mode') &&
html.getAttribute('data-mode') === 'dark') ||
(!html.hasAttribute('data-mode') &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
initTheme = darkTheme;
}
let giscusAttributes = {
"src": "https://giscus.app/client.js",
"data-repo": "{{ site.comments.giscus.repo}}",
"data-repo-id": "{{ site.comments.giscus.repo_id }}",
"data-category": "{{ site.comments.giscus.category }}",
"data-category-id": "{{ site.comments.giscus.category_id }}",
"data-mapping": "{{ site.comments.giscus.mapping | default: 'pathname' }}",
"data-reactions-enabled": "{{ site.comments.giscus.reactions_enabled | default: '1' }}",
"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 }}",
"crossorigin": "anonymous",
"async": ""
src: 'https://giscus.app/client.js',
'data-repo': '{{ site.comments.giscus.repo}}',
'data-repo-id': '{{ site.comments.giscus.repo_id }}',
'data-category': '{{ site.comments.giscus.category }}',
'data-category-id': '{{ site.comments.giscus.category_id }}',
'data-mapping': '{{ site.comments.giscus.mapping | default: 'pathname' }}',
'data-reactions-enabled': '{{ site.comments.giscus.reactions_enabled | default: '1' }}',
'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-loading': 'lazy',
crossorigin: 'anonymous',
async: ''
};
let giscusScript = document.createElement("script");
Object.entries(giscusAttributes).forEach(([key, value]) => giscusScript.setAttribute(key, value));
document.getElementById("tail-wrapper").appendChild(giscusScript);
let giscusScript = document.createElement('script');
Object.entries(giscusAttributes).forEach(([key, value]) =>
giscusScript.setAttribute(key, value)
);
document.getElementById('tail-wrapper').appendChild(giscusScript);
addEventListener("message", (event) => {
if (event.source === window && event.data &&
event.data.direction === ModeToggle.ID) {
addEventListener('message', (event) => {
if (
event.source === window &&
event.data &&
event.data.direction === ModeToggle.ID
) {
/* global theme mode changed */
const mode = event.data.message;
const theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
const theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
const message = {
setConfig: {
@@ -49,8 +60,6 @@
const giscus = document.querySelector(iframe).contentWindow;
giscus.postMessage({ giscus: message }, origin);
}
});
});
})();
</script>

View File

@@ -1,51 +1,50 @@
<!-- https://utteranc.es/ -->
<script src="https://utteranc.es/client.js"
repo="{{ site.comments.utterances.repo }}"
issue-term="{{ site.comments.utterances.issue_term }}"
crossorigin="anonymous"
async>
</script>
<script
src="https://utteranc.es/client.js"
repo="{{ site.comments.utterances.repo }}"
issue-term="{{ site.comments.utterances.issue_term }}"
crossorigin="anonymous"
async
></script>
<script type="text/javascript">
$(function() {
const origin = "https://utteranc.es";
const iframe = "iframe.utterances-frame";
const lightTheme = "github-light";
const darkTheme = "github-dark";
(function () {
const origin = 'https://utteranc.es';
const iframe = 'iframe.utterances-frame';
const lightTheme = 'github-light';
const darkTheme = 'github-dark';
let initTheme = lightTheme;
const html = document.documentElement;
if ($("html[data-mode=dark]").length > 0
|| ($("html[data-mode]").length == 0
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
if (
(html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') ||
(!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
initTheme = darkTheme;
}
addEventListener("message", (event) => {
addEventListener('message', (event) => {
let theme;
/* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
if (event.origin === origin) {
/* page initial */
theme = initTheme;
} else if (event.source === window && event.data &&
event.data.direction === ModeToggle.ID) {
} else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
/* global theme mode changed */
const mode = event.data.message;
theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
} else {
return;
}
const message = {
type: "set-theme",
type: 'set-theme',
theme: theme
};
const utterances = document.querySelector(iframe).contentWindow;
utterances.postMessage(message, origin);
});
});
})();
</script>

View File

@@ -3,13 +3,18 @@
See: ${JS_ROOT}/utils/locale-dateime.js
-->
{% assign wrap_elem = include.wrap | default: 'em' %}
{% assign df_strftime = site.data.locales[site.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[site.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
<{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}"
data-ts="{{ include.date | date: '%s' }}"
data-df="{{ df_dayjs }}"
{% if include.tooltip %}data-toggle="tooltip" data-placement="bottom"{% endif %}>
<time
{% if include.class %}
class="{{ include.class }}"
{% endif %}
data-ts="{{ include.date | date: '%s' }}"
data-df="{{ df_dayjs }}"
{% if include.tooltip %}
data-bs-toggle="tooltip" data-bs-placement="bottom"
{% endif %}
>
{{ include.date | date: df_strftime }}
</{{ wrap_elem }}>
</time>

View File

@@ -0,0 +1,10 @@
<iframe
class="embed-video bilibili"
loading="lazy"
src="https://player.bilibili.com/player.html?bvid={{ include.id }}"
scrolling="no"
border="0"
frameborder="no"
framespacing="0"
allowfullscreen="true"
></iframe>

View File

@@ -1,4 +1,8 @@
<iframe class="embed-video twitch lazyload"
<iframe
class="embed-video twitch"
loading="lazy"
src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}"
frameborder="0" allowfullscreen="true"
scrolling="no"></iframe>
frameborder="0"
allowfullscreen="true"
scrolling="no"
></iframe>

View File

@@ -1,6 +1,9 @@
<iframe class="embed-video youtube lazyload"
<iframe
class="embed-video youtube"
loading="lazy"
src="https://www.youtube.com/embed/{{ include.id }}"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
allowfullscreen
></iframe>

View File

@@ -8,7 +8,9 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png">
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
{% if site.pwa.enabled %}
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
{% endif %}
<link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
<meta name="apple-mobile-web-app-title" content="{{ site.title }}">
<meta name="application-name" content="{{ site.title }}">

View File

@@ -1,36 +1,42 @@
<!-- The Footer -->
<footer>
<div class="container pl-lg-4 pr-lg-4">
<div class="d-flex justify-content-between align-items-center text-muted ml-md-3 mr-md-3">
<div class="footer-left">
<p class="mb-0">
© {{ 'now' | date: "%Y" }}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
{% if site.data.locales[site.lang].copyright.brief %}
<span data-toggle="tooltip" data-placement="top"
title="{{ site.data.locales[site.lang].copyright.verbose }}">{{ site.data.locales[site.lang].copyright.brief }}</span>
{% endif %}
</p>
</div>
<footer
aria-label="Site Info"
class="
d-flex flex-column justify-content-center text-muted
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
"
>
<p>
{{- '©' }}
<time>{{ 'now' | date: '%Y' }}</time>
<div class="footer-right">
<p class="mb-0">
{% if site.social.links %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
{% else %}
<em class="fst-normal">{{ site.social.name }}</em>.
{% endif %}
{%- capture _platform -%}
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
{%- endcapture -%}
{% if site.data.locales[include.lang].copyright.brief %}
<span
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ site.data.locales[include.lang].copyright.verbose }}"
>
{{- site.data.locales[include.lang].copyright.brief -}}
</span>
{% endif %}
</p>
{%- capture _theme -%}
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
{%- endcapture -%}
<p>
{%- capture _platform -%}
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
{%- endcapture -%}
{{ site.data.locales[site.lang].meta
| default: 'Using the :PLATFORM theme :THEME.'
| replace: ':PLATFORM', _platform | replace: ':THEME', _theme
}}
</p>
</div>
</div>
</div>
{%- capture _theme -%}
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
{%- endcapture -%}
{{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
</p>
</footer>

View File

@@ -0,0 +1,8 @@
<!-- GoatCounter -->
<script
data-goatcounter="https://{{ site.goatcounter.id }}.goatcounter.com/count"
async
src="https://gc.zgo.at/count.js"
></script>

View File

@@ -1,5 +1,3 @@
<!-- The Head -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
@@ -11,39 +9,43 @@
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
>
{% if page.layout == 'home' or page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint %}
<meta name="pv-proxy-endpoint" content="{{ site.google_analytics.pv.proxy_endpoint }}">
{% endif %}
{% if site.google_analytics.pv.cache_path %}
<meta name="pv-cache-path" content="{{ site.google_analytics.pv.cache_path | relative_url }}">
{% endif %}
{% endif %}
{% capture seo_tags %}
{%- capture seo_tags -%}
{% seo title=false %}
{% endcapture %}
{%- endcapture -%}
<!-- Setup Open Graph image -->
{% if page.image %}
{% assign img = page.image.path | default: page.image %}
{% assign src = page.image.path | default: page.image %}
{% unless img contains '://' %}
{% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
{% capture target %}"{{ img | absolute_url }}"{% endcapture %}
{% unless src contains '://' %}
{%- capture img_url -%}
{% include img-url.html src=src img_path=page.img_path absolute=true %}
{%- endcapture -%}
{% if site.img_cdn contains '//' %}
<!-- it's a cross-origin URL -->
{% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
{% else %}
<!-- it's a local file path -->
{%- capture replacement -%}
"{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
{%- endcapture -%}
{% endif %}
{%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
{%- capture new_url -%}{{ img_url }}{%- endcapture -%}
{% assign seo_tags = seo_tags | replace: target, replacement %}
{% assign seo_tags = seo_tags | replace: old_url, new_url %}
{% endunless %}
{% elsif site.social_preview_image %}
{%- capture img_url -%}
{% include img-url.html src=site.social_preview_image absolute=true %}
{%- endcapture -%}
{%- capture og_image -%}
<meta property="og:image" content="{{ img_url }}" />
{%- endcapture -%}
{%- capture twitter_image -%}
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="{{ img_url }}" />
{%- endcapture -%}
{% assign old_meta_clip = '<meta name="twitter:card" content="summary" />' %}
{% assign new_meta_clip = og_image | append: twitter_image %}
{% assign seo_tags = seo_tags | replace: old_meta_clip, new_meta_clip %}
{% endif %}
{{ seo_tags }}
@@ -55,18 +57,18 @@
{{ site.title }}
</title>
{% include favicons.html %}
{% include_cached favicons.html %}
{% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}
<link href="{{ site.data.assets[origin].webfonts | relative_url }}" rel="stylesheet">
<link href="{{ site.data.origin[type].webfonts | relative_url }}" rel="stylesheet">
{% else %}
{% for cdn in site.data.assets[origin].cdns %}
{% for cdn in site.data.origin[type].cdns %}
<link rel="preconnect" href="{{ cdn.url }}" {{ cdn.args }}>
<link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
{% endfor %}
<link rel="stylesheet" href="{{ site.data.assets[origin].webfonts | relative_url }}">
<link rel="stylesheet" href="{{ site.data.origin[type].webfonts | relative_url }}">
{% endif %}
<!-- GA -->
@@ -76,41 +78,34 @@
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
<link rel="dns-prefetch" href="https://www.googletagmanager.com">
{% if site.google_analytics.pv.proxy_endpoint %}
{% assign proxy_url = site.google_analytics.pv.proxy_endpoint
| replace: 'https://', ''
| split: '/'
| first
| prepend: 'https://'
%}
<link rel="preconnect" href="{{ proxy_url }}" crossorigin="use-credentials">
<link rel="dns-prefetch" href="{{ proxy_url }}">
{% endif %}
{% endif %}
<!-- Bootstrap -->
<link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap.css | relative_url}}">
<link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url }}">
<!-- Font Awesome -->
<link rel="stylesheet" href="{{ site.data.assets[origin].fontawesome.css | relative_url }}">
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
{% if site.toc and page.toc %}
<link rel="stylesheet" href="{{ site.data.assets[origin].toc.css | relative_url }}">
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
{% endif %}
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
<link rel="stylesheet" href="{{ site.data.origin[type]['lazy-polyfill'].css | relative_url }}">
{% endif %}
{% if page.layout == 'page' or page.layout == 'post' %}
<!-- Manific Popup -->
<link rel="stylesheet" href="{{ site.data.assets[origin].magnific-popup.css | relative_url }}">
<link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
{% endif %}
<!-- JavaScript -->
<script src="{{ site.data.assets[origin].jquery.js | relative_url }}"></script>
{% unless site.theme_mode %}
{% include mode-toggle.html %}
{% endunless %}
{% include metadata-hook.html %}
</head>

39
_includes/img-url.html Normal file
View File

@@ -0,0 +1,39 @@
{%- comment -%}
Generate image final URL based on `site.img_cdn`, `page.img_path`
Arguments:
src - required, basic image path
img_path - optional, relative path of image
absolute - optional, boolean, if true, generate absolute URL
Return:
image URL
{%- endcomment -%}
{% assign url = include.src %}
{%- if url -%}
{% unless url contains ':' %}
{%- comment -%} CND URL {%- endcomment -%}
{% assign prefix = site.img_cdn | default: '' %}
{%- comment -%} Add page image path prefix {%- endcomment -%}
{% assign url = include.img_path | default: '' | append: '/' | append: url %}
{% assign url = prefix
| append: '/'
| append: url
| replace: '///', '/'
| replace: '//', '/'
| replace: ':', ':/'
%}
{% if include.absolute %}
{% assign url = site.url | append: site.baseurl | append: url %}
{% else %}
{% assign url = site.baseurl | append: url %}
{% endif %}
{% endunless %}
{%- endif -%}
{{- url -}}

View File

@@ -1,24 +1,30 @@
<!-- JS selector for site. -->
<!-- commons -->
{% assign urls = site.data.origin[type].jquery.js
| append: ','
| append: site.data.origin[type].bootstrap.js
| append: ','
| append: site.data.origin[type].search.js
%}
<!-- layout specified -->
{% if page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
<!-- pv-report needs countup.js -->
<script async src="{{ site.data.assets[origin].countup.js | relative_url }}"></script>
{% endif %}
{% endif %}
{% assign js_dist = '/assets/js/dist/' %}
{% if page.layout == 'post' or page.layout == 'page' %}
<!-- image lazy-loading & popup & clipboard -->
{% assign _urls = site.data.assets[origin]['magnific-popup'].js
| append: ','
| append: site.data.assets[origin].lazysizes.js
| append: ','
| append: site.data.assets[origin].clipboard.js
%}
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
{% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %}
{% include jsdelivr-combine.html urls=_urls %}
{% unless page.layout == 'home' %}
<!-- image lazy-loading & popup & clipboard -->
{% assign urls = urls
| append: ','
| append: site.data.origin[type]['magnific-popup'].js
| append: ','
| append: site.data.origin[type].clipboard.js
%}
{% endunless %}
{% endif %}
{% if page.layout == 'home'
@@ -29,29 +35,39 @@
%}
{% assign locale = site.lang | split: '-' | first %}
{% assign _urls = site.data.assets[origin].dayjs.js.common
{% assign urls = urls
| append: ','
| append: site.data.assets[origin].dayjs.js.locale
| append: site.data.origin[type].dayjs.js.common
| append: ','
| append: site.data.origin[type].dayjs.js.locale
| replace: ':LOCALE', locale
| append: ','
| append: site.data.assets[origin].dayjs.js.relativeTime
| append: site.data.origin[type].dayjs.js.relativeTime
| append: ','
| append: site.data.assets[origin].dayjs.js.localizedFormat
| append: site.data.origin[type].dayjs.js.localizedFormat
%}
{% include jsdelivr-combine.html urls=_urls %}
{% endif %}
{% if page.content contains '<h2' or page.content contains '<h3' and site.toc and page.toc %}
{% assign urls = urls | append: ',' | append: site.data.origin[type].toc.js %}
{% endif %}
{% if page.mermaid %}
{% assign urls = urls | append: ',' | append: site.data.origin[type].mermaid.js %}
{% endif %}
{% include jsdelivr-combine.html urls=urls %}
{% case page.layout %}
{% when 'categories', 'post', 'page' %}
{% assign type = page.layout %}
{% when 'home', 'archives', 'category', 'tag' %}
{% assign type = 'misc' %}
{% when 'home', 'categories', 'post', 'page' %}
{% assign js = page.layout %}
{% when 'archives', 'category', 'tag' %}
{% assign js = 'misc' %}
{% else %}
{% assign type = 'commons' %}
{% assign js = 'commons' %}
{% endcase %}
{% capture script %}/assets/js/dist/{{ type }}.min.js{% endcapture %}
{% capture script %}{{ js_dist }}{{ js }}.min.js{% endcapture %}
<script defer src="{{ script | relative_url }}"></script>
{% if page.math %}
@@ -69,28 +85,29 @@
displayMath: [
['$$', '$$'],
['\\[', '\\]']
]
],
/* equation numbering */
tags: 'ams'
}
};
</script>
<script src="{{ site.data.assets[origin].polyfill.js | relative_url }}"></script>
<script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js | relative_url }}"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="{{ site.data.origin[type].mathjax.js | relative_url }}"></script>
{% endif %}
<!-- commons -->
<script src="{{ site.data.assets[origin].bootstrap.js | relative_url }}"></script>
{% if jekyll.environment == 'production' %}
<!-- PWA -->
{% if site.pwa.enabled %}
<script defer src="{{ '/app.js' | relative_url }}"></script>
{% else %}
<script defer src="{{ '/unregister.js' | relative_url }}"></script>
<script defer src="{{ 'app.min.js' | prepend: js_dist | relative_url }}"></script>
{% endif %}
<!-- GA -->
{% if site.google_analytics.id != empty and site.google_analytics.id %}
{% include google-analytics.html %}
{% endif %}
<!-- GoatCounter -->
{% if site.goatcounter.id != empty and site.goatcounter.id %}
{% include goatcounter.html %}
{% endif %}
{% endif %}

View File

@@ -5,7 +5,6 @@
{% assign domain = 'https://cdn.jsdelivr.net/' %}
{% for url in urls %}
{% if url contains domain %}
{% assign url_snippet = url | slice: domain.size, url.size %}
@@ -16,15 +15,10 @@
{% endif %}
{% elsif url contains '//' %}
<script src="{{ url }}"></script>
{% else %}
<script src="{{ url | relative_url }}"></script>
{% endif %}
{% endfor %}
{% if combined_urls %}

8
_includes/lang.html Normal file
View File

@@ -0,0 +1,8 @@
{% comment %}
Detect appearance language and return it through variable "lang"
{% endcomment %}
{% if site.data.locales[site.lang] %}
{% assign lang = site.lang %}
{% else %}
{% assign lang = 'en' %}
{% endif %}

View File

@@ -1,59 +1,58 @@
<!--
mermaid-js loader
-->
<script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
<script>
<!-- mermaid-js loader -->
<script type="text/javascript">
(function () {
function updateMermaid(event) {
if (event.source === window && event.data &&
event.data.direction === ModeToggle.ID) {
if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
const mode = event.data.message;
if (typeof mermaid === "undefined") {
if (typeof mermaid === 'undefined') {
return;
}
let expectedTheme = (mode === ModeToggle.DARK_MODE ? "dark" : "default");
let config = {theme: expectedTheme};
let expectedTheme = mode === ModeToggle.DARK_MODE ? 'dark' : 'default';
let config = { theme: expectedTheme };
/* Re-render the SVG <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
$(".mermaid").each(function () {
$('.mermaid').each(function () {
let svgCode = $(this).prev().children().html();
$(this).removeAttr("data-processed");
$(this).removeAttr('data-processed');
$(this).html(svgCode);
});
mermaid.initialize(config);
mermaid.init(undefined, ".mermaid");
mermaid.init(undefined, '.mermaid');
}
}
let initTheme = "default";
let initTheme = 'default';
const html = document.documentElement;
if ($("html[data-mode=dark]").length > 0
|| ($("html[data-mode]").length == 0
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
initTheme = "dark";
if (
(html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') ||
(!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
initTheme = 'dark';
}
let mermaidConf = {
theme: initTheme /* <default|dark|forest|neutral> */
theme: initTheme /* <default|dark|forest|neutral> */
};
/* Create mermaid tag */
$("pre").has("code.language-mermaid").each(function () {
let svgCode = $(this).children().html();
$(this).addClass("unloaded");
$(this).after(`<pre class=\"mermaid\">${svgCode}</pre>`);
document.querySelectorAll('pre>code.language-mermaid').forEach((elem) => {
const svgCode = elem.textContent;
const backup = elem.parentElement;
backup.classList.add('unloaded');
/* create mermaid node */
let mermaid = document.createElement('pre');
mermaid.classList.add('mermaid');
const text = document.createTextNode(svgCode);
mermaid.appendChild(text);
backup.after(mermaid);
});
mermaid.initialize(mermaidConf);
window.addEventListener("message", updateMermaid);
window.addEventListener('message', updateMermaid);
})();
</script>

View File

@@ -0,0 +1 @@
<!-- A placeholder to allow defining custom metadata -->

View File

@@ -1,14 +1,22 @@
<!--
Switch the mode between dark and light.
-->
<!-- Switch the mode between dark and light. -->
<script type="text/javascript">
class ModeToggle {
static get MODE_KEY() { return "mode"; }
static get MODE_ATTR() { return "data-mode"; }
static get DARK_MODE() { return "dark"; }
static get LIGHT_MODE() { return "light"; }
static get ID() { return "mode-toggle"; }
static get MODE_KEY() {
return 'mode';
}
static get MODE_ATTR() {
return 'data-mode';
}
static get DARK_MODE() {
return 'dark';
}
static get LIGHT_MODE() {
return 'light';
}
static get ID() {
return 'mode-toggle';
}
constructor() {
if (this.hasMode) {
@@ -45,17 +53,29 @@
});
} /* constructor() */
get sysDarkPrefers() { return window.matchMedia("(prefers-color-scheme: dark)"); }
get sysDarkPrefers() {
return window.matchMedia('(prefers-color-scheme: dark)');
}
get isSysDarkPrefer() { return this.sysDarkPrefers.matches; }
get isSysDarkPrefer() {
return this.sysDarkPrefers.matches;
}
get isDarkMode() { return this.mode === ModeToggle.DARK_MODE; }
get isDarkMode() {
return this.mode === ModeToggle.DARK_MODE;
}
get isLightMode() { return this.mode === ModeToggle.LIGHT_MODE; }
get isLightMode() {
return this.mode === ModeToggle.LIGHT_MODE;
}
get hasMode() { return this.mode != null; }
get hasMode() {
return this.mode != null;
}
get mode() { return sessionStorage.getItem(ModeToggle.MODE_KEY); }
get mode() {
return sessionStorage.getItem(ModeToggle.MODE_KEY);
}
/* get the current mode on screen */
get modeStatus() {
@@ -67,26 +87,29 @@
}
setDark() {
$('html').attr(ModeToggle.MODE_ATTR, ModeToggle.DARK_MODE);
document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.DARK_MODE);
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
}
setLight() {
$('html').attr(ModeToggle.MODE_ATTR, ModeToggle.LIGHT_MODE);
document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.LIGHT_MODE);
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
}
clearMode() {
$('html').removeAttr(ModeToggle.MODE_ATTR);
document.documentElement.removeAttribute(ModeToggle.MODE_ATTR);
sessionStorage.removeItem(ModeToggle.MODE_KEY);
}
/* Notify another plugins that the theme mode has changed */
notify() {
window.postMessage({
direction: ModeToggle.ID,
message: this.modeStatus
}, "*");
window.postMessage(
{
direction: ModeToggle.ID,
message: this.modeStatus
},
'*'
);
}
flipMode() {

View File

@@ -0,0 +1,24 @@
<aside
id="notification"
class="toast"
role="alert"
aria-live="assertive"
aria-atomic="true"
data-bs-animation="true"
data-bs-autohide="false"
>
<div class="toast-header">
<button
type="button"
class="btn-close ms-auto"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
<div class="toast-body text-center pt-0">
<p class="px-2 mb-3">{{ site.data.locales[include.lang].notification.update_found }}</p>
<button type="button" class="btn btn-primary" aria-label="Update">
{{ site.data.locales[include.lang].notification.update }}
</button>
</div>
</aside>

View File

@@ -1,12 +1,13 @@
{% comment %} Site static assets origin {% endcomment %}
{% assign origin = 'cross_origin' %}
{% comment %} Site static assets origin type {% endcomment %}
{% assign type = 'cors' %}
{% if site.assets.self_host.enabled %}
{% if site.assets.self_host.env %}
{% if site.assets.self_host.env == jekyll.environment %}
{% assign origin = 'self_host' %}
{% assign type = 'basic' %}
{% endif %}
{% else %}
{% assign origin = 'self_host' %}
{% assign type = 'basic' %}
{% endif %}
{% endif %}

View File

@@ -1,30 +1,34 @@
<!--
Navigation buttons at the bottom of the post.
-->
<!-- Navigation buttons at the bottom of the post. -->
<nav class="post-navigation d-flex justify-content-between" aria-label="Post Navigation">
{% assign previous = site.data.locales[include.lang].post.button.previous %}
{% assign next = site.data.locales[include.lang].post.button.next %}
<div class="post-navigation d-flex justify-content-between">
{% if page.previous.url %}
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
prompt="{{ site.data.locales[site.lang].post.button.previous }}">
<p>{{ page.previous.title }}</p>
</a>
<a
href="{{ site.baseurl }}{{ page.previous.url }}"
class="btn btn-outline-primary"
aria-label="{{ previous }}"
>
<p>{{ page.previous.title }}</p>
</a>
{% else %}
<div class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[site.lang].post.button.previous }}">
<p>-</p>
</div>
<div class="btn btn-outline-primary disabled" aria-label="{{ previous }}">
<p>-</p>
</div>
{% endif %}
{% if page.next.url %}
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
prompt="{{ site.data.locales[site.lang].post.button.next }}">
<p>{{ page.next.title }}</p>
</a>
<a
href="{{ site.baseurl }}{{page.next.url}}"
class="btn btn-outline-primary"
aria-label="{{ next }}"
>
<p>{{ page.next.title }}</p>
</a>
{% else %}
<div class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[site.lang].post.button.next }}">
<p>-</p>
</div>
<div class="btn btn-outline-primary disabled" aria-label="{{ next }}">
<p>-</p>
</div>
{% endif %}
</div>
</nav>

View File

@@ -1,88 +1,91 @@
<!--
The paginator for post list on HomgPage.
-->
<!-- The paginator for post list on HomgPage. -->
<ul class="pagination align-items-center mt-4 pl-lg-2">
<!-- left arrow -->
{% if paginator.previous_page %}
{% assign prev_url = paginator.previous_page_path | relative_url %}
{% else %}
{% assign prev_url = "#" %}
{% endif %}
<li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}">
<a class="page-link btn-box-shadow" href="{{ prev_url }}" aria-label="previous-page">
<i class="fas fa-angle-left"></i>
</a>
</li>
<!-- page numbers -->
{% assign left_ellipsis = false %}
{% assign right_ellipsis = false %}
{% for i in (1..paginator.total_pages) %}
{% assign pre = paginator.page | minus: 1 %}
{% assign next = paginator.page | plus: 1 %}
{% assign pre_less = pre | minus: 1 %}
{% assign next_more = next | plus: 1 %}
{% assign show = false %}
{% if paginator.page == 1 %}
{% if i <= 3 or i == paginator.total_pages %}
{% assign show = true %}
{% endif %}
{% elsif paginator.page == paginator.total_pages %}
{% if i == 1 or i >= pre_less %}
{% assign show = true %}
{% endif %}
<nav aria-label="Page Navigation">
<ul class="pagination align-items-center mt-4 mb-0">
<!-- left arrow -->
{% if paginator.previous_page %}
{% assign prev_url = paginator.previous_page_path | relative_url %}
{% else %}
{% if i == 1 or i == paginator.total_pages%}
{% assign show = true %}
{% elsif i >= pre and i <= next %}
{% assign show = true %}
{% endif %}
{% assign prev_url = '#' %}
{% endif %}
{% if show %}
<!-- show number -->
<li class="page-item {% if i == paginator.page %} active{% endif %}">
<a class="page-link btn-box-shadow" href="{% if i > 1 %}{{ site.paginate_path | replace: ':num', i | relative_url }}{% else %}{{ '/' | relative_url }}{% endif %}">{{ i }}</a>
</li>
{% else %}
<!-- hide number -->
{% if i < pre and left_ellipsis == false %}
<li class="page-item disabled">
<span class="page-link btn-box-shadow">...</span>
</li>
{% assign left_ellipsis = true %}
{% elsif i > next and right_ellipsis == false %}
<li class="page-item disabled">
<span class="page-link btn-box-shadow">...</span>
</li>
{% assign right_ellipsis = true %}
<li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}">
<a class="page-link" href="{{ prev_url }}" aria-label="previous-page">
<i class="fas fa-angle-left"></i>
</a>
</li>
<!-- page numbers -->
{% assign left_ellipsis = false %}
{% assign right_ellipsis = false %}
{% for i in (1..paginator.total_pages) %}
{% assign pre = paginator.page | minus: 1 %}
{% assign next = paginator.page | plus: 1 %}
{% assign pre_less = pre | minus: 1 %}
{% assign next_more = next | plus: 1 %}
{% assign show = false %}
{% if paginator.page == 1 %}
{% if i <= 3 or i == paginator.total_pages %}
{% assign show = true %}
{% endif %}
{% elsif paginator.page == paginator.total_pages %}
{% if i == 1 or i >= pre_less %}
{% assign show = true %}
{% endif %}
{% else %}
{% if i == 1 or i == paginator.total_pages %}
{% assign show = true %}
{% elsif i >= pre and i <= next %}
{% assign show = true %}
{% endif %}
{% endif %}
{% if show %}
<!-- show number -->
<li class="page-item {% if i == paginator.page %} active{% endif %}">
<a
class="page-link"
href="{% if i > 1 %}{{ site.paginate_path | replace: ':num', i | relative_url }}{% else %}{{ '/' | relative_url }}{% endif %}"
>
{{- i -}}
</a>
</li>
{% else %}
<!-- hide number -->
{% if i < pre and left_ellipsis == false %}
<li class="page-item disabled">
<span class="page-link">...</span>
</li>
{% assign left_ellipsis = true %}
{% elsif i > next and right_ellipsis == false %}
<li class="page-item disabled">
<span class="page-link">...</span>
</li>
{% assign right_ellipsis = true %}
{% endif %}
{% endif %}
{% endfor %}
<!-- mobile pagination -->
<li class="page-index align-middle">
<span>{{ paginator.page }}</span>
<span class="text-muted">/ {{ paginator.total_pages }}</span>
</li>
<!-- right arrow -->
{% if paginator.next_page_path %}
{% assign next_url = paginator.next_page_path | relative_url %}
{% else %}
{% assign next_url = '#' %}
{% endif %}
{% endfor %}
<!-- mobile pagination -->
<li class="page-index align-middle">
<span>{{ paginator.page }}</span>
<span class="text-muted">/ {{ paginator.total_pages }}</span>
</li>
<!-- right arrow -->
{% if paginator.next_page_path %}
{% assign next_url = paginator.next_page_path | relative_url %}
{% else %}
{% assign next_url = "#" %}
{% endif %}
<li class="page-item {% unless paginator.next_page_path %}disabled{% endunless %}">
<a class="page-link btn-box-shadow" href="{{ next_url }}" aria-label="next-page">
<i class="fas fa-angle-right"></i>
</a>
</li>
</ul> <!-- .pagination -->
<li class="page-item {% unless paginator.next_page_path %}disabled{% endunless %}">
<a class="page-link" href="{{ next_url }}" aria-label="next-page">
<i class="fas fa-angle-right"></i>
</a>
</li>
</ul>
</nav>
<!-- .pagination -->

View File

@@ -1,27 +1,52 @@
<!--
Post sharing snippet
-->
<!-- Post sharing snippet -->
<div class="share-wrapper">
<span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share }}</span>
<div class="share-wrapper d-flex align-items-center">
<span class="share-label text-muted">{{ site.data.locales[include.lang].post.share }}</span>
<span class="share-icons">
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
{% assign title = title | uri_escape %}
{% assign url = page.url | absolute_url | url_encode %}
{% for share in site.data.share.platforms %}
{% for share in site.data.share.platforms -%}
{%- capture tooltip -%}
data-bs-toggle="tooltip" data-bs-placement="top" title="{{ share.type }}" aria-label="{{ share.type }}"
{%- endcapture -%}
{% if share.type == 'Mastodon' %}
<script defer type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/share-to-mastodon/+esm"></script>
<button class="btn text-start" {{ tooltip }}>
<share-to-mastodon
class="share-mastodon"
message="{{ title }}"
url="{{ url }}"
{%- if share.instances -%}
customInstanceList="{{ share.instances | jsonify | xml_escape }}"
{%- endif %}
>
<i class="fa-fw {{ share.icon }}"></i>
</share-to-mastodon>
</button>
{% continue %}
{% endif %}
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
title="{{ share.type }}" target="_blank" rel="noopener" aria-label="{{ share.type }}">
<i class="fa-fw {{ share.icon }}"></i>
</a>
<a href="{{ link }}" target="_blank" rel="noopener" {{ tooltip }}>
<i class="fa-fw {{ share.icon }}"></i>
</a>
{% endfor %}
<i id="copy-link" class="fa-fw fas fa-link small"
data-toggle="tooltip" data-placement="top"
title="{{ site.data.locales[site.lang].post.button.share_link.title }}"
data-title-succeed="{{ site.data.locales[site.lang].post.button.share_link.succeed }}">
</i>
<button
id="copy-link"
aria-label="Copy link"
class="btn small"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ site.data.locales[include.lang].post.button.share_link.title }}"
data-title-succeed="{{ site.data.locales[include.lang].post.button.share_link.succeed }}"
>
<i class="fa-fw fas fa-link pe-none fs-6"></i>
</button>
</span>
</div>

View File

@@ -1,10 +1,8 @@
<!--
Calculate the post's reading time, and display the word count in tooltip
-->
<!-- Calculate the post's reading time, and display the word count in tooltip -->
{% assign words = include.content | strip_html | number_of_words: "auto" %}
{% assign words = include.content | strip_html | number_of_words: 'auto' %}
<!-- words per minute -->
<!-- words per minute -->
{% assign wpm = 180 %}
{% assign min_time = 1 %}
@@ -16,15 +14,24 @@
{% endunless %}
{% capture read_prompt %}
{{- site.data.locales[site.lang].post.read_time.prompt -}}
{{- site.data.locales[include.lang].post.read_time.prompt -}}
{% endcapture %}
<!-- return element -->
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
title="{{ words }} {{ site.data.locales[site.lang].post.words }}">
<em>{{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit -}}</em>
<span
class="readtime"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="{{ words }} {{ site.data.locales[include.lang].post.words }}"
>
<em>
{{- read_time -}}
{{ ' ' }}
{{- site.data.locales[include.lang].post.read_time.unit -}}
</em>
{%- if include.prompt -%}
{%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
{%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
{%- unless _prompt_words > 1 -%}{{ ' ' }}{%- endunless -%}
{{ read_prompt }}
{%- endif -%}
</span>

View File

@@ -1,6 +1,4 @@
<!--
Refactor the HTML structure.
-->
<!-- Refactor the HTML structure -->
{% assign _content = include.content %}
@@ -32,42 +30,24 @@
{% endif %}
<!-- Change the icon of checkbox -->
{% if _content contains '<input type="checkbox"' %}
{% assign _content = _content
| replace:
'<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />',
'<i class="fas fa-check-circle fa-fw checked"></i>'
| replace:
'<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />',
'<i class="far fa-circle fa-fw"></i>'
| replace: '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />',
'<i class="fas fa-check-circle fa-fw checked"></i>'
| replace: '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />',
'<i class="far fa-circle fa-fw"></i>'
%}
{% endif %}
<!-- images -->
<!-- Handle images -->
{% assign IMG_TAG = '<img ' %}
{% if _content contains IMG_TAG %}
{% assign _img_content = nil %}
{% assign _img_content = null %}
{% assign _img_snippets = _content | split: IMG_TAG %}
<!-- CDN URL -->
{% if site.img_cdn %}
{% if site.img_cdn contains '//' %}
{% assign _path_prefix = site.img_cdn %}
{% else %}
{% assign _path_prefix = site.img_cdn | relative_url %}
{% endif %}
{% else %}
{% assign _path_prefix = site.baseurl %}
{% endif %}
<!-- Add image path -->
{% if page.img_path %}
{% assign _path = page.img_path | append: '/' | replace: '//', '/' %}
{% assign _path_prefix = _path_prefix | append: _path %}
{% endif %}
{% for _img_snippet in _img_snippets %}
{% if forloop.first %}
{% assign _img_content = _img_snippet %}
@@ -84,25 +64,20 @@
{% assign _left = _left | remove: ' /' | replace: ' w=', ' width=' | replace: ' h=', ' height=' %}
{% assign _attrs = _left | split: '" ' %}
{% assign _width = nil %}
{% assign _height = nil %}
{% assign _lqip = nil %}
{% assign _class = nil %}
{% assign _src = null %}
{% assign _lqip = null %}
{% assign _class = null %}
{% for _attr in _attrs %}
{% unless _attr contains '=' %}
{% continue %}
{% endunless %}
{% assign _pair = _attr | remove: '"' | split: '=' %}
{% assign _pair = _attr | split: '="' %}
{% capture _key %}{{ _pair | first }}{% endcapture %}
{% capture _value %}{{ _pair | last }}{% endcapture %}
{% capture _value %}{{ _pair | last | remove: '"' }}{% endcapture %}
{% case _key %}
{% when 'width' %}
{% assign _width = _value %}
{% when 'height' %}
{% assign _height = _value %}
{% when 'src' %}
{% assign _src = _value %}
{% when 'lqip' %}
@@ -110,7 +85,6 @@
{% when 'class' %}
{% assign _class = _value %}
{% endcase %}
{% endfor %}
<!-- take out classes -->
@@ -119,78 +93,83 @@
{% assign _left = _left | remove: _old_class %}
{% endif %}
{% assign _final_src = nil %}
{% assign _final_src = null %}
{% assign _lazyload = true %}
{%- capture _img_url -%}
{% include img-url.html src=_src img_path=page.img_path %}
{%- endcapture -%}
{% assign _path_prefix = _img_url | remove: _src %}
{% unless _src contains '//' %}
{% assign _final_src = _path_prefix | append: _src %}
{% capture _src_from %}"{{ _src }}"{% endcapture %}
{% capture _src_to %}"{{ _final_src }}"{% endcapture %}
{% assign _left = _left | replace: _src_from, _src_to %}
{% assign _src_alt = 'src="' | append: _path_prefix %}
{% assign _left = _left | replace: 'src="', _src_alt %}
{% endunless %}
{% if _lqip %}
{% unless _lqip contains ':' %}
{% assign _final_lqip = _path_prefix | append: _lqip %}
{% capture _lqip_from %}"{{ _lqip }}"{% endcapture %}
{% capture _lqip_to %}"{{ _final_lqip }}"{% endcapture %}
{% assign _left = _left | replace: _lqip_from, _lqip_to %}
{% assign _lazyload = false %}
{% assign _class = _class | append: ' blur' %}
{% unless _lqip contains 'data:' %}
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
{% assign _left = _left | replace: 'lqip="', _lqip_alt %}
{% endunless %}
{% endif %}
<!-- lazy-load images <https://github.com/aFarkas/lazysizes#readme> -->
{% assign _left = _left | replace: 'src=', 'data-src=' %}
{% if _left contains 'class=' %}
{% assign _left = _left | replace: 'class="', 'class="lazyload '%}
{% else %}
{% assign _left = _left | append: ' class="lazyload"' %}
{% endif %}
<!-- add image placeholder -->
{% if _lqip %}
{% assign _left = _left | replace: ' lqip=', ' data-lqip="true" src=' %}
{% else %}
{% if _width and _height %}
<!-- add SVG placehoder -->
{%- capture _svg -%}
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{ _width }} {{ _height }}'%3E%3C/svg%3E"
{%- endcapture -%}
{% assign _left = _svg | append: ' ' | append: _left %}
{% assign _class = _class | append: ' shimmer' %}
{% endif %}
{% endif %}
<!-- Bypass the HTML-proofer test -->
{% assign _left = _left | append: ' data-proofer-ignore' %}
<!-- make sure the `<img>` is wrapped by `<a>` -->
{% assign _parent = _right | slice: 1, 4 %}
{% if _parent == '</a>' %}
<!-- add class to exist <a> tag -->
{% assign _size = _img_content | size | minus: 1 %}
{% capture _class %}
class="img-link{% unless _lqip %} shimmer{% endunless %}"
{% endcapture %}
{% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %}
<!-- add image placeholder -->
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
{% else %}
{% assign _class = _class | append: ' shimmer' %}
{% endif %}
<!-- lazy-load images -->
{% if _lazyload %}
{% assign _left = _left | append: ' loading="lazy"' %}
{% endif %}
{% if page.layout == 'home' %}
<!-- create the image wrapper -->
{%- capture _wrapper_start -%}
<a href="{{ _final_src | default: _src }}" class="popup img-link {{ _class }}">
{%- endcapture -%}
{% assign _wrapper_start = '<div class="preview-img ' | append: _class | append: '">' %}
{% assign _img_content = _img_content | append: _wrapper_start %}
{% assign _right = _right | prepend: '></a' %}
{% assign _right = _right | prepend: '></div' %}
{% else %}
<!-- make sure the `<img>` is wrapped by `<a>` -->
{% assign _parent = _right | slice: 1, 4 %}
{% if _parent == '</a>' %}
<!-- add class to exist <a> tag -->
{% assign _size = _img_content | size | minus: 1 %}
{% capture _class %}
class="img-link{% unless _lqip %} shimmer{% endunless %}"
{% endcapture %}
{% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %}
{% else %}
<!-- create the image wrapper -->
{% assign _wrapper_start = _final_src
| default: _src
| prepend: '<a href="'
| append: '" class="popup img-link '
| append: _class
| append: '">'
%}
{% assign _img_content = _img_content | append: _wrapper_start %}
{% assign _right = '></a' | append: _right %}
{% endif %}
{% endif %}
<!-- combine -->
{% assign _img_content = _img_content | append: IMG_TAG | append: _left | append: _right %}
{% endfor %}
{% if _img_content %}
{% assign _content = _img_content %}
{% endif %}
{% endif %}
<!-- Add header for code snippets -->
@@ -200,42 +179,38 @@
{% assign _new_content = '' %}
{% for _snippet in _code_spippets %}
{% if forloop.last %}
{% assign _new_content = _new_content | append: _snippet %}
{% else %}
{% assign _left = _snippet | split: '><' | last%}
{% assign _left = _snippet | split: '><' | last %}
{% if _left contains 'file="' %}
{% assign _label_text = _left | split: 'file="' | last | split: '"' | first %}
{% assign _label_icon = 'far fa-file-code' %}
{% assign _label_icon = 'far fa-file-code fa-fw' %}
{% else %}
{% assign _lang = _left | split: 'language-' | last | split: ' ' | first %}
{% capture _label_text %}{% include language-alias.html language=_lang %}{% endcapture %}
{% assign _label_icon = 'fas fa-code small' %}
{% assign _label_icon = 'fas fa-code fa-fw small' %}
{% endif %}
{% capture _label %}
<span data-label-text="{{ _label_text | strip }}"><i class="{{ _label_icon }}"></i></span>
{% endcapture %}
{% assign _new_content = _new_content | append: _snippet
| append: '<div class="code-header">'
| append: _label
| append: '<button aria-label="copy" data-title-succeed="'
| append: site.data.locales[site.lang].post.button.copy_code.succeed
| append: '"><i class="far fa-clipboard"></i></button></div>'
| append: '<div class="highlight"><code>'
{% assign _new_content = _new_content
| append: _snippet
| append: '<div class="code-header">'
| append: _label
| append: '<button aria-label="copy" data-title-succeed="'
| append: site.data.locales[include.lang].post.button.copy_code.succeed
| append: '"><i class="far fa-clipboard"></i></button></div>'
| append: '<div class="highlight"><code>'
%}
{% endif %}
{% endfor %}
{% assign _content = _new_content %}
{% endif %}
<!-- Create heading anchors -->
@@ -244,11 +219,11 @@
{% assign _heading_content = _content %}
{% for level in heading_levels %}
{% capture mark_start %}<h{{ level }} id="{% endcapture %}
{% capture mark_end %}</h{{ level }}>{% endcapture %}
{% assign mark_start = '<h' | append: level | append: ' id="' %}
{% assign mark_end = '</h' | append: level | append: '>' %}
{% if _heading_content contains mark_start %}
{% assign _new_content = nil %}
{% assign _new_content = null %}
{% assign heading_snippets = _heading_content | split: mark_start %}
{% for snippet in heading_snippets %}
@@ -258,25 +233,23 @@
{% endif %}
{% assign id = snippet | split: '"' | first %}
{% capture anchor %}<a href="#{{ id }}" class="anchor text-muted"><i class="fas fa-hashtag"></i></a>{% endcapture %}
{% assign anchor = '<a href="#'
| append: id
| append: '" class="anchor text-muted"><i class="fas fa-hashtag"></i></a>'
%}
{% assign left = snippet | split: mark_end | first %}
{% assign right = snippet | slice: left.size, snippet.size %}
{% assign left = left | replace_first: '">', '"><span class="mr-2">' | append: '</span>' %}
{% assign _new_content = _new_content | append: mark_start
| append: left | append: anchor | append: right
%}
{% assign left = left | replace_first: '">', '"><span class="me-2">' | append: '</span>' %}
{% assign _new_content = _new_content | append: mark_start | append: left | append: anchor | append: right %}
{% endfor %}
{% assign _heading_content = _new_content %}
{% endif %}
{% endfor %}
{% assign _content = _heading_content %}
<!-- return -->
{{ _content }}

View File

@@ -1,24 +1,31 @@
<!--
Recommend the other 3 posts according to the tags and categories of the current post,
if the number is not enough, use the other latest posts to supplement.
-->
<!-- Recommend the other 3 posts according to the tags and categories of the current post. -->
<!-- The total size of related posts -->
<!-- The total size of related posts -->
{% assign TOTAL_SIZE = 3 %}
<!-- An random integer that bigger than 0 -->
<!-- An random integer that bigger than 0 -->
{% assign TAG_SCORE = 1 %}
<!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->
<!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->
{% assign CATEGORY_SCORE = 0.5 %}
{% assign SEPARATOR = ":" %}
{% assign SEPARATOR = ':' %}
{% assign score_list = "" | split: "" %}
{% assign last_index = site.posts.size | minus: 1 %}
{% assign match_posts = '' | split: '' %}
{% for category in page.categories %}
{% assign match_posts = match_posts | push: site.categories[category] | uniq %}
{% endfor %}
{% for tag in page.tags %}
{% assign match_posts = match_posts | push: site.tags[tag] | uniq %}
{% endfor %}
{% assign last_index = match_posts.size | minus: 1 %}
{% assign score_list = '' | split: '' %}
{% for i in (0..last_index) %}
{% assign post = site.posts[i] %}
{% assign post = match_posts[i] %}
{% if post.url == page.url %}
{% continue %}
@@ -42,11 +49,9 @@
{% capture score_item %}{{ score }}{{ SEPARATOR }}{{ i }}{% endcapture %}
{% assign score_list = score_list | push: score_item %}
{% endif %}
{% endfor %}
{% assign index_list = "" | split: "" %}
{% assign index_list = '' | split: '' %}
{% if score_list.size > 0 %}
{% assign score_list = score_list | sort | reverse %}
@@ -56,48 +61,36 @@
{% endfor %}
{% endif %}
<!-- Fill with the other newlest posts -->
{% assign less = TOTAL_SIZE | minus: index_list.size %}
{% assign relate_posts = '' | split: '' %}
{% if less > 0 %}
{% for i in (0..last_index) %}
{% assign post = site.posts[i] %}
{% if post.url != page.url %}
{% capture cur_index %}{{ i }}{% endcapture %}
{% unless index_list contains cur_index %}
{% assign index_list = index_list | push: cur_index %}
{% assign less = less | minus: 1 %}
{% if less <= 0 %}
{% break %}
{% endif %}
{% endunless %}
{% endif %}
{% endfor %}
{% endif %}
{% for index in index_list %}
{% assign i = index | to_integer %}
{% assign relate_posts = relate_posts | push: match_posts[i] %}
{% endfor %}
{% if index_list.size > 0 %}
<div id="related-posts" class="mb-2 mb-sm-4">
<h3 class="pt-2 mb-4 ml-1"
data-toc-skip>{{ site.data.locales[site.lang].post.relate_posts }}</h3>
<div class="card-deck mb-4">
{% for entry in index_list %}
{% assign index = entry | plus: 0 %}
{% assign post = site.posts[index] %}
<div class="card">
<a href="{{ post.url | relative_url }}">
<div class="card-body">
{% include datetime.html date=post.date class="small" %}
<h3 class="pt-0 mt-1 mb-3" data-toc-skip>{{ post.title }}</h3>
<div class="text-muted small">
<p>
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
</p>
{% if relate_posts.size > 0 %}
<aside id="related-posts" aria-labelledby="related-label">
<h3 class="mb-4" id="related-label">
{{- site.data.locales[include.lang].post.relate_posts -}}
</h3>
<nav class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4">
{% for post in relate_posts %}
<article class="col">
<a href="{{ post.url | relative_url }}" class="post-preview card h-100">
<div class="card-body">
{% include datetime.html date=post.date lang=include.lang %}
<h4 class="pt-0 my-2">{{ post.title }}</h4>
<div class="text-muted">
<p>
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
</p>
</div>
</div>
</div>
</a>
</div>
{% endfor %}
</div> <!-- .card-deck -->
</div> <!-- #related-posts -->
</a>
</article>
{% endfor %}
</nav>
</aside>
<!-- #related-posts -->
{% endif %}

View File

@@ -4,43 +4,44 @@
-->
{% capture result_elem %}
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
<a href="{url}">{title}</a>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
{categories}
{tags}
</div>
<p>{snippet}</p>
</div>
<article class="px-1 px-sm-2 px-lg-4 px-xl-0">
<header>
<h2><a href="{url}">{title}</a></h2>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
{categories}
{tags}
</div>
</header>
<p>{snippet}</p>
</article>
{% endcapture %}
{% capture not_found %}<p class="mt-5">{{ site.data.locales[site.lang].search.no_results }}</p>{% endcapture %}
<script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>
{% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
json: '{{ '/assets/js/data/search.json' | relative_url }}',
searchResultTemplate: '{{ result_elem | strip_newlines }}',
noResultsText: '{{ not_found }}',
templateMiddleware: function(prop, value, template) {
if (prop === 'categories') {
if (value === '') {
return `${value}`;
} else {
return `<div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
/* Note: dependent library will be loaded in `js-selector.html` */
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
json: '{{ '/assets/js/data/search.json' | relative_url }}',
searchResultTemplate: '{{ result_elem | strip_newlines }}',
noResultsText: '{{ not_found }}',
templateMiddleware: function(prop, value, template) {
if (prop === 'categories') {
if (value === '') {
return `${value}`;
} else {
return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
}
}
}
if (prop === 'tags') {
if (value === '') {
return `${value}`;
} else {
return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
if (prop === 'tags') {
if (value === '') {
return `${value}`;
} else {
return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
}
}
}
}
});
});
</script>

View File

@@ -1,10 +1,9 @@
<!--
The Search results
-->
<!-- The Search results -->
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div class="col-12 col-sm-11 post-content">
<div class="col-11 content">
<div id="search-hints">
{% include trending-tags.html %}
{% include_cached trending-tags.html %}
</div>
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
</div>

View File

@@ -1,60 +1,50 @@
<!--
The Side Bar
-->
<!-- The Side Bar -->
<div id="sidebar" class="d-flex flex-column align-items-end">
<div class="profile-wrapper text-center">
<div id="avatar">
<a href="{{ '/' | relative_url }}" class="mx-auto">
{% if site.avatar != empty and site.avatar %}
{% capture avatar_url %}
{% if site.avatar contains '://' %}
{{ site.avatar }}
{% elsif site.img_cdn != empty and site.img_cdn %}
{{ site.avatar | prepend: site.img_cdn }}
{% else %}
{{ site.avatar | relative_url }}
{% endif %}
{% endcapture %}
<img src="{{ avatar_url | strip }}" alt="avatar" onerror="this.style.display='none'">
{% endif %}
</a>
</div>
<aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
<header class="profile-wrapper">
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
{%- if site.avatar != empty and site.avatar -%}
{%- capture avatar_url -%}
{% include img-url.html src=site.avatar %}
{%- endcapture -%}
<img src="{{- avatar_url -}}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
{%- endif -%}
</a>
<div class="site-title">
<h1 class="site-title">
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
</div>
<div class="site-subtitle font-italic">{{ site.tagline }}</div>
</h1>
<p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
</header>
<!-- .profile-wrapper -->
</div><!-- .profile-wrapper -->
<nav class="flex-column flex-grow-1 w-100 ps-0">
<ul class="nav">
<!-- home -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
<i class="fa-fw fas fa-home"></i>
<span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
</a>
</li>
<!-- the real tabs -->
{% for tab in site.tabs %}
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
<a href="{{ tab.url | relative_url }}" class="nav-link">
<i class="fa-fw {{ tab.icon }}"></i>
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
<ul class="w-100">
<!-- home -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
<span>{{ site.data.locales[site.lang].tabs.home | upcase }}</span>
</a>
</li>
<!-- the real tabs -->
{% for tab in site.tabs %}
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
<a href="{{ tab.url | relative_url }}" class="nav-link">
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
<span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
</a>
</li> <!-- .nav-item -->
{% endfor %}
</ul> <!-- ul.nav.flex-column -->
<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
<span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
</a>
</li>
<!-- .nav-item -->
{% endfor %}
</ul>
</nav>
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
{% unless site.theme_mode %}
<button class="mode-toggle btn" aria-label="Switch Mode">
<button type="button" class="mode-toggle btn" aria-label="Switch Mode">
<i class="fas fa-adjust"></i>
</button>
@@ -81,26 +71,29 @@
{% endcase %}
{% if url %}
<a href="{{ url }}" aria-label="{{ entry.type }}"
{% assign link_types = '' %}
<a
href="{{ url }}"
aria-label="{{ entry.type }}"
{% assign link_types = '' %}
{% unless entry.noblank %}
target="_blank"
{% assign link_types = 'noopener noreferrer' %}
{% endunless %}
{% unless entry.noblank %}
target="_blank"
{% assign link_types = 'noopener noreferrer' %}
{% endunless %}
{% if entry.type == 'mastodon' %}
{% assign link_types = link_types | append: ' me' | strip %}
{% endif %}
{% if entry.type == 'mastodon' %}
{% assign link_types = link_types | append: ' me' | strip %}
{% endif %}
{% unless link_types == empty %}rel="{{ link_types }}"{% endunless %}>
<i class="{{ entry.icon }}"></i>
</a>
{% unless link_types == empty %}
rel="{{ link_types }}"
{% endunless %}
>
<i class="{{ entry.icon }}"></i>
</a>
{% endif %}
{% endfor %}
</div> <!-- .sidebar-bottom -->
</div><!-- #sidebar -->
</div>
<!-- .sidebar-bottom -->
</aside>
<!-- #sidebar -->

View File

@@ -6,11 +6,8 @@
{% endif %}
{% if enable_toc %}
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
<div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[site.lang].panel.toc -}}</div>
<section id="toc-wrapper" class="ps-0 pe-4">
<h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
<nav id="toc"></nav>
</div>
<!-- toc.js will be loaded at medium priority -->
<script src="{{ site.data.assets[origin].toc.js | relative_url }}"></script>
</section>
{% endif %}

View File

@@ -1,70 +1,77 @@
<!--
The Top Bar
-->
<!-- The Top Bar -->
<div id="topbar-wrapper">
<div id="topbar" class="container d-flex align-items-center justify-content-between h-100 pl-3 pr-3 pl-md-4 pr-md-4">
<span id="breadcrumb">
<header id="topbar-wrapper" aria-label="Top Bar">
<div
id="topbar"
class="d-flex align-items-center justify-content-between px-lg-3 h-100"
>
<nav id="breadcrumb" aria-label="Breadcrumb">
{% assign paths = page.url | split: '/' %}
{% assign paths = page.url | split: '/' %}
{% if paths.size == 0 or page.layout == 'home' %}
<!-- index page -->
<span>{{ site.data.locales[include.lang].tabs.home | capitalize }}</span>
{% if paths.size == 0 or page.layout == 'home' %}
<!-- index page -->
<span>{{ site.data.locales[site.lang].tabs.home | capitalize }}</span>
{% else %}
{% for item in paths %}
{% if forloop.first %}
<span>
<a href="{{ '/' | relative_url }}">
{{- site.data.locales[include.lang].tabs.home | capitalize -}}
</a>
</span>
{% else %}
{% elsif forloop.last %}
{% if page.collection == 'tabs' %}
<span>{{ site.data.locales[include.lang].tabs[item] | default: page.title }}</span>
{% else %}
<span>{{ page.title }}</span>
{% endif %}
{% for item in paths %}
{% if forloop.first %}
<span>
<a href="{{ '/' | relative_url }}">
{{ site.data.locales[site.lang].tabs.home | capitalize }}
</a>
</span>
{% elsif forloop.last %}
{% if page.collection == 'tabs' %}
<span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
{% else %}
<span>{{ page.title }}</span>
{% elsif page.layout == 'category' or page.layout == 'tag' %}
<span>
<a href="{{ item | append: '/' | relative_url }}">
{{- site.data.locales[include.lang].tabs[item] | default: page.title -}}
</a>
</span>
{% endif %}
{% endfor %}
{% endif %}
</nav>
<!-- endof #breadcrumb -->
{% elsif page.layout == 'category' or page.layout == 'tag' %}
<span>
<a href="{{ item | relative_url }}">
{{ site.data.locales[site.lang].tabs[item] | default: page.title }}
</a>
</span>
{% endif %}
{% endfor %}
{% endif %}
</span><!-- endof #breadcrumb -->
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
<button type="button" id="sidebar-trigger" class="btn btn-link">
<i class="fas fa-bars fa-fw"></i>
</button>
<div id="topbar-title">
{% if page.layout == 'home' %}
{{- site.data.locales[site.lang].title | default: site.title -}}
{{- site.data.locales[include.lang].title | default: site.title -}}
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
{{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
{{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
{% else %}
{{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
{{- site.data.locales[include.lang].layout[page.layout] | default: page.layout | capitalize -}}
{% endif %}
</div>
<i id="search-trigger" class="fas fa-search fa-fw"></i>
<span id="search-wrapper" class="align-items-center">
<button type="button" id="search-trigger" class="btn btn-link">
<i class="fas fa-search fa-fw"></i>
<input class="form-control" id="search-input" type="search"
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | capitalize }}...">
</span>
<span id="search-cancel" >{{ site.data.locales[site.lang].search.cancel }}</span>
</div>
</button>
</div>
<search class="align-items-center ms-3 ms-lg-0">
<i class="fas fa-search fa-fw"></i>
<input
class="form-control"
id="search-input"
type="search"
aria-label="search"
autocomplete="off"
placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..."
>
</search>
<button type="button" class="btn btn-link text-decoration-none" id="search-cancel">
{{- site.data.locales[include.lang].search.cancel -}}
</button>
</div>
</header>

View File

@@ -1,29 +1,27 @@
{% comment %}
The trending tags list
{% endcomment %}
<!-- The trending tags list -->
{% assign MAX = 10 %}
{% assign size_list = "" | split: "" %}
{% assign tag_list = "" | split: "" %}
{% assign size_list = '' | split: '' %}
{% assign tag_list = '' | split: '' %}
{% for tag in site.tags %}
{% assign size = tag | last | size %}
{% assign size_list = size_list | push: size %}
{% assign tag_str = tag | first | append: "::" | append: size %}
{% assign tag_list = tag_list | push: tag_str %}
{% assign tag_str = tag | first | append: '::' | append: size %}
{% assign tag_list = tag_list | push: tag_str %}
{% endfor %}
{% assign size_list = size_list | sort | reverse %}
{% assign tag_list = tag_list | sort_natural %}
{% assign trending_tags = "" | split: "" %}
{% assign trending_tags = '' | split: '' %}
{% for size in size_list limit: MAX %}
{% for tag_str in tag_list %}
{% assign tag = tag_str | split: "::" %}
{% assign tag = tag_str | split: '::' %}
{% assign tag_name = tag | first %}
{% assign tag_size = tag | last | plus: 0 %}
{% if tag_size == size %}
@@ -36,15 +34,13 @@
{% endfor %}
{% if trending_tags.size > 0 %}
<div id="access-tags">
<div class="panel-heading">{{- site.data.locales[site.lang].panel.trending_tags -}}</div>
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% for tag_name in trending_tags %}
{% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
{% endfor %}
<section>
<h2 class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</h2>
<div class="d-flex flex-wrap mt-3 mb-1 me-3">
{% for tag_name in trending_tags %}
{% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %}
<a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a>
{% endfor %}
</div>
</div>
</section>
{% endif %}

View File

@@ -1,40 +1,40 @@
{% comment %}
Get the last 5 posts from lastmod list.
{% endcomment %}
<!-- Get 5 last posted/updated posts -->
{% assign MAX_SIZE = 5 %}
{% assign all_list = "" | split: "" %}
{% assign all_list = '' | split: '' %}
{% for post in site.posts %}
{% if post.last_modified_at %}
{% capture elem %}
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
{% endcapture %}
{% assign all_list = all_list | push: elem %}
{% endif %}
{% assign datetime = post.last_modified_at | default: post.date %}
{% capture elem %}
{{- datetime | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
{% endcapture %}
{% assign all_list = all_list | push: elem %}
{% endfor %}
{% assign all_list = all_list | sort | reverse %}
{% assign update_list = "" | split: "" %}
{% assign update_list = '' | split: '' %}
{% for entry in all_list limit:MAX_SIZE %}
{% for entry in all_list limit: MAX_SIZE %}
{% assign update_list = update_list | push: entry %}
{% endfor %}
{% if update_list.size > 0 %}
<div id="access-lastmod" class="post">
<div class="panel-heading">{{- site.data.locales[site.lang].panel.lastmod -}}</div>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
<section id="access-lastmod">
<h2 class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</h2>
<ul class="content list-unstyled ps-0 pb-1 ms-1 mt-2">
{% for item in update_list %}
{% assign index = item | split: "::" | last | plus: 0 %}
{% assign index = item | split: '::' | last | plus: 0 %}
{% assign post = site.posts[index] %}
{% assign url = post.url | relative_url %}
<li><a href="{{ url }}">{{ post.title }}</a></li>
<li class="text-truncate lh-lg">
<a href="{{ url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</div> <!-- #access-lastmod -->
</section>
<!-- #access-lastmod -->
{% endif %}

View File

@@ -1,3 +1 @@
Chirpy v<%= pkg.version %> (<%= pkg.homepage %>)
© 2019 <%= pkg.author %>
<%= pkg.license %> Licensed
Chirpy v<%= pkg.version %> | © 2019 <%= pkg.author %> | <%= pkg.license %> Licensed | <%= pkg.homepage %>

8
_javascript/home.js Normal file
View File

@@ -0,0 +1,8 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { initLocaleDatetime, loadImg } from './modules/plugins';
basic();
initSidebar();
initTopbar();
initLocaleDatetime();
loadImg();

View File

@@ -3,24 +3,18 @@
*/
export function back2top() {
$(window).on('scroll', () => {
if (
$(window).scrollTop() > 50 &&
$('#sidebar-trigger').css('display') === 'none'
) {
$('#back-to-top').fadeIn();
const $window = $(window);
const $btn = $('#back-to-top');
$window.on('scroll', () => {
if ($window.scrollTop() > 50) {
$btn.fadeIn();
} else {
$('#back-to-top').fadeOut();
$btn.fadeOut();
}
});
$('#back-to-top').on('click', () => {
$('body,html').animate(
{
scrollTop: 0
},
800
);
return false;
$btn.on('click', () => {
$window.scrollTop(0);
});
}

Some files were not shown because too many files have changed in this diff Show More