From 981ddba30e57934f9056b8d468f0d17db131e1e8 Mon Sep 17 00:00:00 2001 From: cheese Date: Thu, 5 Dec 2024 14:38:06 +0100 Subject: [PATCH 01/20] feat(i18n): add Dutch locale (#2076) --- _data/locales/nl-NL.yml | 90 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 _data/locales/nl-NL.yml diff --git a/_data/locales/nl-NL.yml b/_data/locales/nl-NL.yml new file mode 100644 index 000000000..d7e8016d0 --- /dev/null +++ b/_data/locales/nl-NL.yml @@ -0,0 +1,90 @@ +# The layout text of site + +# ----- Commons label ----- + +layout: + post: Post + category: Categorie + tag: Tag + +# The tabs of sidebar +tabs: + # format: : + home: Startpagina + categories: Categorieën + tags: Tags + archives: Archief + about: Over + +# the text displayed in the search bar & search results +search: + hint: Zoek + cancel: Annuleer + no_results: Oops! Geen resultaat gevonden. + +panel: + lastmod: Recent Bijgewerkt + trending_tags: Trending Tags + toc: Inhoud + +copyright: + # Shown at the bottom of the post + license: + template: Alle posts zijn onder :LICENSE_NAME gepubliceerd door de auteur. + name: CC BY 4.0 + link: https://creativecommons.org/licenses/by/4.0/ + + # Displayed in the footer + brief: Sommige rechten voorbehouden. + verbose: >- + Tenzij anders vermeld, alle posts zijn onder de + Creative Commons Attribution 4.0 International (CC BY 4.0) gepubliceerd door de auteur. + +meta: Gebruikt :THEME + +not_found: + statement: Sorry, we hebben de URL verkeerd geplaatst of hij verwijst naar iets dat niet bestaat. + +notification: + update_found: Nieuwe versie van inhoud beschikbaar. + update: Update + +# ----- Posts related labels ----- +post: + written_by: Door + posted: Posted + updated: Bijgewerkt + words: woorden + pageview_measure: Gelezen + read_time: + unit: min + prompt: lees + relate_posts: Verder Lezen + share: Deel + button: + next: Volgende + previous: Vorige + copy_code: + succeed: Gekopieerd! + share_link: + title: Link kopiëren + succeed: Succesvol gekopieerd! + +# Date time format. +# See: , +df: + post: + strftime: "%b %e, %Y" + dayjs: "ll" + archives: + strftime: "%b" + dayjs: "MMM" + +# categories page +categories: + category_measure: + singular: categorie + plural: categorieën + post_measure: + singular: post + plural: posts From 0eb7efa7f53508bf6b48eb9d773d5c5047c3c525 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:15:51 +0800 Subject: [PATCH 02/20] fix(search): avoid missing spaces between paragraphs in search results (#2199) - Use a common post-snippet for search results to avoid line break issues - Reduce Jekyll include files to speed up the build - Remove outdated key from search.json --- _includes/no-linenos.html | 10 ---------- _includes/post-description.html | 13 +++++++++++-- _includes/search-loader.html | 2 +- assets/js/data/search.json | 8 ++++---- 4 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 _includes/no-linenos.html diff --git a/_includes/no-linenos.html b/_includes/no-linenos.html deleted file mode 100644 index 850069337..000000000 --- a/_includes/no-linenos.html +++ /dev/null @@ -1,10 +0,0 @@ -{% comment %} - Remove the line number of the code snippet. -{% endcomment %} - -{% assign content = include.content %} - -{% if content contains '
' %}
-  {% assign content = content | replace: '
', '' %}
-{% endif %}
diff --git a/_includes/post-description.html b/_includes/post-description.html
index 6c400360b..c00e51653 100644
--- a/_includes/post-description.html
+++ b/_includes/post-description.html
@@ -8,8 +8,17 @@
 {%- if post.description -%}
   {{- post.description -}}
 {%- else -%}
-  {%- include no-linenos.html content=post.content -%}
-  {{- content | markdownify | strip_html -}}
+  {% comment %}
+    Remove the line number of the code snippet.
+  {% endcomment %}
+  {% assign content = post.content %}
+
+  {% if content contains '
' %}
+    {% assign content = content | replace: '
', '' %}
+  {% endif %}
+
+  {{- content | markdownify | strip_html | newline_to_br | replace: '
', ' ' | strip_newlines -}} {%- endif -%} {%- endcapture -%} diff --git a/_includes/search-loader.html b/_includes/search-loader.html index 7fd065d8f..5a43fba83 100644 --- a/_includes/search-loader.html +++ b/_includes/search-loader.html @@ -12,7 +12,7 @@ {tags} -

{snippet}

+

{content}

{% endcapture %} diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 2601ed076..32bcff9b0 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -5,16 +5,16 @@ swcache: true [ {% for post in site.posts %} + {%- capture description -%} + {% include post-description.html %} + {%- endcapture -%} { "title": {{ post.title | jsonify }}, "url": {{ post.url | relative_url | jsonify }}, "categories": {{ post.categories | join: ', ' | jsonify }}, "tags": {{ post.tags | join: ', ' | jsonify }}, "date": "{{ post.date }}", - {% include no-linenos.html content=post.content %} - {% assign _content = content | strip_html | strip_newlines %} - "snippet": {{ _content | truncate: 200 | jsonify }}, - "content": {{ _content | jsonify }} + "content": "{{ description }}" }{% unless forloop.last %},{% endunless %} {% endfor %} ] From 231956d77ad2cd05293e2eb0bcb9f6238aaf840b Mon Sep 17 00:00:00 2001 From: algorithmic-parallels <197329719+algorithmic-parallels@users.noreply.github.com> Date: Thu, 6 Feb 2025 00:27:54 -0500 Subject: [PATCH 03/20] docs: using long form Jekyll subcommand (#2231) --- _posts/2019-08-09-getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index 268112694..71383938b 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -68,7 +68,7 @@ For Unix-like systems, you can set up the environment natively for optimal perfo To run the site locally, use the following command: ```terminal -$ bundle exec jekyll s +$ bundle exec jekyll serve ``` > If you are using Dev Containers, you must run that command in the **VS Code** Terminal. From 7d4d35cd10109e78d60fbb6b25a9b205f780ad63 Mon Sep 17 00:00:00 2001 From: MasihGhaznavi <48735862+masihgh@users.noreply.github.com> Date: Sun, 9 Feb 2025 09:58:39 +0330 Subject: [PATCH 04/20] feat(i18n): add persian language (#2238) --- _data/locales/fa-IR.yaml | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 _data/locales/fa-IR.yaml diff --git a/_data/locales/fa-IR.yaml b/_data/locales/fa-IR.yaml new file mode 100644 index 000000000..d5c6e0eb6 --- /dev/null +++ b/_data/locales/fa-IR.yaml @@ -0,0 +1,91 @@ +# The layout text of site + +# ----- Commons label ----- + +layout: + post: پست + category: دسته‌بندی + tag: برچسب + +# The tabs of sidebar +tabs: + # format: : + 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: >- + مگر اینکه خلاف آن ذکر شده باشد، پست‌های وبلاگ در این سایت + تحت مجوز Creative Commons Attribution 4.0 International (CC BY 4.0) توسط نویسنده منتشر شده‌اند. + +meta: با استفاده از :PLATFORM قالب :THEME + +not_found: + statement: متأسفیم، لینک زیر معتبر نیست یا به صفحه‌ای که وجود ندارد اشاره می‌کند. + +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: , +df: + post: + strftime: "%b %e, %Y" + dayjs: "ll" + archives: + strftime: "%b" + dayjs: "MMM" + +# categories page +categories: + category_measure: + singular: دسته‌بندی + plural: دسته‌بندی‌ها + post_measure: + singular: پست + plural: پست‌ها From e3158642c3aa248fc1f655773e903cafa862972e Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:06:37 -0500 Subject: [PATCH 05/20] docs: fix typo in `2019-08-08-write-a-new-post.md` (#2281) Signed-off-by: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> --- _posts/2019-08-08-write-a-new-post.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index 085e7d67b..102016552 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -21,7 +21,7 @@ Basically, you need to fill the [Front Matter](https://jekyllrb.com/docs/front-m --- title: TITLE date: YYYY-MM-DD HH:MM:SS +/-TTTT -categories: [TOP_CATEGORIE, SUB_CATEGORIE] +categories: [TOP_CATEGORY, SUB_CATEGORY] tags: [TAG] # TAG names should always be lowercase --- ``` From 54d4d59d22ac543a14bfbd9bb3d6fb6756056041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BCrkalp=20Burak=20KAYRANCIO=C4=9ELU?= Date: Sat, 8 Mar 2025 17:24:47 +0300 Subject: [PATCH 06/20] perf(seo): improve accessibility and aligns with best practices (#2289) --- _includes/topbar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/topbar.html b/_includes/topbar.html index fd68d1feb..09bbc2085 100644 --- a/_includes/topbar.html +++ b/_includes/topbar.html @@ -40,7 +40,7 @@ - @@ -55,7 +55,7 @@ {% endif %} - From 571c90f13011eb91d0e1392218f3953060b920c9 Mon Sep 17 00:00:00 2001 From: nakamura <71050561+manabu-nakamura@users.noreply.github.com> Date: Sat, 29 Mar 2025 04:54:54 +0900 Subject: [PATCH 07/20] feat(i18n): add Japanese locale (#2295) --- _data/locales/ja-JP.yml | 84 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 _data/locales/ja-JP.yml diff --git a/_data/locales/ja-JP.yml b/_data/locales/ja-JP.yml new file mode 100644 index 000000000..8e016b997 --- /dev/null +++ b/_data/locales/ja-JP.yml @@ -0,0 +1,84 @@ +# The layout text of site + +# ----- Commons label ----- + +layout: + post: 投稿 + category: カテゴリー + tag: タグ + +# The tabs of sidebar +tabs: + # format: : + 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: Some rights reserved. + verbose: >- + 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: :PLATFORM 用の :THEME を使用しています。 + +not_found: + statement: この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: , +df: + post: + strftime: "%Y/%m/%d" + dayjs: "YYYY/MM/DD" + +# categories page +categories: + category_measure: カテゴリー + post_measure: 投稿 From db40db6d3df7058a28b04f42ff6ee79954a5de1c Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sat, 5 Apr 2025 01:28:29 +0200 Subject: [PATCH 08/20] chore: add parameter in `search-results.html` (#2330) --- _includes/search-results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/search-results.html b/_includes/search-results.html index 00a318286..04a103054 100644 --- a/_includes/search-results.html +++ b/_includes/search-results.html @@ -3,7 +3,7 @@
- {% include_cached trending-tags.html %} + {% include_cached trending-tags.html lang=include.lang %}
From f7449299e88c71da2104f0007f2db23a8fa798be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= Date: Mon, 7 Apr 2025 13:36:32 +0200 Subject: [PATCH 09/20] fix: prevent the search bar from moving when focused (#2336) --- _includes/topbar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/topbar.html b/_includes/topbar.html index 09bbc2085..735f1d1cf 100644 --- a/_includes/topbar.html +++ b/_includes/topbar.html @@ -1,6 +1,6 @@ -
+
Date: Sun, 13 Apr 2025 22:16:47 +0800 Subject: [PATCH 10/20] feat(i18n): add Catalan Spanish locale translation (#2349) --- _data/locales/ca-ES.yml | 84 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 _data/locales/ca-ES.yml diff --git a/_data/locales/ca-ES.yml b/_data/locales/ca-ES.yml new file mode 100644 index 000000000..e3d5b39ce --- /dev/null +++ b/_data/locales/ca-ES.yml @@ -0,0 +1,84 @@ +# The layout text of site + +# ----- Commons label ----- + +layout: + post: Entrada + category: Categoria + tag: Etiqueta + +# The tabs of sidebar +tabs: + # format: : + home: Inici + categories: Categories + tags: Etiquetes + archives: Arxiu + about: Sobre + +# the text displayed in the search bar & search results +search: + hint: Cercar + cancel: Cancel·lar + no_results: Ups! No s'han trobat resultats. + +panel: + lastmod: Actualitzat recentment + trending_tags: Etiquetes populars + toc: Taula de continguts + +copyright: + # Shown at the bottom of the post + license: + template: Aquesta entrada està llicenciada sota :LICENSE_NAME per l'autor. + name: CC BY 4.0 + link: https://creativecommons.org/licenses/by/4.0/ + + # Displayed in the footer + brief: Alguns drets reservats. + verbose: >- + Excepte que s'indiqui explícitament, les entrades d'aquest blog estan llicenciades + sota la llicència Creative Commons Attribution 4.0 International (CC BY 4.0) per l'autor. + +meta: Fet amb :PLATFORM utilitzant el tema :THEME + +not_found: + statement: Ho sentim, hem perdut aquesta URL o apunta a alguna cosa que no existeix. + +notification: + update_found: Hi ha una nova versió de contingut disponible. + update: Actualitzar + +# ----- Posts related labels ----- + +post: + written_by: Per + posted: Publicat + updated: Actualitzat + words: paraules + pageview_measure: visites + read_time: + unit: min + prompt: " de lectura" + relate_posts: Entrades relacionades + share: Compartir + button: + next: Següent + previous: Anterior + copy_code: + succeed: Copiat! + share_link: + title: Copiar enllaç + succeed: Enllaç copiat! + +# Date time format. +# See: , +df: + post: + strftime: "%Y/%m/%d" + dayjs: "YYYY/MM/DD" + +# categories page +categories: + category_measure: categories + post_measure: entrades From 7708adbf30e6dea51a84311b86bc224739f656f6 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 16 Apr 2025 18:08:43 +0800 Subject: [PATCH 11/20] fix: recognize global theme mode (#2357) --- _javascript/modules/theme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_javascript/modules/theme.js b/_javascript/modules/theme.js index f9ebf2024..49e4e89bb 100644 --- a/_javascript/modules/theme.js +++ b/_javascript/modules/theme.js @@ -39,7 +39,10 @@ class Theme { } static get #mode() { - return sessionStorage.getItem(this.#modeKey); + return ( + sessionStorage.getItem(this.#modeKey) || + document.documentElement.getAttribute(this.#modeAttr) + ); } static get #isDarkMode() { From c62644759cb4e0e07f7ee6eb9503ef69be62371b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= Date: Thu, 24 Apr 2025 14:23:43 +0200 Subject: [PATCH 12/20] fix(ui): fix incomplete border color on hover for tags (#2359) --- _sass/abstracts/_placeholders.scss | 3 +++ _sass/pages/_post.scss | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/_sass/abstracts/_placeholders.scss b/_sass/abstracts/_placeholders.scss index 9a2b8ac80..d8a106046 100644 --- a/_sass/abstracts/_placeholders.scss +++ b/_sass/abstracts/_placeholders.scss @@ -31,7 +31,10 @@ } %tag-hover { + @extend %link-color; + background: var(--tag-hover); + border-color: var(--tag-hover); transition: background 0.35s ease-in-out; } diff --git a/_sass/pages/_post.scss b/_sass/pages/_post.scss index 12a301f5c..2cd3eee33 100644 --- a/_sass/pages/_post.scss +++ b/_sass/pages/_post.scss @@ -143,9 +143,7 @@ header { .post-tag { &:hover { - @extend %link-hover; @extend %tag-hover; - @extend %no-bottom-border; } } } From b48ea68bf7b98a093b8d7d513a1cc1f7729effc4 Mon Sep 17 00:00:00 2001 From: iSpeakNerd <96841384+iSpeakNerd@users.noreply.github.com> Date: Thu, 24 Apr 2025 05:25:46 -0700 Subject: [PATCH 13/20] chore: update `linkedin` sharing url (#2307) --- _data/share.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/share.yml b/_data/share.yml index 6f9756804..edbc02b26 100644 --- a/_data/share.yml +++ b/_data/share.yml @@ -18,7 +18,7 @@ platforms: # # - type: Linkedin # icon: "fab fa-linkedin" - # link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" + # link: "https://www.linkedin.com/feed/?shareActive=true&shareUrl=URL" # # - type: Weibo # icon: "fab fa-weibo" From 23d953c313b2ece9f2977266b2cce5ede66d12c2 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 3 May 2025 16:14:50 +0800 Subject: [PATCH 14/20] chore(deps): remove plugin `jekyll-redirect-from` Discussed in #2313 --- assets/404.html | 7 +------ jekyll-theme-chirpy.gemspec | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/404.html b/assets/404.html index af89d6d1a..cb129c06a 100644 --- a/assets/404.html +++ b/assets/404.html @@ -2,13 +2,8 @@ layout: page title: "404: Page not found" permalink: /404.html - -redirect_from: - - /norobots/ - - /assets/ - - /posts/ --- {% include lang.html %} -

{{ site.data.locales[lang].not_found.statement }}

+

{{ site.data.locales[lang].not_found.statement }}

\ No newline at end of file diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index e3ad5d675..969e4d089 100644 --- a/jekyll-theme-chirpy.gemspec +++ b/jekyll-theme-chirpy.gemspec @@ -27,7 +27,6 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "jekyll", "~> 4.3" spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" - spec.add_runtime_dependency "jekyll-redirect-from", "~> 0.16" spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.8" spec.add_runtime_dependency "jekyll-archives", "~> 2.2" spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4" From 9f38a2deadc4668ab9452360b70883b6aedeb0f6 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 3 May 2025 16:18:52 +0800 Subject: [PATCH 15/20] refactor: move the path of `theme.js` --- _javascript/{modules => }/theme.js | 0 rollup.config.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename _javascript/{modules => }/theme.js (100%) diff --git a/_javascript/modules/theme.js b/_javascript/theme.js similarity index 100% rename from _javascript/modules/theme.js rename to _javascript/theme.js diff --git a/rollup.config.js b/rollup.config.js index 0e8a6c74b..d9322f83a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -80,7 +80,7 @@ export default [ build('page'), build('post'), build('misc'), - build('theme', { src: `${SRC_DEFAULT}/modules`, outputName: 'Theme' }), + build('theme', { outputName: 'Theme' }), build('app', { src: SRC_PWA, jekyll: true }), build('sw', { src: SRC_PWA, jekyll: true }) ]; From 61ae6cced8e9ea412ff6f4c2cc3ba5ec7bc001a5 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 5 May 2025 11:14:07 +0800 Subject: [PATCH 16/20] chore(dev-deps): add eslint config file --- _config.yml | 2 +- eslint.config.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 eslint.config.js diff --git a/_config.yml b/_config.yml index d6f84c578..0a78679d2 100644 --- a/_config.yml +++ b/_config.yml @@ -213,7 +213,7 @@ exclude: - README.md - LICENSE - purgecss.js - - rollup.config.js + - "*.config.js" - "package*.json" jekyll-archives: diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..c8f6d53d4 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,5 @@ +export default [ + { + files: ['_javascript/**/*.js'] + } +]; From ada38aad969efdbe311ffcf6e933bf5ef17773f8 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 5 May 2025 11:15:08 +0800 Subject: [PATCH 17/20] chore: avoid auto-formatting liquid and sass mixed code --- assets/css/jekyll-theme-chirpy.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/css/jekyll-theme-chirpy.scss b/assets/css/jekyll-theme-chirpy.scss index 7ff89bf7f..ff1f01c0a 100644 --- a/assets/css/jekyll-theme-chirpy.scss +++ b/assets/css/jekyll-theme-chirpy.scss @@ -1,6 +1,7 @@ --- --- +/* prettier-ignore */ @use 'main {%- if jekyll.environment == 'production' -%} .bundle From 401e2af0f8a173d8437e03027c7aff558e8c0bde Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 5 May 2025 11:55:48 +0800 Subject: [PATCH 18/20] fix: avoid `mathjax` loading failure on page refresh (#2389) --- _includes/js-selector.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/js-selector.html b/_includes/js-selector.html index fd4acca8a..5a80532f8 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -66,7 +66,7 @@ {% if page.math %} - + {% endif %} From d0f8f9553e41536eb84ae2fdd3f3bc9d13f7ef8c Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 11 May 2025 22:19:18 +0800 Subject: [PATCH 19/20] fix: improve accuracy of moving `img` element classes (#2399) --- _includes/refactor-content.html | 44 ++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index 8d298cde6..4586f5c47 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -88,9 +88,41 @@ {% endfor %} + {% assign _wrapper_class = '' %} + {% if _class %} - {% capture _old_class %}class="{{ _class }}"{% endcapture %} - {% assign _left = _left | remove: _old_class %} + {% assign _remain = _class %} + {% assign _class_array = _class | split: ' ' %} + + {% for c in _class_array %} + {% assign _pick = false %} + + {% case c %} + {% when 'preview-img', 'normal', 'left', 'right', 'light', 'dark' %} + {% assign _pick = true %} + {% else %} + {% if c contains '-' %} + {% assign start = c | split: '-' | first %} + {% if start == 'w' %} + {% assign _pick = true %} + {% endif %} + {% endif %} + {% endcase %} + + {% if _pick %} + {% assign _remain = _remain | remove: c | strip %} + {% assign _wrapper_class = _wrapper_class | append: ' ' | append: c %} + {% endif %} + {% endfor %} + + {% unless _wrapper_class == '' %} + {% capture _old_class %}class="{{ _class }}"{% endcapture %} + {% assign _left = _left | remove: _old_class %} + {% unless _remain == '' %} + {% capture _new_class %}class="{{ _remain }}"{% endcapture %} + {% assign _left = _left | append: _new_class %} + {% endunless %} + {% endunless %} {% endif %} {% assign _final_src = null %} @@ -110,7 +142,7 @@ {% if _lqip %} {% assign _lazyload = false %} - {% assign _class = _class | append: ' blur' %} + {% assign _wrapper_class = _wrapper_class | append: ' blur' %} {% unless _lqip contains 'data:' %} {% assign _lqip_alt = 'lqip="' | append: _path_prefix %} @@ -121,7 +153,7 @@ {% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %} {% else %} - {% assign _class = _class | append: ' shimmer' %} + {% assign _wrapper_class = _wrapper_class | append: ' shimmer' %} {% endif %} @@ -153,8 +185,8 @@ {% assign _wrapper_start = _final_src | default: _src | prepend: '' %} From 519e4f193a1e7163827e2b4b63a65a31c14064f7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 18 May 2025 21:14:56 +0800 Subject: [PATCH 20/20] chore: upgrade dependencies to the latest version (#2409) --- _includes/head.html | 2 +- assets/lib | 2 +- package.json | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 4514666a5..e24384d5b 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -70,7 +70,7 @@ {% unless jekyll.environment == 'production' %} - + {% endunless %} diff --git a/assets/lib b/assets/lib index b9e18a151..02f4ada65 160000 --- a/assets/lib +++ b/assets/lib @@ -1 +1 @@ -Subproject commit b9e18a1510e3be5de250ed34205da318b76474e0 +Subproject commit 02f4ada65dc75197654c3265a37a6f5fbc39f17c diff --git a/package.json b/package.json index 3fc089c2e..8e2232c01 100644 --- a/package.json +++ b/package.json @@ -25,29 +25,29 @@ }, "dependencies": { "@popperjs/core": "^2.11.8", - "bootstrap": "^5.3.3" + "bootstrap": "^5.3.6" }, "devDependencies": { - "@babel/core": "^7.26.0", - "@babel/plugin-transform-class-properties": "^7.25.9", - "@babel/plugin-transform-private-methods": "^7.25.9", - "@babel/preset-env": "^7.26.0", - "@commitlint/cli": "^19.6.0", - "@commitlint/config-conventional": "^19.6.0", + "@babel/core": "^7.27.1", + "@babel/plugin-transform-class-properties": "^7.27.1", + "@babel/plugin-transform-private-methods": "^7.27.1", + "@babel/preset-env": "^7.27.2", + "@commitlint/cli": "^19.8.1", + "@commitlint/config-conventional": "^19.8.1", "@rollup/plugin-babel": "^6.0.4", - "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-terser": "^0.4.4", "@semantic-release/changelog": "^6.0.3", - "@semantic-release/exec": "^6.0.3", + "@semantic-release/exec": "^7.1.0", "@semantic-release/git": "^10.0.1", - "concurrently": "^9.1.0", + "concurrently": "^9.1.2", "conventional-changelog-conventionalcommits": "^8.0.0", "husky": "^9.1.7", "purgecss": "^7.0.2", - "rollup": "^4.27.4", - "semantic-release": "^24.2.0", - "stylelint": "^16.10.0", - "stylelint-config-standard-scss": "^13.1.0" + "rollup": "^4.41.0", + "semantic-release": "^24.2.4", + "stylelint": "^16.19.1", + "stylelint-config-standard-scss": "^15.0.1" }, "prettier": { "trailingComma": "none"