hexo-theme-particlex 2.5.6 → 2.5.7

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -66,11 +66,14 @@ theme: particlex
66
66
  ## 配置
67
67
 
68
68
  ```yaml
69
- avatar:
69
+ # Avatar image
70
+ avatar: /images/avatar.jpg
70
71
 
72
+ # Home page info block
71
73
  headBlockEnable: true
72
74
 
73
- background:
75
+ # Home page background image
76
+ background: /images/background.jpg
74
77
  ```
75
78
 
76
79
  其中 Background 可以是一个列表,打开时会随机加载一个背景
@@ -80,6 +83,10 @@ background:
80
83
  为了方便,主题使用的图标是 Font Awesome 6 图标
81
84
 
82
85
  ```yaml
86
+ # ParticleX theme icon is adopts the Font Awesome 6
87
+ # https://fontawesome.com
88
+
89
+ # Main menu navigation
83
90
  menu:
84
91
  Home:
85
92
  name: house
@@ -101,21 +108,18 @@ background:
101
108
  name: tags
102
109
  theme: solid
103
110
  link: /tags
104
- # <name>:
105
- # name: <icon-name>
106
- # theme: <icon-theme>
107
- # link: <link-url>
108
111
  ```
109
112
 
110
113
  - 主页信息卡片
111
114
 
112
- 和导航栏差不多
113
-
114
115
  `description` 支持 Markdown 格式
115
116
 
117
+ 图标链接配置和导航栏配置相同
118
+
116
119
  **如果图标链接或友链为空,请在 `iconLinks:` 或 `friendLinks:` 后添加一个 `{}`**
117
120
 
118
121
  ```yaml
122
+ # Side info card
119
123
  card:
120
124
  enable: true
121
125
  description: |
@@ -123,26 +127,8 @@ background:
123
127
  ...
124
128
  iconLinks:
125
129
  {}
126
- # <name>:
127
- # name: <icon-name>
128
- # theme: <icon-theme>
129
- # link: <link-url>
130
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**
131
+ Argvchs: https://argvchs.netlify.app
146
132
  ```
147
133
 
148
134
  - 页脚
@@ -152,8 +138,10 @@ background:
152
138
  如没有需要显示备案消息的可以关闭
153
139
 
154
140
  ```yaml
141
+ # Footer info
155
142
  footer:
156
143
  since: 2022
144
+ # Customize the server domain name ICP
157
145
  ICP:
158
146
  enable: false
159
147
  code:
@@ -162,11 +150,13 @@ background:
162
150
 
163
151
  - Polyfill
164
152
 
165
- 使用 [Polyfill.io](https://polyfill.io/v3/url-builder) 自动根据 UA 处理新的 JS API 兼容
153
+ 使用 [Polyfill.io](https://polyfill.io) 自动根据 UA 处理新的 JS API 兼容
166
154
 
167
155
  可以配合 [Hexo-Babel](https://github.com/argvchs/hexo-babel) 插件处理 JS 语法兼容
168
156
 
169
157
  ```yaml
158
+ # Polyfill
159
+ # https://polyfill.io
170
160
  polyfill:
171
161
  enable: true
172
162
  features:
@@ -180,8 +170,10 @@ background:
180
170
  样式可以在[这里](https://highlightjs.org/static/demo)选择,默认为 GitHub
181
171
 
182
172
  ```yaml
173
+ # Highlight.js
174
+ # https://highlightjs.org
183
175
  highlight:
184
- enable: false
176
+ enable: true
185
177
  style: github
186
178
  ```
187
179
 
@@ -190,6 +182,7 @@ background:
190
182
  使用 KaTeX 渲染数学公式
191
183
 
192
184
  ```yaml
185
+ # Rendering math with KaTeX
193
186
  math:
194
187
  enable: false
195
188
  ```
@@ -199,10 +192,24 @@ background:
199
192
  简单的点击图片放大缩小的预览
200
193
 
201
194
  ```yaml
195
+ # Image Preview
202
196
  preview:
203
197
  enable: true
204
198
  ```
205
199
 
200
+ - 文章缩略
201
+
202
+ 一般来说,缩略展示文档只需要在文档中添加 `<!-- more -->` 即可,缩略内容在显示全文中也会出现
203
+
204
+ 但考虑到不想把缩略内容放在正文里,就添加了此参数,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置
205
+
206
+ 支持 Markdown 格式
207
+
208
+ ```yaml
209
+ description: |
210
+ Normal _Italic_ **Strong**
211
+ ```
212
+
206
213
  - 文章置顶
207
214
 
208
215
  在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `pinned` 作为置顶参数,越大越靠前,默认为 0
@@ -212,6 +219,7 @@ background:
212
219
  使用 AES 加密算法,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `secret` 作为密码,**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/argvchs/hexo-helper-crypto)**
