hexo-theme-particlex 2.0.7 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -23,24 +23,49 @@ cd themes
23
23
  git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=1
24
24
  ```
25
25
 
26
- ## 关闭自带 Highlight
26
+ - 关闭自带 Highlight
27
27
 
28
- 到博客根目录下的 `_config.yml`,找到 `highlight` 和 `prismjs` 参数,设置为如下:
28
+ 在博客根目录下的 `_config.yml`,修改 `highlight` 和 `prismjs` 参数
29
29
 
30
- ```yaml
31
- highlight:
32
- enable: false
33
- line_number: true
34
- auto_detect: false
35
- tab_replace: ""
36
- wrap: true
37
- hljs: false
38
- prismjs:
39
- enable: false
40
- preprocess: true
41
- line_number: true
42
- tab_replace: ""
43
- ```
30
+ ```yaml
31
+ highlight:
32
+ enable: false
33
+ line_number: true
34
+ auto_detect: false
35
+ tab_replace: ""
36
+ wrap: true
37
+ hljs: false
38
+ prismjs:
39
+ enable: false
40
+ preprocess: true
41
+ line_number: true
42
+ tab_replace: ""
43
+ ```
44
+
45
+ 如果使用 Pandoc 还需要设置一下
46
+
47
+ ```yaml
48
+ pandoc:
49
+ extra:
50
+ - "no-highlight":
51
+ extensions:
52
+ - "+hard_line_breaks"
53
+ - "+emoji"
54
+ - "-implicit_figures"
55
+ ```
56
+
57
+ - 禁用年度/月度归档
58
+
59
+ Hexo 会自动生成年度/月度归档,可是 ParticleX 主题没有这个功能 ~~我太懒了~~
60
+
61
+ ```yaml
62
+ archive_generator:
63
+ enabled: true
64
+ per_page: 0
65
+ yearly: false
66
+ monthly: false
67
+ daily: false
68
+ ```
44
69
 
45
70
  修改完请 `hexo cl` 清除缓存
46
71
 
@@ -1,11 +1,11 @@
1
- <div id="loading" style="height:100vh;width:100vw;position:fixed;display:flex;z-index:2147483647;justify-content:space-between;background:#fff;transition:all 0.3s ease-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none">
2
- <div style="position:fixed;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center">
3
- <div id="loadcontent" style="width:50vmin;height:50vmin;padding:50px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:solid 10px #a3ddfb;text-align:center">
1
+ <div id="loading" style="height: 100vh; width: 100vw; position: fixed; display: flex; z-index: 2147483647; justify-content: space-between; background: #fff; transition: all 0.3s ease-out; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none">
2
+ <div style="position: fixed; height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center">
3
+ <div id="loadcontent" style="width: 50vmin; height: 50vmin; padding: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: solid 10px #a3ddfb; text-align: center">
4
4
  <div>
5
5
  <h2>LOADING...</h2>
6
- <p style="word-break:keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
6
+ <p style="word-break: keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
7
7
  <div>
8
- <img alt="loading" src="<%- url_for("/loading.gif") %>">
8
+ <img alt="loading" src="<%- url_for("/loading.gif") %>" style="width: 60px">
9
9
  </div>
10
10
  </div>
11
11
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -4,7 +4,7 @@ function highlight() {
4
4
  hljs.configure({ ignoreUnescapedHTML: true });
5
5
  let codes = document.getElementsByTagName("pre");
6
6
  for (let code of codes) {
7
- let lang = code.classList[0] || "text";
7
+ let lang = [...code.classList, ...code.firstChild.classList][0] || "text";
8
8
  code.innerHTML = `<div class="code-content">${code.innerHTML}</div><div class="language">${lang}</div><div class="copycode"><i class="fa-solid fa-copy fa-fw"></i><i class="fa-solid fa-clone fa-fw"></i></div>`;
9
9
  let copycode = code.getElementsByClassName("copycode")[0];
10
10
  copycode.addEventListener("click", async function () {