hexo-theme-particlex 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hexo-Theme-ParticleX
2
2
 
3
- [Hexo-Theme-ParticleX](https://github.com/argvchs/hexo-theme-particlex) 主题,诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了,但是我觉得还是很好的
3
+ [ParticleX](https://github.com/argvchs/hexo-theme-particlex) 主题,诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了,但是我觉得还是很好的
4
4
 
5
5
  原来用的是 Vue 2 + Ant Design Vue 1,现更新到 Vue 3,去除 Ant Design Vue 采用自定义样式,图标更改为 Font Awesome 6,将不能用的 JSDelivr 改为 Staticfile CDN
6
6
 
@@ -10,11 +10,11 @@
10
10
 
11
11
  虽然更改后只有一种了,如果你想改颜色就在 `particlex.css` 里 `Ctrl+F` 替换吧
12
12
 
13
- ## 演示地址
13
+ ## 演示
14
14
 
15
- - Github Pages <https://argvchs.github.io>
16
- - Netlify <https://argvchs.netlify.app>
17
- - Vercel <https://argvchs.vercel.app>
15
+ - [Github Pages](https://argvchs.github.io)
16
+ - [Netlify](https://argvchs.netlify.app)
17
+ - [Vercel](https://argvchs.vercel.app)
18
18
 
19
19
  ## 安装
20
20
 
@@ -42,19 +42,20 @@ prismjs:
42
42
  tab_replace: ""
43
43
  ```
44
44
 
45
- 修改完请清除缓存:`hexo cl`
45
+ 修改完请 `hexo cl` 清除缓存
46
46
 
47
47
  ## 配置
48
48
 
49
49
  ```yaml
50
- avatar: # Avatar image url
51
- head_block_enable: true # Home page head info block
52
- home_background: # Home page head background image url
50
+ avatar: # Avatar image
51
+ headBlockEnable: true # Home page info block
52
+ background: # Home page background image
53
+ highlightStyle: github # Highlight style
53
54
  ```
54
55
 
55
- - 导航栏配置
56
+ - 导航栏
56
57
 
57
- 为了方便,主题使用的图标是 FontAwesome 6 图标,地址为:<https://fontawesome.com/search>
58
+ 为了方便,主题使用的图标是 Font Awesome 6 图标
58
59
 
59
60
  ```yaml
60
61
  menu:
@@ -86,44 +87,42 @@ home_background: # Home page head background image url
86
87
 
87
88
  - 主页信息卡片
88
89
 
89
- 和导航栏配置差不多
90
+ 和导航栏差不多
90
91
 
91
92
  `description` 支持 Markdown 格式
92
93
 
93
- **如果图标链接或友链为空,请在 `icon_links:` 或 `friend_links:` 后添加一个 `{}`**
94
+ **如果图标链接或友链为空,请在 `iconLinks:` 或 `friendLinks:` 后添加一个 `{}`**
94
95
 
95
96
  ```yaml
96
97
  card:
97
98
  enable: true
98
99
  description:
99
- - Description
100
+ - "Description"
100
101
  - "..."
101
- icon_links:
102
+ iconLinks:
102
103
  {}
103
104
  # <name>:
104
105
  # name: <icon-name>
105
106
  # theme: <icon-theme>
106
107
  # link: <link-url>
107
- friend_links:
108
+ friendLinks:
108
109
  {}
109
110
  # <name>: <link-url>
110
111
  ```
111
112
 
112
- - 首页文档缩略配置
113
+ - 文档缩略
113
114
 
114
115
  一般来说,缩略展示文档只需要在文档中添加 `<!-- more -->` 即可,缩略内容在显示全文中也会出现
115
116
 
116
- 但考虑到不想把缩略内容放在正文里,就添加了此配置
117
+ 但考虑到不想把缩略内容放在正文里,就添加了此参数,在 Front-Matter 里设置
117
118
 
118
- 配置在 Markdown 文件的 Front-Matter 中填写(被 `---` 括起来的内容),支持 Markdown 格式,不想用则不用添加
119
-
120
- 例如:(注意换行和转义 `"`)
119
+ 支持 Markdown 格式
121
120
 
122
121
  ```yaml
123
- description: "text\n**bold**\n_italic_"
122
+ description: "Normal **Strong** _Italic_"
124
123
  ```
125
124
 
126
- - 页脚配置
125
+ - 页脚
127
126
 
128
127
  考虑到博客部署在服务器并使用自己域名的情况,按国家规定需要在网站下边添加备案消息
129
128
 
@@ -131,7 +130,7 @@ home_background: # Home page head background image url
131
130
 
132
131
  ```yaml
133
132
  footer:
134
- since: 20xx
133
+ since: 2022
135
134
  ICP:
136
135
  enable: false
137
136
  code:
@@ -140,7 +139,9 @@ home_background: # Home page head background image url
140
139
 
141
140
  - Polyfill
142
141
 
143
- 使用 [Polyfill.io](https://polyfill.io/v3/url-builder) 自动根据 UA 处理新的 JS API 兼容问题,可以配合 [Hexo-Renderer-BabelJS](https://github.com/argvchs/hexo-renderer-babeljs) 插件处理 JS 语法
142
+ 使用 [Polyfill.io](https://polyfill.io/v3/url-builder) 自动根据 UA 处理新的 JS API 兼容
143
+
144
+ 可以配合 [Hexo-Renderer-BabelJS](https://github.com/argvchs/hexo-renderer-babeljs) 插件处理 JS 语法
144
145
 
145
146
  ```yaml
146
147
  polyfill:
@@ -169,11 +170,11 @@ home_background: # Home page head background image url
169
170
 
170
171
  - 搜索
171
172
 
172
- 嵌入到 Archives 中的搜索,搜索数据是用 [Hexo-Generator-Search-Lite](https://github.com/argvchs/hexo-generator-search-lite) 生成,默认关闭,使用需要**安装上述插件**并**设置 `optimize: true`**
173
+ 嵌入到 Archives 中的搜索,搜索数据是用 [Hexo-Generator-Search-Lite](https://github.com/argvchs/hexo-generator-search-lite) 生成,默认关闭,使用需要安装上述插件并**设置 `optimize: true`**
173
174
 
174
175
  目前只支持搜索文档的 Title Categories Tags(我太弱了)
175
176
 
176
- 要同时在主题和根目录的两个 `_config.yml` 添加设置
177
+ 要同时在主题和根目录的两个 `_config.yml` 添加配置
177
178
 
178
179
  ```yaml
179
180
  # Theme config
@@ -186,7 +187,7 @@ home_background: # Home page head background image url
186
187
  # Site config
187
188
  search:
188
189
  path: /search.json
189
- optimize: false
190
+ optimize: true
190
191
  ```
191
192
 
192
193
  - Gitalk
@@ -197,7 +198,7 @@ home_background: # Home page head background image url
197
198
 
198
199
  **同样如果没有其他网站,请在 `sites:` 后添加一个 `{}`**
199
200
 
200
- 由于 Gitalk 官方 CORS 代理用的是 Cloudflare,速度过慢,添加了 `proxy` 配置,搭建 CORS 代理可以看[这篇文章](https://argvchs.github.io/2022/07/04/build-cors-anywhere)
201
+ 由于 Gitalk 官方 CORS 代理用的是 Cloudflare,速度过慢,添加了 `proxy` 参数,搭建 CORS 代理可以看[这篇文章](https://argvchs.github.io/2022/07/04/build-cors-anywhere)
201
202
 
202
203
  ```yaml
203
204
  gitalk:
@@ -207,7 +208,7 @@ home_background: # Home page head background image url
207
208
  repo: # The name of repository of store comments
208
209
  owner: # GitHub repo owner
209
210
  admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
210
- language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available.
211
+ language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
211
212
  proxy: # CORS proxy
212
213
  sites: # Sites
213
214
  {}
@@ -220,7 +221,7 @@ home_background: # Home page head background image url
220
221
 
221
222
  Giscus 是一个由 GitHub Discussions 支持的评论系统
222
223
 
223
- 在 [Giscus.app](https://giscus.app) 配置好各项后,会在下面生成一个 `<script>` 标签,在主题内填入即可
224
+ 在 [Giscus.app](https://giscus.app) 设置好各项后,会在下面生成一个 `<script>` 标签,在主题内填入即可
224
225
 
225
226
  ```yaml
226
227
  giscus:
@@ -243,9 +244,9 @@ home_background: # Home page head background image url
243
244
 
244
245
  Waline 是一个简单、安全的评论系统
245
246
 
246
- 配置方法详见:[在 ParticleX 上使用 Waline | Yuzi's Blog](https://blog.yuzi0201.top/posts/bcb4ff00.html)
247
+ 详见:[在 ParticleX 上使用 Waline | Yuzi's Blog](https://blog.yuzi0201.top/posts/bcb4ff00.html)
247
248
 
248
- **注意如果不需要 Locale 配置,请在 `locale:` 后添加一个 `{}`**
249
+ **注意如果不需要 `locale` 参数,请在 `locale:` 后添加一个 `{}`**
249
250
 
250
251
  ```yaml
251
252
  waline:
package/_config.yml CHANGED
@@ -1,17 +1,21 @@
1
+ # ParticleX Configuration
1
2
  # https://github.com/argvchs/hexo-theme-particlex
2
- # Developer: argvchs
3
3
 
4
- # Avatar image url
4
+ # Avatar image
5
5
  avatar:
6
6
 
7
- # Home page head info block
8
- head_block_enable: true
7
+ # Home page info block
8
+ headBlockEnable: true
9
9
 
10
- # Home page head background image url
11
- home_background:
10
+ # Home page background image
11
+ background:
12
+
13
+ # Highlight style
14
+ # https://highlightjs.org
15
+ highlightStyle: github
12
16
 
13
17
  # ParticleX theme icon is adopts the Font Awesome 6
14
- # Link: https://fontawesome.com/search
18
+ # https://fontawesome.com/search
15
19
 
16
20
  # Main menu navigation
17
21
  menu:
@@ -44,21 +48,21 @@ menu:
44
48
  card:
45
49
  enable: true
46
50
  description:
47
- - Description
51
+ - "Description"
48
52
  - "..."
49
- icon_links:
53
+ iconLinks:
50
54
  {}
51
55
  # <name>:
52
56
  # name: <icon-name>
53
57
  # theme: <icon-theme>
54
58
  # link: <link-url>
55
- friend_links:
59
+ friendLinks:
56
60
  {}
57
61
  # <name>: <link-url>
58
62
 
59
63
  # Footer info
60
64
  footer:
61
- since: 20xx
65
+ since: 2022
62
66
  # Customize the server domain name ICP
63
67
  ICP:
64
68
  enable: false
@@ -94,7 +98,7 @@ gitalk:
94
98
  repo: # The name of repository of store comments
95
99
  owner: # GitHub repo owner
96
100
  admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
97
- language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available.
101
+ language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
98
102
  proxy: # CORS proxy
99
103
  sites: # Sites
100
104
  {}
package/layout/card.ejs CHANGED
@@ -14,18 +14,18 @@
14
14
  <% }); %>
15
15
  </div>
16
16
  <div class="icon-links">
17
- <% Object.keys(theme.card.icon_links).forEach(key => { %>
17
+ <% Object.keys(theme.card.iconLinks).forEach(key => { %>
18
18
  <span class="icon-link">
19
- <a href="<%- theme.card.icon_links[key].link %>">
20
- <i class="fa-<%- theme.card.icon_links[key].theme %> fa-<%- theme.card.icon_links[key].name %> fa-fw"></i>
19
+ <a href="<%- theme.card.iconLinks[key].link %>">
20
+ <i class="fa-<%- theme.card.iconLinks[key].theme %> fa-<%- theme.card.iconLinks[key].name %> fa-fw"></i>
21
21
  </a>
22
22
  </span>
23
23
  <% }); %>
24
24
  </div>
25
25
  <div class="friend-links">
26
- <% Object.keys(theme.card.friend_links).forEach(key => { %>
26
+ <% Object.keys(theme.card.friendLinks).forEach(key => { %>
27
27
  <div class="friend-link">
28
- <a href="<%- theme.card.friend_links[key] %>">
28
+ <a href="<%- theme.card.friendLinks[key] %>">
29
29
  <%= key %>
30
30
  </a>
31
31
  </div>
package/layout/index.ejs CHANGED
@@ -1,6 +1,6 @@
1
- <div id="home-background" style="background-image: url(<%- theme.home_background %>)"></div>
1
+ <div id="home-background" style="background-image: url(<%- theme.background %>)"></div>
2
2
  <div id="home-head">
3
- <% if (theme.head_block_enable) { %>
3
+ <% if (theme.headBlockEnable) { %>
4
4
  <div id="home-info" class="home-info" @click="homeclick">
5
5
  <span class="loop"></span>
6
6
  <span class="loop"></span>
package/layout/layout.ejs CHANGED
@@ -35,16 +35,18 @@
35
35
  <script src="https://cdn.staticfile.org/instant.page/5.1.1/instantpage.min.js" type="module"></script>
36
36
  <script src="https://cdn.staticfile.org/font-awesome/6.2.1/js/all.min.js"></script>
37
37
  <script src="https://cdn.staticfile.org/vue/3.2.45/vue.global.prod.min.js"></script>
38
+ <script src="https://cdn.staticfile.org/highlight.js/11.7.0/highlight.min.js"></script>
39
+ <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.7.0/styles/<%- theme.highlightStyle %>.min.css">
38
40
  <% if (theme.polyfill.enable) { %>
39
41
  <script src="https://polyfill.io/v3/polyfill.min.js?features=<% theme.polyfill.features.join(",") %>"></script>
40
42
  <% } %>
41
- <link rel="stylesheet" href="<%- url_for("/css/fonts.min.css") %>">
42
- <link rel="stylesheet" href="<%- url_for("/css/particlex.css") %>">
43
43
  <% if (theme.math.enable) { %>
44
44
  <script src="https://cdn.staticfile.org/KaTeX/0.16.4/katex.min.js"></script>
45
45
  <script src="https://cdn.staticfile.org/KaTeX/0.16.4/contrib/auto-render.min.js"></script>
46
46
  <link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.16.4/katex.min.css">
47
47
  <% } %>
48
+ <link rel="stylesheet" href="<%- url_for("/css/fonts.min.css") %>">
49
+ <link rel="stylesheet" href="<%- url_for("/css/particlex.css") %>">
48
50
  </head>
49
51
  <body>
50
52
  <%- include("loading") %>
package/layout/post.ejs CHANGED
@@ -79,7 +79,6 @@
79
79
  </div>
80
80
  <% } %>
81
81
  <% if (theme.twikoo.enable) { %>
82
- <script src="https://cdn.staticfile.org/twikoo/1.6.8/twikoo.all.min.js"></script>
83
82
  <div id="comment">
84
83
  <div id="twikoo-container"></div>
85
84
  </div>
package/layout/script.ejs CHANGED
@@ -1,4 +1,3 @@
1
- <script src="https://cdn.staticfile.org/highlight.js/11.5.1/highlight.min.js"></script>
2
1
  <script src="<%- url_for("/js/functions.js") %>"></script>
3
2
  <script src="<%- url_for("/js/particlex.js") %>"></script>
4
3
  <% if (is_post()) { %>
@@ -65,6 +64,7 @@
65
64
  </script>
66
65
  <% } %>
67
66
  <% if (theme.twikoo.enable) { %>
67
+ <script src="https://cdn.staticfile.org/twikoo/1.6.8/twikoo.all.min.js"></script>
68
68
  <script>
69
69
  twikoo.init({
70
70
  el: "#twikoo-container",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -682,54 +682,6 @@ footer .footer-wrap {
682
682
  line-height: 2;
683
683
  font-size: 13px;
684
684
  }
685
- .content .hljs .hljs-built_in {
686
- color: #42a4d6;
687
- }
688
- .content .hljs .hljs-keyword {
689
- color: #e24279;
690
- }
691
- .content .hljs .hljs-literal {
692
- color: #ff9800;
693
- }
694
- .content .hljs .hljs-number {
695
- color: #ff9800;
696
- }
697
- .content .hljs .hljs-doctag {
698
- color: #009688;
699
- }
700
- .content .hljs .hljs-string {
701
- color: #009688;
702
- }
703
- .content .hljs .hljs-comment {
704
- color: #9e9e9e;
705
- }
706
- .content .hljs .hljs-quote {
707
- color: #9e9e9e;
708
- }
709
- .content .hljs .hljs-attribute {
710
- color: #f00;
711
- }
712
- .content .hljs .hljs-name {
713
- color: #f00;
714
- }
715
- .content .hljs .hljs-attr {
716
- color: #525252;
717
- }
718
- .content .hljs .hljs-class {
719
- color: #3f51b5;
720
- }
721
- .content .hljs .hljs-title {
722
- color: #3f51b5;
723
- }
724
- .content .hljs .hljs-type {
725
- color: #3f51b5;
726
- }
727
- .content .hljs .hljs-params {
728
- color: #458;
729
- }
730
- .content .hljs .hljs-variable {
731
- color: #458;
732
- }
733
685
  #main {
734
686
  margin-right: calc(100% - 100vw);
735
687
  }