hexo-theme-particlex 2.5.6 → 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +273 -252
- package/_config.yml +24 -37
- package/layout/comment.ejs +28 -26
- package/layout/index.ejs +5 -3
- package/package.json +2 -2
- package/source/css/main.css +1 -1
- package/source/images/avatar.jpg +0 -0
- package/source/images/background.jpg +0 -0
package/README.md
CHANGED
@@ -8,15 +8,15 @@
|
|
8
8
|
|
9
9
|
> 目前有 Full、Night 和 Maiden **两个**主题样式
|
10
10
|
|
11
|
-
虽然更改后只有一种了,如果你想改颜色就在 `
|
11
|
+
虽然更改后只有一种了,如果你想改颜色就在 `main.css` 里替换吧
|
12
12
|
|
13
|
-
|
13
|
+
# 1. 演示
|
14
14
|
|
15
15
|
- [GitHub Pages](https://argvchs.github.io)
|
16
16
|
- [Netlify](https://argvchs.netlify.app)
|
17
17
|
- [Vercel](https://argvchs.vercel.app)
|
18
18
|
|
19
|
-
|
19
|
+
# 2. 安装
|
20
20
|
|
21
21
|
```bash
|
22
22
|
cd themes
|
@@ -29,304 +29,325 @@ git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=
|
|
29
29
|
theme: particlex
|
30
30
|
```
|
31
31
|
|
32
|
-
|
32
|
+
## 2.1. 关闭自带代码高亮
|
33
33
|
|
34
|
-
|
34
|
+
Hexo 有自带的代码高亮,但是和 ParticleX 的不兼容
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
```yaml
|
37
|
+
highlight:
|
38
|
+
enable: false
|
39
|
+
prismjs:
|
40
|
+
enable: false
|
41
|
+
```
|
42
42
|
|
43
|
-
|
43
|
+
如果使用 Pandoc 还需要设置一下
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
```yaml
|
46
|
+
pandoc:
|
47
|
+
extra:
|
48
|
+
- no-highlight:
|
49
|
+
```
|
50
50
|
|
51
|
-
|
51
|
+
## 2.2. 禁用年度月度归档
|
52
52
|
|
53
|
-
|
53
|
+
Hexo 会自动生成年度月度归档,可是 ParticleX 主题没有这个功能 ~~我太懒了~~
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
55
|
+
```yaml
|
56
|
+
archive_generator:
|
57
|
+
enabled: true
|
58
|
+
per_page: 0
|
59
|
+
yearly: false
|
60
|
+
monthly: false
|
61
|
+
daily: false
|
62
|
+
```
|
63
63
|
|
64
64
|
修改完请 `hexo cl` 清除缓存
|
65
65
|
|
66
|
-
|
66
|
+
# 3. 配置
|
67
67
|
|
68
|
-
|
69
|
-
avatar:
|
68
|
+
## 3.1. 基本配置
|
70
69
|
|
71
|
-
|
70
|
+
```yaml
|
71
|
+
# Avatar image
|
72
|
+
avatar: /images/avatar.jpg
|
72
73
|
|
74
|
+
# Home page background image
|
73
75
|
background:
|
76
|
+
- /images/background.jpg
|
74
77
|
```
|
75
78
|
|
76
|
-
其中 Background
|
77
|
-
|
78
|
-
- 导航栏
|
79
|
-
|
80
|
-
为了方便,主题使用的图标是 Font Awesome 6 图标
|
81
|
-
|
82
|
-
```yaml
|
83
|
-
menu:
|
84
|
-
Home:
|
85
|
-
name: house
|
86
|
-
theme: solid
|
87
|
-
link: /
|
88
|
-
About:
|
89
|
-
name: id-card
|
90
|
-
theme: solid
|
91
|
-
link: /about
|
92
|
-
Archives:
|
93
|
-
name: box-archive
|
94
|
-
theme: solid
|
95
|
-
link: /archives
|
96
|
-
Categories:
|
97
|
-
name: bookmark
|
98
|
-
theme: solid
|
99
|
-
link: /categories
|
100
|
-
Tags:
|
101
|
-
name: tags
|
102
|
-
theme: solid
|
103
|
-
link: /tags
|
104
|
-
# <name>:
|
105
|
-
# name: <icon-name>
|
106
|
-
# theme: <icon-theme>
|
107
|
-
# link: <link-url>
|
108
|
-
```
|
109
|
-
|
110
|
-
- 主页信息卡片
|
111
|
-
|
112
|
-
和导航栏差不多
|
113
|
-
|
114
|
-
`description` 支持 Markdown 格式
|
115
|
-
|
116
|
-
**如果图标链接或友链为空,请在 `iconLinks:` 或 `friendLinks:` 后添加一个 `{}`**
|
117
|
-
|
118
|
-
```yaml
|
119
|
-
card:
|
120
|
-
enable: true
|
121
|
-
description: |
|
122
|
-
Description
|
123
|
-
...
|
124
|
-
iconLinks:
|
125
|
-
{}
|
126
|
-
# <name>:
|
127
|
-
# name: <icon-name>
|
128
|
-
# theme: <icon-theme>
|
129
|
-
# link: <link-url>
|
130
|
-
friendLinks:
|
131
|
-
{}
|
132
|
-
# <name>: <link-url>
|
133
|
-
```
|
134
|
-
|
135
|
-
- 文档缩略
|
136
|
-
|
137
|
-
一般来说,缩略展示文档只需要在文档中添加 `<!-- more -->` 即可,缩略内容在显示全文中也会出现
|
138
|
-
|
139
|
-
但考虑到不想把缩略内容放在正文里,就添加了此参数,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置
|
140
|
-
|
141
|
-
支持 Markdown 格式
|
142
|
-
|
143
|
-
```yaml
|
144
|
-
description: |
|
145
|
-
Normal _Italic_ **Strong**
|
146
|
-
```
|
79
|
+
其中 Background 是一个列表,打开时会随机加载一个背景
|
147
80
|
|
148
|
-
|
81
|
+
## 3.2. 内容配置
|
149
82
|
|
150
|
-
|
83
|
+
### 3.2.1. 导航栏
|
151
84
|
|
152
|
-
|
85
|
+
为了方便,主题使用的图标是 Font Awesome 6 图标
|
153
86
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
87
|
+
```yaml
|
88
|
+
# ParticleX theme icon is adopts the Font Awesome 6
|
89
|
+
# https://fontawesome.com
|
90
|
+
|
91
|
+
# Main menu navigation
|
92
|
+
menu:
|
93
|
+
Home:
|
94
|
+
name: house
|
95
|
+
theme: solid
|
96
|
+
link: /
|
97
|
+
About:
|
98
|
+
name: id-card
|
99
|
+
theme: solid
|
100
|
+
link: /about
|
101
|
+
Archives:
|
102
|
+
name: box-archive
|
103
|
+
theme: solid
|
104
|
+
link: /archives
|
105
|
+
Categories:
|
106
|
+
name: bookmark
|
107
|
+
theme: solid
|
108
|
+
link: /categories
|
109
|
+
Tags:
|
110
|
+
name: tags
|
111
|
+
theme: solid
|
112
|
+
link: /tags
|
113
|
+
```
|
162
114
|
|
163
|
-
|
115
|
+
### 3.2.2. 主页信息卡片
|
164
116
|
|
165
|
-
|
117
|
+
`description` 支持 Markdown 格式
|
166
118
|
|
167
|
-
|
119
|
+
图标链接配置和导航栏配置相同
|
168
120
|
|
169
|
-
|
170
|
-
polyfill:
|
171
|
-
enable: true
|
172
|
-
features:
|
173
|
-
- default
|
174
|
-
```
|
121
|
+
**如果图标链接或友链为空,请在 `iconLinks:` 或 `friendLinks:` 后添加一个 `{}`**
|
175
122
|
|
176
|
-
|
123
|
+
```yaml
|
124
|
+
# Side info card
|
125
|
+
card:
|
126
|
+
enable: true
|
127
|
+
description: |
|
128
|
+
Description
|
129
|
+
...
|
130
|
+
iconLinks:
|
131
|
+
{}
|
132
|
+
friendLinks:
|
133
|
+
Argvchs: https://argvchs.netlify.app
|
134
|
+
```
|
135
|
+
|
136
|
+
### 3.2.3. 页脚
|
177
137
|
|
178
|
-
|
138
|
+
考虑到博客部署在服务器并使用自己域名的情况,按规定需要在网站下边添加备案消息
|
179
139
|
|
180
|
-
|
140
|
+
如没有需要显示备案消息的可以关闭
|
181
141
|
|
182
|
-
|
183
|
-
|
142
|
+
```yaml
|
143
|
+
# Footer info
|
144
|
+
footer:
|
145
|
+
since: 2022
|
146
|
+
# Customize the server domain name ICP
|
147
|
+
ICP:
|
184
148
|
enable: false
|
185
|
-
|
186
|
-
|
149
|
+
code:
|
150
|
+
link:
|
151
|
+
```
|
187
152
|
|
188
|
-
|
153
|
+
## 3.3. 功能配置
|
189
154
|
|
190
|
-
|
155
|
+
### 3.3.1. Polyfill
|
191
156
|
|
192
|
-
|
193
|
-
math:
|
194
|
-
enable: false
|
195
|
-
```
|
157
|
+
使用 [Polyfill.io](https://polyfill.io) 自动根据 UA 处理新的 JS API 兼容
|
196
158
|
|
197
|
-
-
|
159
|
+
可以配合 [Hexo-Babel](https://github.com/argvchs/hexo-babel) 插件处理 JS 语法兼容
|
198
160
|
|
199
|
-
|
161
|
+
```yaml
|
162
|
+
# Polyfill
|
163
|
+
# https://polyfill.io
|
164
|
+
polyfill:
|
165
|
+
enable: true
|
166
|
+
features:
|
167
|
+
- default
|
168
|
+
```
|
200
169
|
|
201
|
-
|
202
|
-
preview:
|
203
|
-
enable: true
|
204
|
-
```
|
170
|
+
### 3.3.2. 代码高亮
|
205
171
|
|
206
|
-
|
172
|
+
使用 Highlight.js 代码高亮
|
207
173
|
|
208
|
-
|
174
|
+
样式可以在[这里](https://highlightjs.org/static/demo)选择,默认为 GitHub
|
209
175
|
|
210
|
-
|
176
|
+
```yaml
|
177
|
+
# Highlight.js
|
178
|
+
# https://highlightjs.org
|
179
|
+
highlight:
|
180
|
+
enable: true
|
181
|
+
style: github
|
182
|
+
```
|
211
183
|
|
212
|
-
|
184
|
+
### 3.3.3. 数学渲染
|
213
185
|
|
214
|
-
|
215
|
-
crypto:
|
216
|
-
enable: false
|
217
|
-
```
|
186
|
+
使用 KaTeX 渲染数学公式
|
218
187
|
|
219
|
-
|
188
|
+
```yaml
|
189
|
+
# KaTeX math rendering
|
190
|
+
math:
|
191
|
+
enable: false
|
192
|
+
```
|
220
193
|
|
221
|
-
|
194
|
+
### 3.3.4. 图片预览
|
222
195
|
|
223
|
-
|
196
|
+
简单的点击图片放大缩小的预览
|
224
197
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
198
|
+
```yaml
|
199
|
+
# Image preview
|
200
|
+
preview:
|
201
|
+
enable: true
|
202
|
+
```
|
229
203
|
|
230
|
-
|
204
|
+
### 3.3.5. 文章缩略
|
231
205
|
|
232
|
-
|
206
|
+
一般来说,缩略展示文档只需要在文档中添加 `<!-- more -->` 即可,缩略内容在显示全文中也会出现
|
233
207
|
|
234
|
-
|
208
|
+
但考虑到不想把缩略内容放在正文里,就添加了此参数,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置
|
235
209
|
|
236
|
-
|
210
|
+
支持 Markdown 格式
|
237
211
|
|
238
|
-
|
212
|
+
```yaml
|
213
|
+
description: |
|
214
|
+
Normal _Italic_ **Strong**
|
215
|
+
```
|
239
216
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
217
|
+
### 3.3.6. 文章置顶
|
218
|
+
|
219
|
+
在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `pinned` 作为置顶参数,越大越靠前,默认为 0
|
220
|
+
|
221
|
+
### 3.3.7. 文章加密
|
222
|
+
|
223
|
+
使用 AES 加密算法,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `secret` 作为密码,**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/argvchs/hexo-helper-crypto)**
|
224
|
+
|
225
|
+
```yaml
|
226
|
+
# Article encryption
|
227
|
+
crypto:
|
228
|
+
enable: false
|
229
|
+
```
|
230
|
+
|
231
|
+
### 3.3.8. 搜索
|
232
|
+
|
233
|
+
嵌入到 Archives 中的搜索
|
234
|
+
|
235
|
+
目前只支持搜索文档标题
|
236
|
+
|
237
|
+
```yaml
|
238
|
+
# Search
|
239
|
+
search:
|
240
|
+
enable: false
|
241
|
+
```
|
242
|
+
|
243
|
+
## 3.4. 评论配置
|
244
|
+
|
245
|
+
### 3.4.1. Giscus
|
246
|
+
|
247
|
+
Giscus 是一个由 GitHub Discussions 支持的评论系统
|
248
|
+
|
249
|
+
在 [Giscus.app](https://giscus.app) 设置好各项后,会在下面生成一个 `<script>` 标签,在主题内填入即可
|
250
|
+
|
251
|
+
```yaml
|
252
|
+
# Giscus
|
253
|
+
# https://github.com/giscus/giscus
|
254
|
+
giscus:
|
255
|
+
enable: false
|
256
|
+
src: https://giscus.app/client.js
|
257
|
+
repo:
|
258
|
+
repoID:
|
259
|
+
category:
|
260
|
+
categoryID:
|
261
|
+
mapping: pathname
|
262
|
+
strict: 0
|
263
|
+
reactionsEnabled: 1
|
264
|
+
emitMetadata: 0
|
265
|
+
inputPosition: bottom
|
266
|
+
theme: preferred_color_scheme
|
267
|
+
lang: zh-CN
|
268
|
+
```
|
269
|
+
|
270
|
+
### 3.4.2. Gitalk
|
271
|
+
|
272
|
+
Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统
|
273
|
+
|
274
|
+
考虑到博客可能部署到多个网站同步评论,但 OAuth APP 只能有一个回调 URL,所以添加了 `sites` 参数用于多个网站的评论
|
275
|
+
|
276
|
+
**同样如果没有其他网站,请在 `sites:` 后添加一个 `{}`**
|
277
|
+
|
278
|
+
由于 Gitalk 官方 CORS 代理用的是 Cloudflare,速度过慢,添加了 `proxy` 参数,搭建 CORS 代理可以看[这篇文章](https://argvchs.netlify.app/2022/07/04/build-cors-anywhere)
|
279
|
+
|
280
|
+
```yaml
|
281
|
+
# Gitalk
|
282
|
+
# https://github.com/gitalk/gitalk
|
283
|
+
gitalk:
|
284
|
+
enable: false
|
285
|
+
clientID: # Default ClientID
|
286
|
+
clientSecret: # Default ClientSecret
|
287
|
+
repo: # The name of repository of store comments
|
288
|
+
owner: # GitHub repo owner
|
289
|
+
admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
|
290
|
+
language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
|
291
|
+
proxy: # CORS proxy
|
292
|
+
sites: # Sites
|
293
|
+
{}
|
294
|
+
# www.example.com:
|
295
|
+
# clientID:
|
296
|
+
# clientSecret:
|
297
|
+
```
|
298
|
+
|
299
|
+
### 3.4.3. Waline
|
300
|
+
|
301
|
+
Waline 是一个简单、安全的评论系统
|
302
|
+
|
303
|
+
详见:[在 ParticleX 上使用 Waline | Yuzi's Blog](https://blog.yuzi.dev/posts/bcb4ff00.html)
|
304
|
+
|
305
|
+
**注意如果不需要 `locale` 参数,请在 `locale:` 后添加一个 `{}`**
|
306
|
+
|
307
|
+
```yaml
|
308
|
+
# Waline
|
309
|
+
# https://github.com/walinejs/waline
|
310
|
+
waline:
|
311
|
+
enable: false
|
312
|
+
serverURL: # Waline server address url, you should set this to your own link
|
313
|
+
locale: # Locale: https://waline.js.org/guide/client/i18n.html#locale-option
|
314
|
+
{}
|
315
|
+
commentCount: true # If false, comment count will only be displayed in post page, not in home page
|
316
|
+
pageview: false # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`
|
317
|
+
emoji: # Custom emoji
|
318
|
+
- https://unpkg.com/@waline/emojis@1.2.0/weibo
|
319
|
+
- https://unpkg.com/@waline/emojis@1.2.0/alus
|
320
|
+
- https://unpkg.com/@waline/emojis@1.2.0/bilibili
|
321
|
+
- https://unpkg.com/@waline/emojis@1.2.0/qq
|
322
|
+
- https://unpkg.com/@waline/emojis@1.2.0/tieba
|
323
|
+
- https://unpkg.com/@waline/emojis@1.2.0/tw-emoji
|
324
|
+
meta: # Comment information, valid meta are nick, mail and link
|
325
|
+
- nick
|
326
|
+
- mail
|
327
|
+
- link
|
328
|
+
requiredMeta: # Set required meta field, e.g.: [nick] | [nick, mail]
|
329
|
+
- nick
|
330
|
+
lang: zh-CN # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP
|
331
|
+
wordLimit: 0 # Word limit, no limit when setting to 0
|
332
|
+
login: enable # Whether enable login, can choose from 'enable', 'disable' and 'force'
|
333
|
+
pageSize: 10 # Comment per page
|
334
|
+
```
|
335
|
+
|
336
|
+
### 3.4.4. Twikoo
|
337
|
+
|
338
|
+
Twikoo 是一个一个简洁、安全、免费的静态网站评论系统
|
339
|
+
|
340
|
+
```yaml
|
341
|
+
# Twikoo
|
342
|
+
# https://github.com/imaegoo/twikoo
|
343
|
+
twikoo:
|
344
|
+
enable: false
|
345
|
+
envID:
|
346
|
+
region:
|
347
|
+
path: location.pathname
|
348
|
+
lang: zh-CN
|
349
|
+
```
|
329
350
|
|
330
|
-
|
351
|
+
# 4. 写在最后
|
331
352
|
|
332
|
-
本项目采用 MIT 开源许可证,欢迎大家贡献,你可以随意打开一个 Issue 来进行提问,有任何改进想法都可以进行 Fork,期待您的 Pull Request
|
353
|
+
本项目采用 MIT 开源许可证,欢迎大家贡献,你可以随意打开一个 Issue 来进行提问,有任何改进想法都可以进行 Fork,期待您的 Pull Request!
|
package/_config.yml
CHANGED
@@ -2,16 +2,14 @@
|
|
2
2
|
# https://github.com/argvchs/hexo-theme-particlex
|
3
3
|
|
4
4
|
# Avatar image
|
5
|
-
avatar:
|
6
|
-
|
7
|
-
# Home page info block
|
8
|
-
headBlockEnable: true
|
5
|
+
avatar: /images/avatar.jpg
|
9
6
|
|
10
7
|
# Home page background image
|
11
8
|
background:
|
9
|
+
- /images/background.jpg
|
12
10
|
|
13
11
|
# ParticleX theme icon is adopts the Font Awesome 6
|
14
|
-
# https://fontawesome.com
|
12
|
+
# https://fontawesome.com
|
15
13
|
|
16
14
|
# Main menu navigation
|
17
15
|
menu:
|
@@ -35,10 +33,6 @@ menu:
|
|
35
33
|
name: tags
|
36
34
|
theme: solid
|
37
35
|
link: /tags
|
38
|
-
# <name>:
|
39
|
-
# name: <icon-name>
|
40
|
-
# theme: <icon-theme>
|
41
|
-
# link: <link-url>
|
42
36
|
|
43
37
|
# Side info card
|
44
38
|
card:
|
@@ -48,13 +42,8 @@ card:
|
|
48
42
|
...
|
49
43
|
iconLinks:
|
50
44
|
{}
|
51
|
-
# <name>:
|
52
|
-
# name: <icon-name>
|
53
|
-
# theme: <icon-theme>
|
54
|
-
# link: <link-url>
|
55
45
|
friendLinks:
|
56
|
-
|
57
|
-
# <name>: <link-url>
|
46
|
+
Argvchs: https://argvchs.netlify.app
|
58
47
|
|
59
48
|
# Footer info
|
60
49
|
footer:
|
@@ -66,7 +55,7 @@ footer:
|
|
66
55
|
link:
|
67
56
|
|
68
57
|
# Polyfill
|
69
|
-
# https://polyfill.io
|
58
|
+
# https://polyfill.io
|
70
59
|
polyfill:
|
71
60
|
enable: true
|
72
61
|
features:
|
@@ -78,11 +67,11 @@ highlight:
|
|
78
67
|
enable: true
|
79
68
|
style: github
|
80
69
|
|
81
|
-
#
|
70
|
+
# KaTeX math rendering
|
82
71
|
math:
|
83
72
|
enable: false
|
84
73
|
|
85
|
-
# Image
|
74
|
+
# Image preview
|
86
75
|
preview:
|
87
76
|
enable: true
|
88
77
|
|
@@ -94,23 +83,6 @@ crypto:
|
|
94
83
|
search:
|
95
84
|
enable: false
|
96
85
|
|
97
|
-
# Gitalk
|
98
|
-
# https://github.com/gitalk/gitalk
|
99
|
-
gitalk:
|
100
|
-
enable: false
|
101
|
-
clientID: # Default ClientID
|
102
|
-
clientSecret: # Default ClientSecret
|
103
|
-
repo: # The name of repository of store comments
|
104
|
-
owner: # GitHub repo owner
|
105
|
-
admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
|
106
|
-
language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
|
107
|
-
proxy: # CORS proxy
|
108
|
-
sites: # Sites
|
109
|
-
{}
|
110
|
-
# <www.example.com>:
|
111
|
-
# clientID: <client-id>
|
112
|
-
# clientSecret: <client-secret>
|
113
|
-
|
114
86
|
# Giscus
|
115
87
|
# https://github.com/giscus/giscus
|
116
88
|
giscus:
|
@@ -128,6 +100,23 @@ giscus:
|
|
128
100
|
theme: preferred_color_scheme
|
129
101
|
lang: zh-CN
|
130
102
|
|
103
|
+
# Gitalk
|
104
|
+
# https://github.com/gitalk/gitalk
|
105
|
+
gitalk:
|
106
|
+
enable: false
|
107
|
+
clientID: # Default ClientID
|
108
|
+
clientSecret: # Default ClientSecret
|
109
|
+
repo: # The name of repository of store comments
|
110
|
+
owner: # GitHub repo owner
|
111
|
+
admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
|
112
|
+
language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
|
113
|
+
proxy: # CORS proxy
|
114
|
+
sites: # Sites
|
115
|
+
{}
|
116
|
+
# www.example.com:
|
117
|
+
# clientID:
|
118
|
+
# clientSecret:
|
119
|
+
|
131
120
|
# Waline
|
132
121
|
# https://github.com/walinejs/waline
|
133
122
|
waline:
|
@@ -135,8 +124,6 @@ waline:
|
|
135
124
|
serverURL: # Waline server address url, you should set this to your own link
|
136
125
|
locale: # Locale: https://waline.js.org/guide/client/i18n.html#locale-option
|
137
126
|
{}
|
138
|
-
# e.g.:
|
139
|
-
# placeholder: Leave a comment
|
140
127
|
commentCount: true # If false, comment count will only be displayed in post page, not in home page
|
141
128
|
pageview: false # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`
|
142
129
|
emoji: # Custom emoji
|
package/layout/comment.ejs
CHANGED
@@ -1,29 +1,3 @@
|
|
1
|
-
<% if (theme.gitalk.enable) { %>
|
2
|
-
<script>
|
3
|
-
let clientID = "<%- theme.gitalk.clientID %>",
|
4
|
-
clientSecret = "<%- theme.gitalk.clientSecret %>";
|
5
|
-
<% Object.keys(theme.gitalk.sites).forEach(key => { %>
|
6
|
-
if (window.location.host === "<%- key %>") {
|
7
|
-
clientID = "<%- theme.gitalk.sites[key].clientID %>";
|
8
|
-
clientSecret = "<%- theme.gitalk.sites[key].clientSecret %>";
|
9
|
-
}
|
10
|
-
<% }); %>
|
11
|
-
const gitalk = new Gitalk({
|
12
|
-
clientID: clientID,
|
13
|
-
clientSecret: clientSecret,
|
14
|
-
repo: "<%- theme.gitalk.repo %>",
|
15
|
-
owner: "<%- theme.gitalk.owner %>",
|
16
|
-
admin: ["<%- theme.gitalk.admin %>"],
|
17
|
-
language: "<%- theme.gitalk.language %>",
|
18
|
-
id: location.pathname,
|
19
|
-
distractionFreeMode: false,
|
20
|
-
<% if (theme.gitalk.proxy) { %>
|
21
|
-
proxy: "<%- theme.gitalk.proxy %>",
|
22
|
-
<% } %>
|
23
|
-
})
|
24
|
-
gitalk.render("gitalk-container");
|
25
|
-
</script>
|
26
|
-
<% } %>
|
27
1
|
<% if (theme.giscus.enable) { %>
|
28
2
|
<script
|
29
3
|
src="<%- theme.giscus.src %>"
|
@@ -42,6 +16,34 @@
|
|
42
16
|
async
|
43
17
|
></script>
|
44
18
|
<% } %>
|
19
|
+
<% if (theme.gitalk.enable) { %>
|
20
|
+
<script>
|
21
|
+
(function () {
|
22
|
+
let clientID = "<%- theme.gitalk.clientID %>",
|
23
|
+
clientSecret = "<%- theme.gitalk.clientSecret %>";
|
24
|
+
<% Object.keys(theme.gitalk.sites).forEach(key => { %>
|
25
|
+
if (window.location.host === "<%- key %>") {
|
26
|
+
clientID = "<%- theme.gitalk.sites[key].clientID %>";
|
27
|
+
clientSecret = "<%- theme.gitalk.sites[key].clientSecret %>";
|
28
|
+
}
|
29
|
+
<% }); %>
|
30
|
+
const gitalk = new Gitalk({
|
31
|
+
clientID: clientID,
|
32
|
+
clientSecret: clientSecret,
|
33
|
+
repo: "<%- theme.gitalk.repo %>",
|
34
|
+
owner: "<%- theme.gitalk.owner %>",
|
35
|
+
admin: ["<%- theme.gitalk.admin %>"],
|
36
|
+
language: "<%- theme.gitalk.language %>",
|
37
|
+
id: location.pathname,
|
38
|
+
distractionFreeMode: false,
|
39
|
+
<% if (theme.gitalk.proxy) { %>
|
40
|
+
proxy: "<%- theme.gitalk.proxy %>",
|
41
|
+
<% } %>
|
42
|
+
})
|
43
|
+
gitalk.render("gitalk-container");
|
44
|
+
})();
|
45
|
+
</script>
|
46
|
+
<% } %>
|
45
47
|
<% if (theme.waline.enable) { %>
|
46
48
|
<script>
|
47
49
|
Waline.init({
|
package/layout/index.ejs
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
<div id="home-head">
|
2
|
-
<div
|
3
|
-
|
2
|
+
<div
|
3
|
+
id="home-background"
|
4
|
+
ref="homeBackground"
|
5
|
+
data-image="<%- theme.background.map(i => url_for(i)) %>"
|
6
|
+
></div>
|
4
7
|
<div id="home-info" @click="homeClick">
|
5
8
|
<span class="loop"></span>
|
6
9
|
<span class="loop"></span>
|
@@ -14,7 +17,6 @@
|
|
14
17
|
</div>
|
15
18
|
</span>
|
16
19
|
</div>
|
17
|
-
<% } %>
|
18
20
|
</div>
|
19
21
|
<div id="home-posts-wrap" <%- theme.card.enable ? "" : 'class="home-posts-wrap-no-card"' %> ref="homePostsWrap">
|
20
22
|
<div id="home-posts">
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-particlex",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.8",
|
4
4
|
"description": "A concise Hexo theme, based on Particle.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
},
|
22
22
|
"homepage": "https://github.com/argvchs/hexo-theme-particlex#readme",
|
23
23
|
"dependencies": {
|
24
|
-
"hexo-helper-crypto": "^1.1.
|
24
|
+
"hexo-helper-crypto": "^1.1.2",
|
25
25
|
"hexo-renderer-ejs": "^2.0.0"
|
26
26
|
},
|
27
27
|
"scripts": {
|
package/source/css/main.css
CHANGED
Binary file
|
Binary file
|