Skip to content

Commit f23c207

Browse files
committed
2 parents 1e7ae1c + 65f960c commit f23c207

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1396
-734
lines changed

.github/workflows/cd.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: CD
22

33
on:
44
push:
5-
branches:
6-
- production
7-
tags-ignore:
8-
- "**"
5+
branches: [production]
6+
tags-ignore: ["**"]
97

108
jobs:
119
release:
10+
if: ${{ ! startsWith(github.event.head_commit.message, 'chore(release)') }}
1211
permissions:
1312
contents: write
1413
issues: write
@@ -24,7 +23,7 @@ jobs:
2423

2524
- uses: actions/setup-node@v4
2625
with:
27-
node-version: latest
26+
node-version: lts/*
2827

2928
- run: npm install
3029
- run: npx semantic-release

.github/workflows/ci.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
name: "CI"
1+
name: CI
2+
23
on:
34
push:
45
branches:
5-
- "master"
6-
- "hotfix/**"
6+
- master
7+
- "hotfix/*"
78
paths-ignore:
89
- ".github/**"
910
- "!.github/workflows/ci.yml"
10-
- ".gitignore"
11+
- .gitignore
1112
- "docs/**"
12-
- "README.md"
13-
- "LICENSE"
13+
- README.md
14+
- LICENSE
1415
pull_request:
16+
paths-ignore:
17+
- ".github/**"
18+
- "!.github/workflows/ci.yml"
19+
- .gitignore
20+
- "docs/**"
21+
- README.md
22+
- LICENSE
1523

1624
jobs:
1725
build:
@@ -36,7 +44,7 @@ jobs:
3644
- name: Setup Node
3745
uses: actions/setup-node@v4
3846
with:
39-
node-version: latest
47+
node-version: lts/*
4048

4149
- name: Build Assets
4250
run: npm i && npm run build

.github/workflows/pr-filter.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PR Filter
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
check-template:
9+
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
- name: Check PR Content
19+
id: intercept
20+
uses: actions/github-script@v7
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
script: |
24+
const script = require('.github/workflows/scripts/pr-filter.js');
25+
await script({ github, context, core });

.github/workflows/publish.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
required: true
1111
BUILDER:
1212
required: true
13+
workflow_dispatch:
1314

1415
jobs:
1516
launch:
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
function hasTypes(markdown) {
2+
return /## Type of change/.test(markdown) && /-\s\[x\]/i.test(markdown);
3+
}
4+
5+
function hasDescription(markdown) {
6+
return (
7+
/## Description/.test(markdown) &&
8+
!/## Description\s*\n\s*(##|\s*$)/.test(markdown)
9+
);
10+
}
11+
12+
module.exports = async ({ github, context, core }) => {
13+
const pr = context.payload.pull_request;
14+
const body = pr.body === null ? '' : pr.body;
15+
const markdown = body.replace(/<!--[\s\S]*?-->/g, '');
16+
const action = context.payload.action;
17+
18+
const isValid =
19+
markdown !== '' && hasTypes(markdown) && hasDescription(markdown);
20+
21+
if (!isValid) {
22+
await github.rest.pulls.update({
23+
...context.repo,
24+
pull_number: pr.number,
25+
state: 'closed'
26+
});
27+
28+
await github.rest.issues.createComment({
29+
...context.repo,
30+
issue_number: pr.number,
31+
body: `Oops, it seems you've ${action} an invalid pull request. No worries, we'll close it for you.`
32+
});
33+
34+
core.setFailed('PR content does not meet template requirements.');
35+
}
36+
};

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
pull-requests: write
1010

1111
env:
12-
STALE_LABEL: stale
12+
STALE_LABEL: inactive
1313
EXEMPT_LABELS: "pending,planning,in progress"
1414
MESSAGE: >
1515
This conversation has been automatically marked as stale because it has not had recent activity.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Gemfile.lock
1717
.jekyll-cache
1818
.jekyll-metadata
1919
_site
20-
_app
2120

2221
# RubyGems
2322
*.gem
@@ -31,3 +30,4 @@ package-lock.json
3130
.vscode/*
3231
!.vscode/settings.json
3332
!.vscode/extensions.json
33+
!.vscode/tasks.json

.vscode/settings.json

+5-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Prettier
33
"editor.defaultFormatter": "esbenp.prettier-vscode",
44
"editor.formatOnSave": true,
5-
"prettier.trailingComma": "none",
65
// Shopify Liquid
76
"files.associations": {
87
"*.html": "jekyll"
@@ -22,14 +21,10 @@
2221
"scss.validate": false,
2322
"less.validate": false,
2423
// Stylint extension settings
25-
"stylelint.snippet": ["css", "less", "postcss", "scss"],
26-
"stylelint.validate": [
27-
"css",
28-
"less",
29-
"postcss",
30-
"scss"
31-
],
32-
"[javascript]": {
33-
"editor.defaultFormatter": "vscode.typescript-language-features"
24+
"stylelint.snippet": ["css", "scss"],
25+
"stylelint.validate": ["css", "scss"],
26+
// Run tasks in macOS
27+
"terminal.integrated.profiles.osx": {
28+
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
3429
}
3530
}

.vscode/tasks.json

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Run Jekyll Server",
6+
"type": "shell",
7+
"command": "./tools/run.sh",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": [],
13+
"detail": "Runs the Jekyll server with live reload."
14+
},
15+
{
16+
"label": "Build Jekyll Site",
17+
"type": "shell",
18+
"command": "./tools/test.sh",
19+
"group": {
20+
"kind": "build"
21+
},
22+
"problemMatcher": [],
23+
"detail": "Build the Jekyll site for production."
24+
},
25+
{
26+
"label": "Build JS (watch)",
27+
"type": "shell",
28+
"command": "npm run watch:js",
29+
"group": {
30+
"kind": "build"
31+
},
32+
"problemMatcher": [],
33+
"detail": "Build JS files in watch mode."
34+
},
35+
{
36+
"label": "Build CSS",
37+
"type": "shell",
38+
"command": "npm run build:css",
39+
"group": {
40+
"kind": "build"
41+
},
42+
"problemMatcher": [],
43+
"detail": "Build CSS files."
44+
},
45+
{
46+
"label": "Build JS & CSS",
47+
"type": "shell",
48+
"command": "npm run build",
49+
"group": {
50+
"kind": "build"
51+
},
52+
"problemMatcher": [],
53+
"detail": "Build JS & CSS for production."
54+
},
55+
{
56+
"label": "Run Jekyll Server + Build JS (watch)",
57+
"dependsOn": ["Run Jekyll Server", "Build JS (watch)"],
58+
"group": {
59+
"kind": "build"
60+
},
61+
"detail": "Runs both the Jekyll server with live reload and build JS files in watch mode."
62+
}
63+
]
64+
}

Gemfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ source "https://rubygems.org"
44

55
gemspec
66

7-
group :test do
8-
gem "html-proofer", "~> 5.0"
7+
gem "html-proofer", "~> 5.0", group: :test
8+
9+
platforms :mingw, :x64_mingw, :mswin, :jruby do
10+
gem "tzinfo", ">= 1", "< 3"
11+
gem "tzinfo-data"
912
end
1013

1114
gem "jekyll-archives", path: ".gems/jekyll-archives"
15+
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44

55
使用之前请先参考原版 Chirpy 的[使用教程](https://chirpy.cotes.page/posts/getting-started/)
66

7-
<<<<<<< HEAD
87
与原版 Chirpy 不同的点在于:
9-
=======
10-
[![Open in Dev Containers](https://img.shields.io/badge/Dev_Containers-Open-deepskyblue?logo=visualstudiocode)][open-container]&nbsp;
11-
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?&logo=RubyGems&logoColor=ghostwhite&label=gem&color=tomato)][gem]&nbsp;
12-
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy)][license]&nbsp;
13-
[![CI](https://img.shields.io/github/actions/workflow/status/cotes2020/jekyll-theme-chirpy/ci.yml?logo=github)][ci]&nbsp;
14-
[![Codacy Badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy]
15-
>>>>>>> 9ca7519239d878258300814a5b201fd5b926a192
168

179
* 在原版支持的评论系统 [Disqus](https://disqus.com/)[Utterances](https://utteranc.es/)[Giscus](https://giscus.app/zh-CN) 外,增加对 [Waline](https://waline.js.org/) 评论系统的支持,参见 `_config.yml` 里的 `comments.waline`
1810
* 使用[知乎式 404 界面](https://404.life/564.html),可以返回首页或者返回上一页。
@@ -39,6 +31,7 @@
3931
````
4032

4133
语言支持情况:
34+
4235
| 已支持的语言 | `run="lang"` 参数 | 后端 |
4336
| :----------: | :----------------: | :---------------------------------------------: |
4437
| C++ | `run="cpp"` | [Coliru](https://coliru.stacked-crooked.com/) |

_config.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ description: >- # 由 seo meta 和 atom feed 使用
2424
# 例如,'https://username.github.io',注意不要以 '/' 结尾。
2525
url: "https://nihil.cc"
2626

27-
author: Nichts Hsu # 全名
28-
2927
github:
3028
username: NichtsHsu # Github 用户名
3129

@@ -72,6 +70,8 @@ analytics:
7270
domain: # 填入你的 Matomo 域名
7371
cloudflare:
7472
id: # 填入你的 Cloudflare Web Analytics 令牌
73+
fathom:
74+
id: # 填入你的 Fathom Site ID
7575

7676
# 页面浏览量设置
7777
pageviews:
@@ -130,7 +130,7 @@ panel:
130130

131131
comments:
132132
# 帖子评论区全局开关,例如,'disqus'。保持为空表示禁用。
133-
provider:
133+
provider: # [disqus | utterances | giscus]
134134
# provider 选项可以是如下:
135135
# disqus 评论系统 > https://disqus.com/
136136
disqus:
@@ -197,9 +197,6 @@ collections:
197197
tabs:
198198
output: true
199199
sort_by: order
200-
app:
201-
output: true
202-
permalink: /:name
203200

204201
defaults:
205202
- scope:

_data/contact.yml

+8
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@
3030
# - type: bluesky
3131
# icon: "iconfont icon-bluesky"
3232
# url: "" # 填入你的 Bluesky 主页链接
33+
#
34+
# - type: reddit
35+
# icon: "iconfont icon-reddit"
36+
# url: "" # 填入你的 Reddit 主页链接
37+
#
38+
# - type: threads
39+
# icon: "iconfont icon-threads-fill"
40+
# url: "" # 填入你的 Threads 主页链接

_data/locales/ar.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ copyright:
4343
meta: باستخدام :PLATFORM السمة :THEME
4444

4545
not_found:
46-
statment: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.
46+
statement: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.
4747

4848
notification:
4949
update_found: يتوفر اصدار جديد للمحتوى.

_data/locales/bg-BG.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ copyright:
4343
meta: Създадено чрез :PLATFORM и :THEME тема
4444

4545
not_found:
46-
statment: Съжалявам, но на този URL адрес няма налично съдържание.
46+
statement: Съжалявам, но на този URL адрес няма налично съдържание.
4747

4848
notification:
4949
update_found: Налична е нова версия на съдържанието.

_data/locales/cs-CZ.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ copyright:
4343
meta: Použití :PLATFORM s motivem :THEME
4444

4545
not_found:
46-
statment: Omlouváme se, adresu URL jsme špatně umístili nebo odkazuje na něco, co neexistuje.
46+
statement: Omlouváme se, adresu URL jsme špatně umístili nebo odkazuje na něco, co neexistuje.
4747

4848
notification:
4949
update_found: Je k dispozici nová verze obsahu.

_data/locales/de-DE.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ copyright:
4242
meta: Powered by :PLATFORM with :THEME theme
4343

4444
not_found:
45-
statment: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.
45+
statement: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.
4646

4747
notification:
4848
update_found: Eine neue Version ist verfügbar.
@@ -76,7 +76,7 @@ df:
7676
post:
7777
strftime: "%d.%m.%Y"
7878
dayjs: "DD.MM.YYYY"
79-
79+
8080
# categories page
8181
categories:
8282
category_measure:

_data/locales/el-GR.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ copyright:
4343
meta: Αξιοποιώντας την :PLATFORM theme :THEME
4444

4545
not_found:
46-
statment: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει.
46+
statement: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει.
4747

4848
notification:
4949
update_found: Υπάρχει διαθέσιμη μια νέα έκδοση του περιεχομένου.

0 commit comments

Comments
 (0)