Compare commits
19 Commits
9c33bc9406
...
production
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
525c2888c5 | ||
|
|
4950edc75e | ||
|
|
66bf232951 | ||
|
|
37377a43e0 | ||
|
|
7f35d8e550 | ||
|
|
18ab8fcfdf | ||
|
|
078cf86f79 | ||
|
|
45cb428b01 | ||
|
|
3578111ecd | ||
|
|
022b963403 | ||
|
|
aa832c29de | ||
|
|
604528e3ce | ||
|
|
b3d7db3cda | ||
|
|
ee6839516e | ||
|
|
a385ffabff | ||
|
|
f51641b541 | ||
|
|
221ca9f52b | ||
|
|
4d6c788b9c | ||
|
|
cda62e28d1 |
1
.github/FUNDING.yml
vendored
@@ -1,2 +1 @@
|
|||||||
ko_fi: coteschung
|
ko_fi: coteschung
|
||||||
custom: https://sponsor.cotes.page
|
|
||||||
|
|||||||
4
.github/workflows/cd.yml
vendored
@@ -14,14 +14,14 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 3.3
|
ruby-version: 3.3
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/ci.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # for posts's lastmod
|
fetch-depth: 0 # for posts's lastmod
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/codeql.yml
vendored
@@ -24,11 +24,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: "${{ matrix.language }}"
|
languages: "${{ matrix.language }}"
|
||||||
config-file: .github/codeql/codeql-config.yml
|
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).
|
# 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)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
with:
|
with:
|
||||||
category: "/language:${{ matrix.language }}"
|
category: "/language:${{ matrix.language }}"
|
||||||
|
|||||||
2
.github/workflows/commitlint.yml
vendored
@@ -11,5 +11,5 @@ jobs:
|
|||||||
commitlint:
|
commitlint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: wagoid/commitlint-github-action@v6
|
- uses: wagoid/commitlint-github-action@v6
|
||||||
|
|||||||
4
.github/workflows/lint-js.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
|||||||
lint-js:
|
lint-js:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/lint-scss.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
|||||||
lint-scss:
|
lint-scss:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/pr-filter.yml
vendored
@@ -13,11 +13,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Check PR Content
|
- name: Check PR Content
|
||||||
id: intercept
|
id: intercept
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
2
.github/workflows/stale.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v10
|
||||||
with:
|
with:
|
||||||
# 60 days before marking issues/PRs stale
|
# 60 days before marking issues/PRs stale
|
||||||
days-before-close: -1 # does not close automatically
|
days-before-close: -1 # does not close automatically
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ theme: jekyll-theme-chirpy
|
|||||||
# otherwise, the layout language will use the default value of 'en'.
|
# otherwise, the layout language will use the default value of 'en'.
|
||||||
lang: 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
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
|
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
|
||||||
|
|||||||
@@ -20,24 +20,24 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato:wght@300;400&family=Sour
|
|||||||
# Libraries
|
# Libraries
|
||||||
|
|
||||||
toc:
|
toc:
|
||||||
css: https://cdn.jsdelivr.net/npm/tocbot@4.32.2/dist/tocbot.min.css
|
css: https://cdn.jsdelivr.net/npm/tocbot@4.36.4/dist/tocbot.min.css
|
||||||
js: https://cdn.jsdelivr.net/npm/tocbot@4.32.2/dist/tocbot.min.js
|
js: https://cdn.jsdelivr.net/npm/tocbot@4.36.4/dist/tocbot.min.js
|
||||||
|
|
||||||
fontawesome:
|
fontawesome:
|
||||||
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.7.1/css/all.min.css
|
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7.1.0/css/all.min.css
|
||||||
|
|
||||||
search:
|
search:
|
||||||
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
|
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
|
||||||
|
|
||||||
mermaid:
|
mermaid:
|
||||||
js: https://cdn.jsdelivr.net/npm/mermaid@11.4.0/dist/mermaid.min.js
|
js: https://cdn.jsdelivr.net/npm/mermaid@11.12.0/dist/mermaid.min.js
|
||||||
|
|
||||||
dayjs:
|
dayjs:
|
||||||
js:
|
js:
|
||||||
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/dayjs.min.js
|
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.18/dayjs.min.js
|
||||||
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/locale/:LOCALE.js
|
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.18/locale/:LOCALE.js
|
||||||
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/plugin/relativeTime.js
|
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.18/plugin/relativeTime.js
|
||||||
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.13/plugin/localizedFormat.js
|
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.18/plugin/localizedFormat.js
|
||||||
|
|
||||||
glightbox:
|
glightbox:
|
||||||
css: https://cdn.jsdelivr.net/npm/glightbox@3.3.0/dist/css/glightbox.min.css
|
css: https://cdn.jsdelivr.net/npm/glightbox@3.3.0/dist/css/glightbox.min.css
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<audio class="embed-audio" controls>
|
<audio class="embed-audio file" controls>
|
||||||
{% assign extension = src | split: '.' | last %}
|
{% assign extension = src | split: '.' | last %}
|
||||||
{% assign types = extension | concat: types %}
|
{% assign types = extension | concat: types %}
|
||||||
|
|
||||||
|
|||||||
22
_includes/embed/spotify.html
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{% assign size = 352 %}
|
||||||
|
{% assign theme = '' %}
|
||||||
|
|
||||||
|
{% if include.compact %}
|
||||||
|
{% assign size = 152 %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if include.dark %}
|
||||||
|
{% assign theme = '?theme=0' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<iframe
|
||||||
|
class="embed-audio spotify"
|
||||||
|
src="https://open.spotify.com/embed/track/{{ include.id | append: theme }}"
|
||||||
|
height="{{ size }}"
|
||||||
|
frameBorder="0"
|
||||||
|
allowfullscreen=""
|
||||||
|
allowtransparency="true"
|
||||||
|
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
|
||||||
|
loading="lazy"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
@@ -5,15 +5,10 @@
|
|||||||
|
|
||||||
{% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %}
|
{% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %}
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="{{ favicon_path }}/favicon-96x96.png" sizes="96x96">
|
||||||
|
<link rel="icon" type="image/svg+xml" href="{{ favicon_path }}/favicon.svg">
|
||||||
|
<link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
|
<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">
|
|
||||||
{% if site.pwa.enabled %}
|
{% if site.pwa.enabled %}
|
||||||
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
|
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
|
||||||
{% endif %}
|
{% 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 }}">
|
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
|
||||||
<meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml">
|
|
||||||
<meta name="theme-color" content="#ffffff">
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- Bootstrap -->
|
||||||
{% unless jekyll.environment == 'production' %}
|
{% unless jekyll.environment == 'production' %}
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css">
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
|
|||||||
@@ -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 '<td class="rouge-gutter gl"><pre class="lineno">' -%}
|
|
||||||
{%- assign content = content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">' -%}
|
|
||||||
{%- assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' -%}
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
{{- content | strip_html | newline_to_br | replace: '<br />', ' ' | 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 -}}
|
|
||||||
39
_includes/post-summary.html
Normal file
@@ -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 '<td class="rouge-gutter gl"><pre class="lineno">' -%}
|
||||||
|
{%- assign content = content
|
||||||
|
| replace: '<td class="rouge-gutter gl"><pre class="lineno">',
|
||||||
|
'<!-- <td class="rouge-gutter gl"><pre class="lineno">'
|
||||||
|
-%}
|
||||||
|
{%- assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' -%}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
|
{%- assign content = content
|
||||||
|
| markdownify
|
||||||
|
| strip_html
|
||||||
|
| newline_to_br
|
||||||
|
| replace: '<br />', ' '
|
||||||
|
| strip_newlines
|
||||||
|
| strip
|
||||||
|
-%}
|
||||||
|
|
||||||
|
{%- unless include.full_text -%}
|
||||||
|
{%- assign max_length = include.max_length | default: 200 -%}
|
||||||
|
{%- assign content = content | truncate: max_length -%}
|
||||||
|
{%- endunless -%}
|
||||||
|
|
||||||
|
{{- content -}}
|
||||||
|
{%- endif -%}
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
|
|
||||||
{% if page.layout == 'home' %}
|
{% if page.layout == 'home' %}
|
||||||
<!-- create the image wrapper -->
|
<!-- create the image wrapper -->
|
||||||
{% assign _wrapper_start = '<div class="preview-img ' | append: _class | append: '">' %}
|
{% assign _wrapper_start = '<div class="preview-img ' | append: _wrapper_class | append: '">' %}
|
||||||
|
|
||||||
{% assign _img_content = _img_content | append: _wrapper_start %}
|
{% assign _img_content = _img_content | append: _wrapper_start %}
|
||||||
{% assign _right = _right | prepend: '></div' %}
|
{% assign _right = _right | prepend: '></div' %}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
{% include datetime.html date=post.date lang=include.lang %}
|
{% include datetime.html date=post.date lang=include.lang %}
|
||||||
<h4 class="pt-0 my-2">{{ post.title }}</h4>
|
<h4 class="pt-0 my-2">{{ post.title }}</h4>
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
<p>{% include post-description.html %}</p>
|
<p>{% include post-summary.html %}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ layout: compress
|
|||||||
|
|
||||||
<div class="row flex-grow-1">
|
<div class="row flex-grow-1">
|
||||||
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||||
{% if layout.refactor or layout.layout == 'default' %}
|
{% if layout.layout == 'default' %}
|
||||||
{% include refactor-content.html content=content lang=lang %}
|
{% include refactor-content.html content=content lang=lang %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
refactor: true
|
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
{% include lang.html %}
|
||||||
@@ -55,19 +54,39 @@ refactor: true
|
|||||||
|
|
||||||
{% if post.image %}
|
{% if post.image %}
|
||||||
{% assign src = post.image.path | default: post.image %}
|
{% assign src = post.image.path | default: post.image %}
|
||||||
{% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %}
|
|
||||||
|
{% if post.media_subpath %}
|
||||||
|
{% unless src contains '://' %}
|
||||||
|
{% assign src = post.media_subpath
|
||||||
|
| append: '/'
|
||||||
|
| append: src
|
||||||
|
| replace: '///', '/'
|
||||||
|
| replace: '//', '/'
|
||||||
|
%}
|
||||||
|
{% endunless %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if post.image.lqip %}
|
||||||
|
{% assign lqip = post.image.lqip %}
|
||||||
|
|
||||||
|
{% if post.media_subpath %}
|
||||||
|
{% unless lqip contains 'data:' %}
|
||||||
|
{% assign lqip = post.media_subpath
|
||||||
|
| append: '/'
|
||||||
|
| append: lqip
|
||||||
|
| replace: '///', '/'
|
||||||
|
| replace: '//', '/'
|
||||||
|
%}
|
||||||
|
{% endunless %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign lqip_attr = 'lqip="' | append: lqip | append: '"' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
||||||
|
|
||||||
{% assign lqip = null %}
|
|
||||||
|
|
||||||
{% if post.image.lqip %}
|
|
||||||
{% capture lqip_url %}{% include media-url.html src=post.image.lqip subpath=post.media_subpath %}{% endcapture %}
|
|
||||||
{% assign lqip = 'lqip="' | append: lqip_url | append: '"' %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
|
<img src="{{ src }}" alt="{{ alt }}" {{ lqip_attr }}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% assign card_body_col = '7' %}
|
{% assign card_body_col = '7' %}
|
||||||
@@ -78,7 +97,7 @@ refactor: true
|
|||||||
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
|
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
|
||||||
|
|
||||||
<div class="card-text content mt-0 mb-3">
|
<div class="card-text content mt-0 mb-3">
|
||||||
<p>{% include post-description.html %}</p>
|
<p>{% include post-summary.html %}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post-meta flex-grow-1 d-flex align-items-end">
|
<div class="post-meta flex-grow-1 d-flex align-items-end">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
refactor: true
|
|
||||||
panel_includes:
|
panel_includes:
|
||||||
- toc
|
- toc
|
||||||
tail_includes:
|
tail_includes:
|
||||||
|
|||||||
@@ -256,11 +256,9 @@ For normal images:
|
|||||||
```
|
```
|
||||||
{: .nolineno }
|
{: .nolineno }
|
||||||
|
|
||||||
### Video
|
### Social Media Platforms
|
||||||
|
|
||||||
#### Social Media Platform
|
You can embed video/audio from social media platforms with the following syntax:
|
||||||
|
|
||||||
You can embed videos from social media platforms with the following syntax:
|
|
||||||
|
|
||||||
```liquid
|
```liquid
|
||||||
{% include embed/{Platform}.html id='{ID}' %}
|
{% 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.
|
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 |
|
| 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.**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.**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.**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` |
|
||||||
|
|
||||||
#### Video Files
|
Spotify supports some additional parameters:
|
||||||
|
|
||||||
|
- `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
|
||||||
|
|
||||||
If you want to embed a video file directly, use the following syntax:
|
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:
|
If you want to embed an audio file directly, use the following syntax:
|
||||||
|
|
||||||
|
|||||||
@@ -10,25 +10,26 @@ The [favicons](https://www.favicon-generator.org/about/) of [**Chirpy**](https:/
|
|||||||
|
|
||||||
## Generate the favicon
|
## Generate the favicon
|
||||||
|
|
||||||
Prepare a square image (PNG, JPG, or SVG) with a size of 512x512 or more, and then go to the online tool [**Real Favicon Generator**](https://realfavicongenerator.net/) and click the button <kbd>Select your Favicon image</kbd> to upload your image file.
|
Prepare a square image (PNG, JPG, or SVG) with a size of 512x512 or more, and then go to the online tool [**Real Favicon Generator**](https://realfavicongenerator.net/) and click the button <kbd>Pick your favicon image</kbd> to upload your image file.
|
||||||
|
|
||||||
In the next step, the webpage will show all usage scenarios. You can keep the default options, scroll to the bottom of the page, and click the button <kbd>Generate your Favicons and HTML code</kbd> to generate the favicon.
|
In the next step, the webpage will show all usage scenarios. You can keep the default options, scroll to the bottom of the page, and click the button <kbd>Next →</kbd> to generate the favicon.
|
||||||
|
|
||||||
## Download & Replace
|
## Download & Replace
|
||||||
|
|
||||||
Download the generated package, unzip and delete the following two from the extracted files:
|
Download the generated package, unzip and delete the following file(s) from the extracted files:
|
||||||
|
|
||||||
- `browserconfig.xml`{: .filepath}
|
|
||||||
- `site.webmanifest`{: .filepath}
|
- `site.webmanifest`{: .filepath}
|
||||||
|
|
||||||
And then copy the remaining image files (`.PNG`{: .filepath} and `.ICO`{: .filepath}) to cover the original files in the directory `assets/img/favicons/`{: .filepath} of your Jekyll site. If your Jekyll site doesn't have this directory yet, just create one.
|
And then copy the remaining image files (`.PNG`{: .filepath}, `.ICO`{: .filepath} and `.SVG`{: .filepath}) to cover the original files in the directory `assets/img/favicons/`{: .filepath} of your Jekyll site. If your Jekyll site doesn't have this directory yet, just create one.
|
||||||
|
|
||||||
The following table will help you understand the changes to the favicon files:
|
The following table will help you understand the changes to the favicon files:
|
||||||
|
|
||||||
| File(s) | From Online Tool | From Chirpy |
|
| File(s) | From Online Tool | From Chirpy |
|
||||||
|---------------------|:---------------------------------:|:-----------:|
|
| ------- | :--------------: | :---------: |
|
||||||
| `*.PNG` | ✓ | ✗ |
|
| `*.PNG` | ✓ | ✗ |
|
||||||
| `*.ICO` | ✓ | ✗ |
|
| `*.ICO` | ✓ | ✗ |
|
||||||
|
| `*.SVG` | ✓ | ✗ |
|
||||||
|
|
||||||
|
|
||||||
<!-- markdownlint-disable-next-line -->
|
<!-- markdownlint-disable-next-line -->
|
||||||
> ✓ means keep, ✗ means delete.
|
> ✓ means keep, ✗ means delete.
|
||||||
|
|||||||
@@ -314,7 +314,14 @@ main {
|
|||||||
|
|
||||||
.embed-audio {
|
.embed-audio {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
|
||||||
|
&.file {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.spotify {
|
||||||
|
border-radius: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
@extend %img-caption;
|
@extend %img-caption;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
font-size: v.$code-font-size;
|
font-size: v.$code-font-size;
|
||||||
line-height: 1.4rem;
|
line-height: 1.4rem;
|
||||||
word-wrap: normal; /* Fixed Safari overflow-x */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
|||||||
@@ -26,9 +26,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& {
|
font-size: 1rem + (5 - $i) * $size-factor;
|
||||||
font-size: 1rem + (5 - $i) * $size-factor;
|
|
||||||
}
|
|
||||||
} @else {
|
} @else {
|
||||||
font-size: 1.05rem;
|
font-size: 1.05rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,9 +134,6 @@
|
|||||||
.page-link {
|
.page-link {
|
||||||
color: var(--btn-patinator-text-color);
|
color: var(--btn-patinator-text-color);
|
||||||
padding: 0 0.6rem;
|
padding: 0 0.6rem;
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-pack: center;
|
|
||||||
-webkit-box-align: center;
|
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
border: 0;
|
border: 0;
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ permalink: /feed.xml
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<summary>{% include post-description.html max_length=400 %}</summary>
|
<summary>{% include post-summary.html max_length=400 %}</summary>
|
||||||
|
|
||||||
</entry>
|
</entry>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 61 KiB |
BIN
assets/img/favicons/apple-touch-icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 18 KiB |
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
layout: compress
|
|
||||||
---
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<browserconfig>
|
|
||||||
<msapplication>
|
|
||||||
<tile>
|
|
||||||
<square150x150logo src="{{ '/assets/img/favicons/mstile-150x150.png' | relative_url }}" />
|
|
||||||
<TileColor>#da532c</TileColor>
|
|
||||||
</tile>
|
|
||||||
</msapplication>
|
|
||||||
</browserconfig>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
assets/img/favicons/favicon-96x96.png
Executable file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/img/favicons/favicon.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
3
assets/img/favicons/favicon.svg
Executable file
|
After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB |
10
assets/img/favicons/site.webmanifest
Normal file → Executable file
@@ -10,15 +10,17 @@ layout: compress
|
|||||||
"description": "{{ site.description }}",
|
"description": "{{ site.description }}",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "{{ favicon_path }}/android-chrome-192x192.png",
|
"src": "{{ favicon_path }}/web-app-manifest-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ favicon_path }}/android-chrome-512x512.png",
|
"src": "{{ favicon_path }}/web-app-manifest-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png",
|
||||||
}],
|
"purpose": "maskable"
|
||||||
|
}
|
||||||
|
],
|
||||||
"start_url": "{{ '/index.html' | relative_url }}",
|
"start_url": "{{ '/index.html' | relative_url }}",
|
||||||
"theme_color": "#2a1e6b",
|
"theme_color": "#2a1e6b",
|
||||||
"background_color": "#ffffff",
|
"background_color": "#ffffff",
|
||||||
|
|||||||
BIN
assets/img/favicons/web-app-manifest-192x192.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/img/favicons/web-app-manifest-512x512.png
Executable file
|
After Width: | Height: | Size: 68 KiB |
@@ -11,7 +11,8 @@ swcache: true
|
|||||||
"categories": {{ post.categories | join: ', ' | jsonify }},
|
"categories": {{ post.categories | join: ', ' | jsonify }},
|
||||||
"tags": {{ post.tags | join: ', ' | jsonify }},
|
"tags": {{ post.tags | join: ', ' | jsonify }},
|
||||||
"date": {{ post.date | jsonify }},
|
"date": {{ post.date | jsonify }},
|
||||||
"content": {% include post-description.html json=true %}
|
{% capture content -%}{% include post-summary.html full_text=true %}{%- endcapture -%}
|
||||||
|
"content": {{ content | jsonify }}
|
||||||
}{% unless forloop.last %},{% endunless %}
|
}{% unless forloop.last %},{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [7.4.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.4.0...v7.4.1) (2025-10-26)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* avoid duplicate base URL for homepage preview images ([#2568](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2568)) ([66bf232](https://github.com/cotes2020/jekyll-theme-chirpy/commit/66bf232951fbe752821b623dc1e7e4e2824c15bf))
|
||||||
|
|
||||||
|
## [7.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.1...v7.4.0) (2025-10-19)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add support for embed spotify ([#2515](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2515)) ([cda62e2](https://github.com/cotes2020/jekyll-theme-chirpy/commit/cda62e28d1b71ce4018301aacf93532230aa2b3b))
|
||||||
|
* **i18n:** add Danish locale ([#2410](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2410)) ([f5802b8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f5802b8a8a4fb94cd51a484e438f6ba2ba8d62c9))
|
||||||
|
* **i18n:** add locale files for some rtl languages ([#2415](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2415)) ([18c48b4](https://github.com/cotes2020/jekyll-theme-chirpy/commit/18c48b4c49f896eeeeb52a8de1dca715add70c6a))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* avoid unconfigured social options in sidebar ([#2507](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2507)) ([5f8ec7f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5f8ec7ffd3b23998bad48c110e809576fe5daf80))
|
||||||
|
* correct GoatCounter pageviews extraction ([#2420](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2420)) ([c706799](https://github.com/cotes2020/jekyll-theme-chirpy/commit/c706799f9b2e724dee9a3b891dea72dfa587929e))
|
||||||
|
* resolve discrepancy in lqip between post and main page ([#2453](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2453)) ([1bac96a](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1bac96a8e1ae23a7a48f2b7d249bfbfd5d9bfe50))
|
||||||
|
* restore blurry animation for homepage LQIP ([#2551](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2551)) ([221ca9f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/221ca9f52b55b103900832f3c03ad2ecc4415bcc))
|
||||||
|
* **search:** restore full-text search for posts with description ([#2557](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2557)) ([604528e](https://github.com/cotes2020/jekyll-theme-chirpy/commit/604528e3ce11ec0278e83f41105ed5949362bb54))
|
||||||
|
|
||||||
## [7.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.0...v7.3.1) (2025-07-26)
|
## [7.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.0...v7.3.1) (2025-07-26)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ export default defineConfig([
|
|||||||
files: ['_javascript/**/*.js'],
|
files: ['_javascript/**/*.js'],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
globals: {
|
globals: {
|
||||||
|
...globals.serviceworker,
|
||||||
ClipboardJS: 'readonly',
|
ClipboardJS: 'readonly',
|
||||||
GLightbox: 'readonly',
|
GLightbox: 'readonly',
|
||||||
Theme: 'readonly',
|
Theme: 'readonly',
|
||||||
dayjs: 'readonly',
|
dayjs: 'readonly',
|
||||||
mermaid: 'readonly',
|
mermaid: 'readonly',
|
||||||
tocbot: 'readonly',
|
tocbot: 'readonly',
|
||||||
importScripts: 'readonly',
|
|
||||||
swconf: 'readonly'
|
swconf: 'readonly'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "jekyll-theme-chirpy"
|
spec.name = "jekyll-theme-chirpy"
|
||||||
spec.version = "7.3.1"
|
spec.version = "7.4.1"
|
||||||
spec.authors = ["Cotes Chung"]
|
spec.authors = ["Cotes Chung"]
|
||||||
spec.email = ["cotes.chung@gmail.com"]
|
spec.email = ["cotes.chung@gmail.com"]
|
||||||
|
|
||||||
|
|||||||
32
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jekyll-theme-chirpy",
|
"name": "jekyll-theme-chirpy",
|
||||||
"version": "7.3.1",
|
"version": "7.4.1",
|
||||||
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
|
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -27,31 +27,31 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"bootstrap": "^5.3.6"
|
"bootstrap": "^5.3.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.27.1",
|
"@babel/core": "^7.28.4",
|
||||||
"@babel/plugin-transform-class-properties": "^7.27.1",
|
"@babel/plugin-transform-class-properties": "^7.27.1",
|
||||||
"@babel/plugin-transform-private-methods": "^7.27.1",
|
"@babel/plugin-transform-private-methods": "^7.27.1",
|
||||||
"@babel/preset-env": "^7.27.2",
|
"@babel/preset-env": "^7.28.3",
|
||||||
"@commitlint/cli": "^19.8.1",
|
"@commitlint/cli": "^20.1.0",
|
||||||
"@commitlint/config-conventional": "^19.8.1",
|
"@commitlint/config-conventional": "^20.0.0",
|
||||||
"@rollup/plugin-babel": "^6.0.4",
|
"@rollup/plugin-babel": "^6.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/exec": "^7.1.0",
|
"@semantic-release/exec": "^7.1.0",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.2.1",
|
||||||
"conventional-changelog-conventionalcommits": "^8.0.0",
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
||||||
"eslint": "^9.27.0",
|
"eslint": "^9.38.0",
|
||||||
"globals": "^16.1.0",
|
"globals": "^16.4.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"purgecss": "^7.0.2",
|
"purgecss": "^7.0.2",
|
||||||
"rollup": "^4.41.0",
|
"rollup": "^4.52.5",
|
||||||
"semantic-release": "^24.2.4",
|
"semantic-release": "^25.0.1",
|
||||||
"stylelint": "^16.19.1",
|
"stylelint": "^16.25.0",
|
||||||
"stylelint-config-standard-scss": "^15.0.1"
|
"stylelint-config-standard-scss": "^16.0.0"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"trailingComma": "none"
|
"trailingComma": "none"
|
||||||
|
|||||||