diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ee81876..c7b1f5a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,6 +19,10 @@ jobs:
build:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ruby: ["3.0", "3.1", "3.2"]
+
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -28,7 +32,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: 3
+ ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Node
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 769e9c8..c194d8b 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -29,16 +29,16 @@ jobs:
# 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 }}"
# 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 }}"
diff --git a/.github/workflows/pages-deploy.yml.hook b/.github/workflows/pages-deploy.yml.hook
index 87089c9..0d884bc 100644
--- a/.github/workflows/pages-deploy.yml.hook
+++ b/.github/workflows/pages-deploy.yml.hook
@@ -42,7 +42,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: 3
+ ruby-version: 3.2
bundler-cache: true
- name: Build site
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index f54eb5a..7edeb75 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -8,23 +8,25 @@ 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@v8
+ - uses: actions/stale@v9
with:
days-before-stale: 30
days-before-close: 1
- stale-issue-label: stale
- exempt-issue-labels: pending
- stale-issue-message: >
- 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.
- stale-pr-label: stale
- exempt-pr-labels: pending
- stale-pr-message: >
- This PR 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.
+ 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 }}
diff --git a/README.md b/README.md
index 4ee1d6c..16d6ab1 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]
[![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,10 +18,6 @@
## Features
-
- Click to expand/close details
-
-
- Dark / Light Theme Mode
- Localized UI language
- Pinned Posts on Home Page
@@ -41,8 +37,6 @@
- Google Analytics
- SEO & Performance Optimization
-
-
## Documentation
To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki].
@@ -55,22 +49,18 @@ For details, see the "[Contributing Guidelines][contribute-guide]".
## Credits
-This project was built primarily with the [Jekyll][jekyllrb] ecosystem,
-[Bootstrap][bootstrap], [Font Awesome][icons], and some other [wonderful tools][lib].
-The avatar and favicon design from [Clipart Max][image].
+### Contributors
-Many thanks to the [contributors][contributors] who participated in the development
-and to the folks who reported bugs or shared ideas.
+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 License_.
+[![all-contributors](https://contrib.rocks/image?repo=cotes2020/jekyll-theme-chirpy&columns=16)][contributors]
+ —— Made with [contrib.rocks](https://contrib.rocks)
-## Sponsoring
+### Third-Party Assets
-If you like this project or have built something through it, please consider sponsoring it, and your support would be greatly appreciated.
+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/Support_Me_on_Ko--fi-ff5e5b?logo=ko-fi&logoColor=white)][ko-fi]
-[![Wechat Pay](https://img.shields.io/badge/Support_Me_on_WeChat-brightgreen?logo=wechat&logoColor=white)][donation]
-[![Alipay](https://img.shields.io/badge/Support_Me_on_Alipay-blue?logo=alipay&logoColor=white)][donation]
+The avatar and favicon for the project's website are from [ClipartMAX][clipartmax].
## License
@@ -81,14 +71,11 @@ This project is published under [MIT License][license].
[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/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
-[ko-fi]: https://ko-fi.com/coteschung/
-[donation]: https://sponsor.cotes.page/
diff --git a/_config.yml b/_config.yml
index 05044ca..4ab1726 100644
--- a/_config.yml
+++ b/_config.yml
@@ -75,6 +75,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
diff --git a/_data/origin/cors.yml b/_data/origin/cors.yml
index bac2fc5..672df08 100644
--- a/_data/origin/cors.yml
+++ b/_data/origin/cors.yml
@@ -23,17 +23,17 @@ bootstrap:
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.21.3/dist/tocbot.min.css
- js: https://cdn.jsdelivr.net/npm/tocbot@4.21.3/dist/tocbot.min.js
+ 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.4.2/css/all.min.css
+ 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.6.0/dist/mermaid.min.js
+ js: https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js
dayjs:
js:
diff --git a/_includes/embed/bilibili.html b/_includes/embed/bilibili.html
new file mode 100644
index 0000000..eaa09d8
--- /dev/null
+++ b/_includes/embed/bilibili.html
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/_includes/head.html b/_includes/head.html
index fb12d99..3885ef2 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -1,5 +1,3 @@
-
-
@@ -11,29 +9,38 @@
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
>
- {% capture seo_tags %}
+ {%- capture seo_tags -%}
{% seo title=false %}
- {% endcapture %}
+ {%- endcapture -%}
+
+
{% 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 %}
+ {%- endcapture -%}
- {% if site.img_cdn contains '//' %}
-
- {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
- {% else %}
-
- {%- 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, new %}
{% endunless %}
+
+ {% elsif site.social_preview_image %}
+ {%- capture img_url -%}
+ {% include img-url.html src=site.social_preview_image %}
+ {%- endcapture -%}
+
+ {%- capture og_image -%}
+
+ {%- endcapture -%}
+
+ {% assign old_meta_clip = '
- {% 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 %}
-
-
- {% 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 %}
@@ -113,6 +96,12 @@
{% 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 %}
{% assign _src_alt = 'src="' | append: _path_prefix %}
diff --git a/_includes/sidebar.html b/_includes/sidebar.html
index 99d6dcc..b8f92e3 100644
--- a/_includes/sidebar.html
+++ b/_includes/sidebar.html
@@ -3,18 +3,12 @@