213
220
 
214
221
  ```yaml
222
+ # Article encryption
215
223
  crypto:
216
224
  enable: false
217
225
  ```
@@ -223,37 +231,11 @@ background:
223
231
  目前只支持搜索文档标题(我太弱了)
224
232
 
225
233
  ```yaml
234
+ # Search
226
235
  search:
227
236
  enable: false
228
237
  ```
229
238
 
230
- - Gitalk
231
-
232
- Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统
233
-
234
- 考虑到博客可能部署到多个网站同步评论,但 OAuth APP 只能有一个回调 URL,所以添加了 `sites` 参数用于其他网站的评论,请注册多个 Oauth APP
235
-
236
- **同样如果没有其他网站,请在 `sites:` 后添加一个 `{}`**
237
-
238
- 由于 Gitalk 官方 CORS 代理用的是 Cloudflare,速度过慢,添加了 `proxy` 参数,搭建 CORS 代理可以看[这篇文章](https://argvchs.github.io/2022/07/04/build-cors-anywhere)
239
-
240
- ```yaml
241
- gitalk:
242
- enable: false
243
- clientID: # Default ClientID
244
- clientSecret: # Default ClientSecret
245
- repo: # The name of repository of store comments
246
- owner: # GitHub repo owner
247
- admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
248
- language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
249
- proxy: # CORS proxy
250
- sites: # Sites
251
- {}
252
- # <www.example.com>:
253
- # clientID: <client-id>
254
- # clientSecret: <client-secret>
255
- ```
256
-
257
239
  - Giscus
258
240
 
259
241
  Giscus 是一个由 GitHub Discussions 支持的评论系统
@@ -261,6 +243,8 @@ background:
261
243
  在 [Giscus.app](https://giscus.app) 设置好各项后,会在下面生成一个 `<script>` 标签,在主题内填入即可
262
244
 
263
245
  ```yaml
246
+ # Giscus
247
+ # https://github.com/giscus/giscus
264
248
  giscus:
265
249
  enable: false
266
250
  src: https://giscus.app/client.js
@@ -277,6 +261,35 @@ background:
277
261
  lang: zh-CN
278
262
  ```
279
263
 
264
+ - Gitalk
265
+
266
+ Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统
267
+
268
+ 考虑到博客可能部署到多个网站同步评论,但 OAuth APP 只能有一个回调 URL,所以添加了 `sites` 参数用于多个网站的评论
269
+
270
+ **同样如果没有其他网站,请在 `sites:` 后添加一个 `{}`**
271
+
272
+ 由于 Gitalk 官方 CORS 代理用的是 Cloudflare,速度过慢,添加了 `proxy` 参数,搭建 CORS 代理可以看[这篇文章](https://argvchs.github.io/2022/07/04/build-cors-anywhere)
273
+
274
+ ```yaml
275
+ # Gitalk
276
+ # https://github.com/gitalk/gitalk
277
+ gitalk:
278
+ enable: false
279
+ clientID: # Default ClientID
280
+ clientSecret: # Default ClientSecret
281
+ repo: # The name of repository of store comments
282
+ owner: # GitHub repo owner
283
+ admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
284
+ language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
285
+ proxy: # CORS proxy
286
+ sites: # Sites
287
+ {}
288
+ # www.example.com:
289
+ # clientID:
290
+ # clientSecret:
291
+ ```
292
+
280
293
  - Waline
281
294
 
282
295
  Waline 是一个简单、安全的评论系统
@@ -286,13 +299,13 @@ background:
286
299
  **注意如果不需要 `locale` 参数,请在 `locale:` 后添加一个 `{}`**
287
300
 
288
301
  ```yaml
302
+ # Waline
303
+ # https://github.com/walinejs/waline
289
304
  waline:
290
305
  enable: false
291
306
  serverURL: # Waline server address url, you should set this to your own link
292
307
  locale: # Locale: https://waline.js.org/guide/client/i18n.html#locale-option
293
308
  {}
294
- # e.g.:
295
- # placeholder: Leave a comment
296
309
  commentCount: true # If false, comment count will only be displayed in post page, not in home page
297
310
  pageview: false # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`
298
311
  emoji: # Custom emoji
@@ -319,6 +332,8 @@ background:
319
332
  Twikoo 是一个一个简洁、安全、免费的静态网站评论系统
320
333
 
321
334
  ```yaml
335
+ # Twikoo
336
+ # https://github.com/imaegoo/twikoo
322
337
  twikoo:
323
338
  enable: false
324
339
  envID:
@@ -329,4 +344,4 @@ background:
329
344
 
330
345
  ## 写在最后
331
346
 
332
- 本项目采用 MIT 开源许可证,欢迎大家贡献,你可以随意打开一个 Issue 来进行提问,有任何改进想法都可以进行 Fork,期待您的 Pull Request
347
+ 本项目采用 MIT 开源许可证,欢迎大家贡献,你可以随意打开一个 Issue 来进行提问,有任何改进想法都可以进行 Fork,期待您的 Pull Request
package/_config.yml CHANGED
@@ -2,16 +2,16 @@
2
2
  # https://github.com/argvchs/hexo-theme-particlex
3
3
 
4
4
  # Avatar image
5
- avatar:
5
+ avatar: /images/avatar.jpg
6
6
 
7
7
  # Home page info block
8
8
  headBlockEnable: true
9
9
 
10
10
  # Home page background image
11
- background:
11
+ background: /images/background.jpg
12
12
 
13
13
  # ParticleX theme icon is adopts the Font Awesome 6
14
- # https://fontawesome.com/search
14
+ # https://fontawesome.com
15
15
 
16
16
  # Main menu navigation
17
17
  menu:
@@ -35,10 +35,6 @@ menu:
35
35
  name: tags
36
36
  theme: solid
37
37
  link: /tags
38
- # <name>:
39
- # name: <icon-name>
40
- # theme: <icon-theme>
41
- # link: <link-url>
42
38
 
43
39
  # Side info card
44
40
  card:
@@ -48,13 +44,8 @@ card:
48
44
  ...
49
45
  iconLinks:
50
46
  {}
51
- # <name>:
52
- # name: <icon-name>
53
- # theme: <icon-theme>
54
- # link: <link-url>
55
47
  friendLinks:
56
- {}
57
- # <name>: <link-url>
48
+ Argvchs: https://argvchs.netlify.app
58
49
 
59
50
  # Footer info
60
51
  footer:
@@ -66,7 +57,7 @@ footer:
66
57
  link:
67
58
 
68
59
  # Polyfill
69
- # https://polyfill.io/v3/url-builder
60
+ # https://polyfill.io
70
61
  polyfill:
71
62
  enable: true
72
63
  features:
@@ -94,23 +85,6 @@ crypto:
94
85
  search:
95
86
  enable: false
96
87
 
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
88
  # Giscus
115
89
  # https://github.com/giscus/giscus
116
90
  giscus:
@@ -128,6 +102,23 @@ giscus:
128
102
  theme: preferred_color_scheme
129
103
  lang: zh-CN
130
104
 
105
+ # Gitalk
106
+ # https://github.com/gitalk/gitalk
107
+ gitalk:
108
+ enable: false
109
+ clientID: # Default ClientID
110
+ clientSecret: # Default ClientSecret
111
+ repo: # The name of repository of store comments
112
+ owner: # GitHub repo owner
113
+ admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
114
+ language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
115
+ proxy: # CORS proxy
116
+ sites: # Sites
117
+ {}
118
+ # www.example.com:
119
+ # clientID:
120
+ # clientSecret:
121
+
131
122
  # Waline
132
123
  # https://github.com/walinejs/waline
133
124
  waline:
@@ -135,8 +126,6 @@ waline:
135
126
  serverURL: # Waline server address url, you should set this to your own link
136
127
  locale: # Locale: https://waline.js.org/guide/client/i18n.html#locale-option
137
128
  {}
138
- # e.g.:
139
- # placeholder: Leave a comment
140
129
  commentCount: true # If false, comment count will only be displayed in post page, not in home page
141
130
  pageview: false # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`
142
131
  emoji: # Custom emoji
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "repository": {
6
6
  "type": "git",
Binary file
Binary file