hexo-theme-shokax 0.4.15 → 0.5.0-dev-815e373
Sign up to get free protection for your applications and to get access to all the features.
package/README.md
CHANGED
@@ -1,43 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
更改了大量难以访问的CDN链接
|
21
|
-
|
22
|
-
## ✨ 功能清单
|
23
|
-
|
24
|
-
| 功能名称 | 实现状态 | 功能名称 | 实现状态 |
|
25
|
-
|:--------:|:----:|:------------:|:----:|
|
26
|
-
| PWA支持 | ✅ | JSD拆分 | ✅ |
|
27
|
-
| 注入API | ✅ | 社区插件系统 | ✅ |
|
28
|
-
| 自定义字体 | ✅* | 自定义样式 | ✅* |
|
29
|
-
| 多种评论系统支持 | ✅ | AI生成文章概括 | 🔬 |
|
30
|
-
| 底部备案号 | ✅ | 自定义页尾 | ✅* |
|
31
|
-
| CSS渐变封面 | ✅ | typescript支持 | ✅ |
|
32
|
-
|
33
|
-
备注:
|
34
|
-
- *: 需要使用注入API实现
|
35
|
-
- 🔬: 实验中,可能存在问题
|
36
|
-
|
37
|
-
|
38
|
-
## 🔧 如何安装?
|
39
|
-
注意: 本项目需要 node.js 18.x 或更高版本才能运行 \
|
40
|
-
见文档中[如何安装](https://docs-hexo.shokax.top/getting-started/)部分
|
1
|
+
**🏗️ 当前分支为 ShokaX 0.5 Dev分支,不建议普通用户使用** \
|
2
|
+
此分支为 ShokaX 0.5 实验性变更分支,确保0.5开发期间0.4的维护不受影响
|
3
|
+
|
4
|
+
计划更改:
|
5
|
+
- 移除 pjax
|
6
|
+
- 移除 quicklink
|
7
|
+
- 移除 assetUrl 为基的动态 Vendor 机制
|
8
|
+
- 移除 ShokaX Inject
|
9
|
+
- 引入新的 Inject 类技术 (长期)
|
10
|
+
- 引入新的工作流程
|
11
|
+
- 引入 CI 自动测试
|
12
|
+
- 优化 menu 配置格式
|
13
|
+
- 优化和异步化 Smart Bundle 技术
|
14
|
+
- 优化 CSS 结构和加载
|
15
|
+
- 修复/重置 fancybox
|
16
|
+
- 修复模板长期遗留问题
|
17
|
+
- 修复 images 遗留问题
|
18
|
+
- 规范化配置文件
|
19
|
+
- 规范化文档
|
41
20
|
|
42
21
|
## 📚子项目
|
43
22
|
- [ShokaX docs](https://github.com/theme-shoka-x/shokaX-docs) ShokaX 主题文档 (正在编写中,欢迎加入!)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-shokax",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0-dev-815e373",
|
4
4
|
"description": "a hexo theme based on shoka",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"dependencies": {
|
30
30
|
"@algolia/client-search": "^5.5.3",
|
31
31
|
"@waline/client": "^3.3.2",
|
32
|
-
"algoliasearch": "5.
|
32
|
+
"algoliasearch": "5.10.2",
|
33
33
|
"esbuild": "^0.24.0",
|
34
34
|
"hexo": "^7.3.0",
|
35
35
|
"hexo-algoliasearch": "^2.0.1",
|
@@ -65,4 +65,4 @@
|
|
65
65
|
"object.values": "npm:@nolyfill/object.values@latest"
|
66
66
|
}
|
67
67
|
}
|
68
|
-
}
|
68
|
+
}
|
@@ -191,7 +191,7 @@ hexo.extend.generator.register("script", function(locals) {
|
|
191
191
|
res.push({
|
192
192
|
path: theme.js + "/cf-patch.js",
|
193
193
|
data: function() {
|
194
|
-
return
|
194
|
+
return import_node_fs.default.readFileSync("./cf-patch.js", { encoding: "utf-8" });
|
195
195
|
}
|
196
196
|
});
|
197
197
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// rocket-loader & Auto minify(cloudflare) 补丁
|
2
2
|
// cloudflare 的上述功能会导致DOMContentLoaded事件无法触发,此补丁会将DOMContentLoaded重定向为load事件
|
3
|
-
function cloudflareInit () {
|
3
|
+
export function cloudflareInit () {
|
4
4
|
let inCloudFlare = true
|
5
5
|
window.addEventListener('DOMContentLoaded', function () {
|
6
6
|
inCloudFlare = false
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import domInit from './domInit'
|
2
2
|
import { pjaxReload, siteRefresh } from './refresh'
|
3
|
-
import { cloudflareInit } from '../
|
3
|
+
import { cloudflareInit } from '../components/cloudflare'
|
4
4
|
import { BODY, CONFIG, pjax, setPjax, setSiteSearch, siteSearch } from '../globals/globalVars'
|
5
5
|
import { autoDarkmode, themeColorListener } from '../globals/themeColor'
|
6
6
|
import { resizeHandle, scrollHandle, visibilityListener } from '../globals/handles'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import fs from 'node:fs';
|
2
|
+
import { execSync } from 'child_process';
|
3
|
+
|
4
|
+
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
|
5
|
+
const currentVersion = packageJson.version;
|
6
|
+
|
7
|
+
const shortHash = execSync('git rev-parse --short HEAD').toString().trim();
|
8
|
+
|
9
|
+
const newVersion = `${currentVersion}-dev-${shortHash}`;
|
10
|
+
|
11
|
+
packageJson.version = newVersion;
|
12
|
+
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 4));
|
13
|
+
|
14
|
+
console.log(`Updated package version to ${newVersion}`);
|
package/README_en.MD
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# 📣 Announcement
|
2
|
-
[Your ShokaX and Shoka sites might be under a supply chain attack](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/293) \
|
3
|
-
[Survey on ShokaX deployment platform and Astro migration](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/229)
|
4
|
-
|
5
|
-
# hexo-theme-shokaX
|
6
|
-
![LICENSE](https://img.shields.io/github/license/theme-shoka-x/hexo-theme-shokaX)
|
7
|
-
![stars](https://img.shields.io/github/stars/theme-shoka-x/hexo-theme-shokaX)
|
8
|
-
![version](https://shields.io/npm/v/hexo-theme-shokax)
|
9
|
-
![build](https://img.shields.io/github/actions/workflow/status/theme-shoka-x/hexo-theme-shokaX/build-theme.yml)
|
10
|
-
|
11
|
-
#### Language: Simplified Chinese | [English](./README_en.MD) \
|
12
|
-
This project is a secondary development version of Shoka (considered a spiritual successor), dedicated to improving performance and optimizing the custom modification experience. \
|
13
|
-
The reason for its creation is that Shoka hasn't been updated for three years, accumulating a large number of bugs and feature requests.
|
14
|
-
|
15
|
-
ShokaX's community resource guide and plugin repository can be found at [awesome-shokaX](https://github.com/theme-shoka-x/awesome-shokaX).
|
16
|
-
|
17
|
-
## 💬 Differences from Shoka
|
18
|
-
The original Shoka used javascript+Native+nunjucks technology, \
|
19
|
-
while ShokaX uses typescript+Vue 3+Pug technology. \
|
20
|
-
Many inaccessible CDN links have been changed.
|
21
|
-
|
22
|
-
## ✨ Feature List
|
23
|
-
|
24
|
-
| Feature Name | Status | Feature Name | Status |
|
25
|
-
|:--------------------------------:|:------:|:----------------------------:|:------:|
|
26
|
-
| PWA Support | ✅ | JSD Split | ✅ |
|
27
|
-
| API Injection | ✅ | Community Plugin System | ✅ |
|
28
|
-
| Custom Fonts | ✅* | Custom Styles | ✅* |
|
29
|
-
| Multiple Comment Systems Support | ✅ | AI-Generated Article Summary | 🔬 |
|
30
|
-
| Footer Record Number | ✅ | Custom Footer | ✅* |
|
31
|
-
| CSS Gradient Cover | ✅ | Typescript Support | ✅ |
|
32
|
-
|
33
|
-
Notes:
|
34
|
-
- *: Requires API injection
|
35
|
-
- 🔬: Experimental, may have issues
|
36
|
-
|
37
|
-
## 🔧 How to Install?
|
38
|
-
Note: This project requires node.js version 18.x or higher to run. \
|
39
|
-
See the [installation guide](https://docs-hexo.shokax.top/getting-started/) in the documentation.
|
40
|
-
|
41
|
-
## 📚 Sub-Projects
|
42
|
-
- [ShokaX docs](https://github.com/theme-shoka-x/shokaX-docs) ShokaX theme documentation (currently being written, feel free to join!)
|
43
|
-
- [HRMNMI](https://github.com/theme-shoka-x/hexo-renderer-multi-next-markdown-it) Markdown renderer used by ShokaX (awaiting refactoring)
|
44
|
-
- [ShokaX Pjax](https://github.com/theme-shoka-x/theme-shokax-pjax) Efficient Pjax implementation provided by ShokaX
|
45
|
-
- [ShokaX Anime](https://github.com/theme-shoka-x/theme-shokax-anime) Simplified version of Anime.js provided by ShokaX
|
46
|
-
|
47
|
-
# [License](https://github.com/theme-shoka-x/hexo-theme-shokaX/blob/main/LICENSE)
|
48
|
-
License: AGPL 3 or later
|
49
|
-
|
50
|
-
## Special Notes
|
51
|
-
The AGPL license primarily aims to restrict modified distribution behavior to avoid unauthorized secondary modifications and commercial packaging. \
|
52
|
-
Any modifications to the source code **must** be open-sourced because, according to the AGPL license, building a website requires the modified portions to be open-sourced.
|
53
|
-
|
54
|
-
## Special Usage Instructions
|
55
|
-
According to AGPLv3 Section 7, we have added some additional terms: \
|
56
|
-
Please see [Usage Restrictions](./UsageRestrictions.md). By using ShokaX, you acknowledge this file's content.
|
57
|
-
|
58
|
-
# Acknowledgements
|
59
|
-
## Open Source Projects
|
60
|
-
| Name | Author | Description |
|
61
|
-
|:----------------:|:-----------------:|:--------------------------------------------:|
|
62
|
-
| Hexo | Hexo contributors | Provided a great foundation for this project |
|
63
|
-
| hexo-theme-shoka | amehime | Parent theme of this project |
|
64
|
-
|
65
|
-
## Developers
|
66
|
-
Hexo theme: \
|
67
|
-
[![](https://contributors-img.web.app/image?repo=theme-shoka-x/hexo-theme-shokaX)](https://github.com/theme-shoka-x/hexo-theme-shokaX/graphs/contributors) \
|
68
|
-
ShokaX documentation: \
|
69
|
-
[![](https://contributors-img.web.app/image?repo=theme-shoka-x/shokaX-docs)](https://github.com/theme-shoka-x/shokaX-docs/graphs/contributors)
|
70
|
-
|
71
|
-
## Special Thanks
|
72
|
-
[<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="25%">](https://jb.gg/OpenSourceSupport)
|
73
|
-
|
74
|
-
## Other Information
|
75
|
-
![Star history chart](https://api.star-history.com/svg?repos=theme-shoka-x/hexo-theme-shokaX&type=Date)
|