From 5dbda0c09f3f03d5c42ba48a3f6698464443bd3e Mon Sep 17 00:00:00 2001 From: Dongee Seo <74766722+seod0209@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:30:21 +0900 Subject: [PATCH 001/209] build(deps-dev): replace the deprecated libraries (#1559) Replace `@babel/plugin-proposal-class-properties` with `@babel/plugin-transform-class-properties` See: https://www.npmjs.com/package/@babel/plugin-proposal-class-properties --- package.json | 2 +- rollup.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ba42ffad70..dc5603b3534 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@babel/core": "^7.23.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-transform-class-properties": "^7.23.3", "@babel/preset-env": "^7.23.9", "@commitlint/cli": "^18.6.1", "@commitlint/config-conventional": "^18.6.2", diff --git a/rollup.config.js b/rollup.config.js index 7f2d14a6101..6226080c26f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -23,7 +23,7 @@ function build(filename) { babel({ babelHelpers: 'bundled', presets: ['@babel/env'], - plugins: ['@babel/plugin-proposal-class-properties'] + plugins: ['@babel/plugin-transform-class-properties'] }), license({ banner: { From b641b3f1f2e54bcfe96d8dff46d4f94186492d98 Mon Sep 17 00:00:00 2001 From: Alexander Fuks Date: Sun, 25 Feb 2024 22:50:41 +0400 Subject: [PATCH 002/209] feat(analytics)!: add post pageviews for GoatCounter (#1543) --------- Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com> --- _config.yml | 15 +++++++++----- _includes/analytics/goatcounter.html | 6 ++++++ _includes/analytics/google.html | 13 ++++++++++++ _includes/goatcounter.html | 8 ------- _includes/google-analytics.html | 14 ------------- _includes/head.html | 2 +- _includes/js-selector.html | 31 ++++++++++++++++++++-------- _includes/pageviews/goatcounter.html | 18 ++++++++++++++++ _layouts/post.html | 18 ++++++++++++---- _sass/layout/post.scss | 2 +- 10 files changed, 85 insertions(+), 42 deletions(-) create mode 100644 _includes/analytics/goatcounter.html create mode 100644 _includes/analytics/google.html delete mode 100644 _includes/goatcounter.html delete mode 100644 _includes/google-analytics.html create mode 100644 _includes/pageviews/goatcounter.html diff --git a/_config.yml b/_config.yml index 79d451fe0c1..79f153d5603 100644 --- a/_config.yml +++ b/_config.yml @@ -49,11 +49,16 @@ google_site_verification: # fill in to your verification string # ↑ -------------------------- # The end of `jekyll-seo-tag` settings -google_analytics: - id: # fill in your Google Analytics ID - -goatcounter: - id: # fill in your Goatcounter ID +# Web Analytics Settings +analytics: + google: + id: # fill in your Google Analytics ID + goatcounter: + id: # fill in your GoatCounter ID + +# Pageviews settings +pageviews: + provider: # now only supports 'goatcounter' # Prefer color scheme setting. # diff --git a/_includes/analytics/goatcounter.html b/_includes/analytics/goatcounter.html new file mode 100644 index 00000000000..78c90b72682 --- /dev/null +++ b/_includes/analytics/goatcounter.html @@ -0,0 +1,6 @@ + + diff --git a/_includes/analytics/google.html b/_includes/analytics/google.html new file mode 100644 index 00000000000..d0aac651c22 --- /dev/null +++ b/_includes/analytics/google.html @@ -0,0 +1,13 @@ + + + diff --git a/_includes/goatcounter.html b/_includes/goatcounter.html deleted file mode 100644 index 4d21d21ec38..00000000000 --- a/_includes/goatcounter.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/_includes/google-analytics.html b/_includes/google-analytics.html deleted file mode 100644 index e5e5119e555..00000000000 --- a/_includes/google-analytics.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/_includes/head.html b/_includes/head.html index 9bad78a729d..7c093597b71 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -72,7 +72,7 @@ {% endif %} - {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} + {% if jekyll.environment == 'production' and site.analytics.google.id != empty and site.analytics.google.id %} diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 1a1fa580bb7..b37d7103fff 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -95,19 +95,32 @@ {% endif %} + +{% if page.layout == 'post' %} + {% assign provider = site.pageviews.provider %} + + {% if provider and provider != empty %} + {% case provider %} + {% when 'goatcounter' %} + {% if site.analytics[provider].id != empty and site.analytics[provider].id %} + {% include pageviews/{{ provider }}.html %} + {% endif %} + {% endcase %} + {% endif %} +{% endif %} + {% if jekyll.environment == 'production' %} {% if site.pwa.enabled %} {% endif %} - - {% if site.google_analytics.id != empty and site.google_analytics.id %} - {% include google-analytics.html %} - {% endif %} - - - {% if site.goatcounter.id != empty and site.goatcounter.id %} - {% include goatcounter.html %} - {% endif %} + + {% for analytics in site.analytics %} + {% capture str %}{{ analytics }}{% endcapture %} + {% assign type = str | split: '{' | first %} + {% if site.analytics[type].id and site.analytics[type].id != empty %} + {% include analytics/{{ type }}.html %} + {% endif %} + {% endfor %} {% endif %} diff --git a/_includes/pageviews/goatcounter.html b/_includes/pageviews/goatcounter.html new file mode 100644 index 00000000000..af536dbdd7c --- /dev/null +++ b/_includes/pageviews/goatcounter.html @@ -0,0 +1,18 @@ + + diff --git a/_layouts/post.html b/_layouts/post.html index f7818bf6e0f..f666d71642c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -74,12 +74,22 @@

{{ page.title }}

- - {% include read-time.html content=content prompt=true lang=lang %} +
+ + {% if site.pageviews.provider and site.analytics[site.pageviews.provider].id %} + + + + + {{ site.data.locales[lang].post.pageview_measure }} + + {% endif %} + + + {% include read-time.html content=content prompt=true lang=lang %} +
- -
diff --git a/_sass/layout/post.scss b/_sass/layout/post.scss index efbde822686..a6dc878cfea 100644 --- a/_sass/layout/post.scss +++ b/_sass/layout/post.scss @@ -15,7 +15,7 @@ } h1 + .post-meta { - > span + span::before { + span + span::before { @include dot; } From e4363871b5be0608d2b92b8aff482825a8044c1b Mon Sep 17 00:00:00 2001 From: Alexander Fuks Date: Mon, 26 Feb 2024 18:17:18 +0400 Subject: [PATCH 003/209] feat: change site verification settings (#1561) --- _config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 79f153d5603..215c6180385 100644 --- a/_config.yml +++ b/_config.yml @@ -44,7 +44,14 @@ social: # - https://www.facebook.com/username # - https://www.linkedin.com/in/username -google_site_verification: # fill in to your verification string +# Site Verification Settings +webmaster_verifications: + google: # fill in your Google verification code + bing: # fill in your Bing verification code + alexa: # fill in your Alexa verification code + yandex: # fill in your Yandex verification code + baidu: # fill in your Baidu verification code + facebook: # fill in your Facebook verification code # ↑ -------------------------- # The end of `jekyll-seo-tag` settings From f8390d4384600fb015728b1b186570fa58ca216f Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 27 Feb 2024 01:39:04 +0800 Subject: [PATCH 004/209] perf!: rename comment setting parameter (#1563) Rename `site.comments.active` to `site.comments.provider` --- _config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 215c6180385..aaaa2ad42fd 100644 --- a/_config.yml +++ b/_config.yml @@ -98,8 +98,9 @@ social_preview_image: # string, local or CORS resources toc: true comments: - active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable - # The active options are as follows: + # Global switch for the post comment system. Keeping it empty means disabled. + provider: # [disqus | utterances | giscus] + # The provider options are as follows: disqus: shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname # utterances settings › https://utteranc.es/ From 9592146ca392236e69ee358412ecc32ef1662127 Mon Sep 17 00:00:00 2001 From: Alexander Fuks Date: Wed, 28 Feb 2024 00:51:33 +0400 Subject: [PATCH 005/209] feat: add support for embed video files (#1558) --- _includes/embed/bilibili.html | 7 +++-- _includes/embed/video.html | 38 +++++++++++++++++++++++++++ _includes/embed/youtube.html | 2 +- _posts/2019-08-08-write-a-new-post.md | 27 +++++++++++++++++++ _sass/addon/commons.scss | 18 +++++++++---- 5 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 _includes/embed/video.html diff --git a/_includes/embed/bilibili.html b/_includes/embed/bilibili.html index eaa09d84607..0aa5552ddfe 100644 --- a/_includes/embed/bilibili.html +++ b/_includes/embed/bilibili.html @@ -1,10 +1,9 @@ \ No newline at end of file +> diff --git a/_includes/embed/video.html b/_includes/embed/video.html new file mode 100644 index 00000000000..eb46c257a84 --- /dev/null +++ b/_includes/embed/video.html @@ -0,0 +1,38 @@ +{% assign video_url = include.src %} +{% assign poster_url = include.poster %} + +{% unless video_url contains '://' %} + {%- capture video_url -%} + {% include img-url.html src=video_url img_path=page.img_path %} + {%- endcapture -%} +{% endunless %} + +{% if poster_url %} + {% unless poster_url contains '://' %} + {%- capture poster_url -%} + {% include img-url.html src=poster_url img_path=page.img_path %} + {%- endcapture -%} + {% endunless %} + {% assign poster = 'poster="' | append: poster_url | append: '"' %} +{% endif %} + +{% assign attributes = 'controls' %} + +{% if include.autoplay %} + {% assign attributes = attributes | append: ' ' | append: 'autoplay' %} +{% endif %} + +{% if include.loop %} + {% assign attributes = attributes | append: ' ' | append: 'loop' %} +{% endif %} + +{% if include.muted %} + {% assign attributes = attributes | append: ' ' | append: 'muted' %} +{% endif %} + +

+ + {{ include.title }} +

diff --git a/_includes/embed/youtube.html b/_includes/embed/youtube.html index 640011f885d..8f080021cc4 100644 --- a/_includes/embed/youtube.html +++ b/_includes/embed/youtube.html @@ -1,5 +1,5 @@ diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index 10201655218..f048f013c4a 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -256,11 +256,9 @@ For normal images: ``` {: .nolineno } -### Video +### Social Media Platforms -#### Social Media Platform - -You can embed videos from social media platforms with the following syntax: +You can embed video/audio from social media platforms with the following syntax: ```liquid {% include embed/{Platform}.html id='{ID}' %} @@ -268,15 +266,21 @@ You can embed videos from social media platforms with the following syntax: Where `Platform` is the lowercase of the platform name, and `ID` is the video ID. -The following table shows how to get the two parameters we need in a given video URL, and you can also know the currently supported video platforms. +The following table shows how to get the two parameters we need in a given video/audio URL, and you can also know the currently supported video platforms. + +| Video URL | Platform | ID | +| -------------------------------------------------------------------------------------------------------------------------- | ---------- | :----------------------- | +| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` | +| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` | +| [https://www.**bilibili**.com/video/**BV1Q44y1B7Wf**](https://www.bilibili.com/video/BV1Q44y1B7Wf) | `bilibili` | `BV1Q44y1B7Wf` | +| [https://www.open.**spotify**.com/track/**3OuMIIFP5TxM8tLXMWYPGV**](https://open.spotify.com/track/3OuMIIFP5TxM8tLXMWYPGV) | `spotify` | `3OuMIIFP5TxM8tLXMWYPGV` | + +Spotify supports some additional parameters: -| Video URL | Platform | ID | -| -------------------------------------------------------------------------------------------------- | ---------- | :------------- | -| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` | -| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` | -| [https://www.**bilibili**.com/video/**BV1Q44y1B7Wf**](https://www.bilibili.com/video/BV1Q44y1B7Wf) | `bilibili` | `BV1Q44y1B7Wf` | +- `compact` - to display compact player instead (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' compact=1 %}`); +- `dark` - to force dark theme (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' dark=1 %}`). -#### Video Files +### Video Files If you want to embed a video file directly, use the following syntax: @@ -310,7 +314,7 @@ Consider an example using all of the above: %} ``` -### Audios +### Audio Files If you want to embed an audio file directly, use the following syntax: diff --git a/_sass/base/_base.scss b/_sass/base/_base.scss index 46e9eb6e83f..b512a484cc2 100644 --- a/_sass/base/_base.scss +++ b/_sass/base/_base.scss @@ -314,7 +314,14 @@ main { .embed-audio { width: 100%; - display: block; + + &.file { + display: block; + } + + &.spotify { + border-radius: 14px; + } @extend %img-caption; } From 4d6c788b9c67c172a679fe22ce34758fb63cb312 Mon Sep 17 00:00:00 2001 From: Alexander Fuks Date: Mon, 8 Sep 2025 23:48:19 +0400 Subject: [PATCH 194/209] docs: update timezone picker reference (#2518) --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 0a78679d26e..d727796fe11 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ theme: jekyll-theme-chirpy # otherwise, the layout language will use the default value of 'en'. lang: en -# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker +# Change to your timezone › https://zones.arilyn.cc timezone: Asia/Shanghai # jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md From 221ca9f52b55b103900832f3c03ad2ecc4415bcc Mon Sep 17 00:00:00 2001 From: Cotes <11371340+cotes2020@users.noreply.github.com> Date: Tue, 14 Oct 2025 04:36:02 +0800 Subject: [PATCH 195/209] fix: restore blurry animation for homepage LQIP (#2551) --- _includes/refactor-content.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index 4586f5c4760..5b6de2f1ef8 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -163,7 +163,7 @@ {% if page.layout == 'home' %} - {% assign _wrapper_start = '
' %} + {% assign _wrapper_start = '
' %} {% assign _img_content = _img_content | append: _wrapper_start %} {% assign _right = _right | prepend: '> Date: Tue, 14 Oct 2025 04:53:51 +0800 Subject: [PATCH 196/209] chore: remove deprecated URL --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f22921b7049..fed8764ebb8 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ ko_fi: coteschung -custom: https://sponsor.cotes.page From a385ffabff61d902db618450d51651afcb00c00a Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 14 Oct 2025 04:54:48 +0800 Subject: [PATCH 197/209] chore: improve ESLint config --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index b8073b6d60f..b6d8f1924ba 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -21,13 +21,13 @@ export default defineConfig([ files: ['_javascript/**/*.js'], languageOptions: { globals: { + ...globals.serviceworker, ClipboardJS: 'readonly', GLightbox: 'readonly', Theme: 'readonly', dayjs: 'readonly', mermaid: 'readonly', tocbot: 'readonly', - importScripts: 'readonly', swconf: 'readonly' } } From ee6839516e046cb2c0230dad1142ce2d39a7abc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 05:23:24 +0800 Subject: [PATCH 198/209] build(deps): bump the gh-actions group across 1 directory with 5 updates (#2550) Bumps the gh-actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4` | `5` | | [actions/setup-node](https://github.com/actions/setup-node) | `4` | `5` | | [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` | | [actions/github-script](https://github.com/actions/github-script) | `7` | `8` | | [actions/stale](https://github.com/actions/stale) | `9` | `10` | Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) Updates `actions/setup-node` from 4 to 5 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v5) Updates `github/codeql-action` from 3 to 4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3...v4) Updates `actions/github-script` from 7 to 8 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) Updates `actions/stale` from 9 to 10 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v9...v10) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions - dependency-name: actions/setup-node dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions - dependency-name: actions/stale dependency-version: '10' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/codeql.yml | 8 ++++---- .github/workflows/commitlint.yml | 2 +- .github/workflows/lint-js.yml | 4 ++-- .github/workflows/lint-scss.yml | 4 ++-- .github/workflows/pr-filter.yml | 4 ++-- .github/workflows/stale.yml | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c665f755e11..cd67b6d2874 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,14 +14,14 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: 3.3 bundler-cache: true - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: lts/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31b878632b1..118fc715a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 # for posts's lastmod @@ -42,7 +42,7 @@ jobs: bundler-cache: true - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: lts/* diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 06feb7fd69a..e460e49aa67 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,11 +24,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: "${{ matrix.language }}" config-file: .github/codeql/codeql-config.yml @@ -36,9 +36,9 @@ jobs: # 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@v3 + uses: github/codeql-action/autobuild@v4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 58f1a3ff3d1..ef14388bc52 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -11,5 +11,5 @@ jobs: commitlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: wagoid/commitlint-github-action@v6 diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 1e1923486dd..205f4790004 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -16,10 +16,10 @@ jobs: lint-js: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: lts/* diff --git a/.github/workflows/lint-scss.yml b/.github/workflows/lint-scss.yml index 57776dd2c99..48d8a7263b7 100644 --- a/.github/workflows/lint-scss.yml +++ b/.github/workflows/lint-scss.yml @@ -12,10 +12,10 @@ jobs: lint-scss: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: lts/* diff --git a/.github/workflows/pr-filter.yml b/.github/workflows/pr-filter.yml index 40ba53b1c5d..ee3f09db24b 100644 --- a/.github/workflows/pr-filter.yml +++ b/.github/workflows/pr-filter.yml @@ -13,11 +13,11 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Check PR Content id: intercept - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4f6e91cbf39..1c9913f54e9 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -20,7 +20,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: # 60 days before marking issues/PRs stale days-before-close: -1 # does not close automatically From b3d7db3cda006a63cdecd718f97d415eab709dc8 Mon Sep 17 00:00:00 2001 From: Cotes <11371340+cotes2020@users.noreply.github.com> Date: Fri, 17 Oct 2025 00:02:12 +0800 Subject: [PATCH 199/209] =?UTF-8?q?refactor:=20avoid=20converting=20media?= =?UTF-8?q?=E2=80=98s=20relative=20paths=20to=20absolute=20paths=20(#2552)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _includes/media-url.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/media-url.html b/_includes/media-url.html index ea410750268..407d4218747 100644 --- a/_includes/media-url.html +++ b/_includes/media-url.html @@ -15,7 +15,9 @@ {%- if url -%} {% unless url contains ':' %} {%- comment -%} Add media resources subpath prefix {%- endcomment -%} - {% assign url = include.subpath | default: '' | append: '/' | append: url %} + {% if include.subpath %} + {% assign url = include.subpath | append: '/' | append: url %} + {% endif %} {%- comment -%} Prepend CND URL {%- endcomment -%} {% if site.cdn %} From 604528e3ce11ec0278e83f41105ed5949362bb54 Mon Sep 17 00:00:00 2001 From: Cotes <11371340+cotes2020@users.noreply.github.com> Date: Mon, 20 Oct 2025 02:24:40 +0800 Subject: [PATCH 200/209] fix(search): restore full-text search for posts with description (#2557) --- _includes/post-description.html | 30 ------------------------- _includes/post-summary.html | 39 +++++++++++++++++++++++++++++++++ _includes/related-posts.html | 2 +- _layouts/home.html | 2 +- assets/feed.xml | 2 +- assets/js/data/search.json | 3 ++- 6 files changed, 44 insertions(+), 34 deletions(-) delete mode 100644 _includes/post-description.html create mode 100644 _includes/post-summary.html diff --git a/_includes/post-description.html b/_includes/post-description.html deleted file mode 100644 index 48bb03b76eb..00000000000 --- a/_includes/post-description.html +++ /dev/null @@ -1,30 +0,0 @@ -{%- comment -%} - Get post description or generate it from the post content. -{%- endcomment -%} - -{%- capture description -%} - {%- if post.description -%} - {{- post.description -}} - {%- else -%} - {% comment %} - Remove the line number of the code snippet. - {% endcomment %} - {%- assign content = post.content -%} - - {%- if content contains '
' -%}
-      {%- assign content = content | replace: '
', '' -%}
-    {%- endif -%}
-
-    {{- content | strip_html | newline_to_br | replace: '
', ' ' | strip_newlines -}} - {%- endif -%} -{%- endcapture -%} - -{%- if include.json -%} - {%- assign description = description | jsonify -%} -{%- else -%} - {%- assign max_length = include.max_length | default: 200 -%} - {%- assign description = description | strip | truncate: max_length -%} -{%- endif -%} - -{{- description -}} diff --git a/_includes/post-summary.html b/_includes/post-summary.html new file mode 100644 index 00000000000..c9314fc812a --- /dev/null +++ b/_includes/post-summary.html @@ -0,0 +1,39 @@ +{%- comment -%} + Get the post's description or body content. + + Arguments: + full_text: If true, return the full content. Default is false. + max_length: The maximum length of the returned content. Default is 200. +{%- endcomment -%} + +{%- if post.description and include.full_text != true -%} + {{- post.description -}} +{%- else -%} + {%- comment -%} Remove the line numbers from the code snippet. {%- endcomment -%} + + {%- assign content = post.content -%} + + {%- if content contains '
' -%}
+    {%- assign content = content
+      | replace: '
',
+        '' -%}
+  {%- endif -%}
+
+  {%- assign content = content
+    | markdownify
+    | strip_html
+    | newline_to_br
+    | replace: '
', ' ' + | strip_newlines + | strip + -%} + + {%- unless include.full_text -%} + {%- assign max_length = include.max_length | default: 200 -%} + {%- assign content = content | truncate: max_length -%} + {%- endunless -%} + + {{- content -}} +{%- endif -%} diff --git a/_includes/related-posts.html b/_includes/related-posts.html index 37a295bdc29..4b4f8088a0c 100644 --- a/_includes/related-posts.html +++ b/_includes/related-posts.html @@ -82,7 +82,7 @@

{{ post.title }}

-

{% include post-description.html %}

+

{% include post-summary.html %}

diff --git a/_layouts/home.html b/_layouts/home.html index 66a12012f49..cb9ab244d48 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -78,7 +78,7 @@

{{ post.title }}

-

{% include post-description.html %}

+

{% include post-summary.html %}