hexo-theme-stellar 1.37.0 → 1.39.0

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.
Files changed (87) hide show
  1. package/.claude/skills/stellar-theme-dev/SKILL.md +50 -0
  2. package/CHANGELOG.md +75 -0
  3. package/CONTRIBUTING.md +155 -0
  4. package/README.md +56 -35
  5. package/_config.yml +16 -13
  6. package/_data/icons.yml +3 -0
  7. package/languages/en.yml +37 -0
  8. package/languages/zh-CN.yml +37 -0
  9. package/languages/zh-TW.yml +37 -0
  10. package/layout/_partial/comments/layout.ejs +2 -1
  11. package/layout/_partial/main/navbar/article_banner.ejs +11 -5
  12. package/layout/_partial/main/navbar/nav_tabs_blog.ejs +2 -1
  13. package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +1 -0
  14. package/layout/_partial/main/notebook/paginator.ejs +3 -2
  15. package/layout/_partial/main/pin_slider.ejs +325 -0
  16. package/layout/_partial/main/post_list/paginator.ejs +4 -3
  17. package/layout/_partial/main/post_list/post_card.ejs +2 -4
  18. package/layout/_partial/scripts/defines.ejs +2 -1
  19. package/layout/_partial/scripts/lazyload.ejs +24 -0
  20. package/layout/_partial/scripts/utils.ejs +58 -15
  21. package/layout/_partial/sidebar/grad-def.ejs +26 -0
  22. package/layout/_partial/sidebar/index_leftbar.ejs +25 -10
  23. package/layout/_partial/sidebar/logo.ejs +22 -1
  24. package/layout/_partial/sidebar/menu.ejs +11 -5
  25. package/layout/_partial/widgets/components/linklist.ejs +2 -2
  26. package/layout/_partial/widgets/toc.ejs +12 -8
  27. package/layout/_plugins/scrollreveal.ejs +17 -2
  28. package/layout/index.ejs +36 -1
  29. package/layout/layout.ejs +1 -1
  30. package/layout/notebooks.ejs +3 -1
  31. package/layout/notes.ejs +3 -1
  32. package/package.json +5 -2
  33. package/scripts/tags/index.js +1 -0
  34. package/scripts/tags/lib/mbti.js +169 -0
  35. package/source/css/_common/canonical.styl +9 -10
  36. package/source/css/_common/device.styl +12 -12
  37. package/source/css/_common/highlight.styl +0 -2
  38. package/source/css/_common/html.styl +2 -1
  39. package/source/css/_common/svg.styl +9 -1
  40. package/source/css/_components/layout.styl +11 -8
  41. package/source/css/_components/list.styl +55 -21
  42. package/source/css/_components/main.styl +2 -2
  43. package/source/css/_components/md.styl +0 -1
  44. package/source/css/_components/pages/article-story.styl +1 -3
  45. package/source/css/_components/partial/article-banner.styl +17 -11
  46. package/source/css/_components/partial/article-footer.styl +0 -1
  47. package/source/css/_components/partial/navbar.styl +10 -27
  48. package/source/css/_components/partial/paginator.styl +9 -11
  49. package/source/css/_components/pin-slider.styl +240 -0
  50. package/source/css/_components/sidebar/footer.styl +1 -1
  51. package/source/css/_components/sidebar/logo.styl +27 -1
  52. package/source/css/_components/sidebar/menu.styl +53 -30
  53. package/source/css/_components/sidebar/nav-area.styl +1 -1
  54. package/source/css/_components/sidebar/search.styl +50 -11
  55. package/source/css/_components/sidebar/sidebar.styl +32 -5
  56. package/source/css/_components/tag-plugins/banner.styl +2 -1
  57. package/source/css/_components/tag-plugins/chat.styl +3 -1
  58. package/source/css/_components/tag-plugins/folding.styl +1 -2
  59. package/source/css/_components/tag-plugins/friends.styl +1 -0
  60. package/source/css/_components/tag-plugins/friends_posts.styl +2 -1
  61. package/source/css/_components/tag-plugins/gallery.styl +1 -2
  62. package/source/css/_components/tag-plugins/grid.styl +1 -2
  63. package/source/css/_components/tag-plugins/image.styl +0 -2
  64. package/source/css/_components/tag-plugins/link.styl +0 -1
  65. package/source/css/_components/tag-plugins/mbti.styl +80 -0
  66. package/source/css/_components/tag-plugins/note.styl +1 -2
  67. package/source/css/_components/tag-plugins/okr.styl +1 -2
  68. package/source/css/_components/tag-plugins/sites.styl +0 -1
  69. package/source/css/_components/tag-plugins/timeline.styl +8 -6
  70. package/source/css/_components/widgets/components.styl +19 -7
  71. package/source/css/_components/widgets/ghuser.styl +3 -2
  72. package/source/css/_components/widgets/list.styl +20 -8
  73. package/source/css/_components/widgets/markdown.styl +5 -2
  74. package/source/css/_components/widgets/related.styl +6 -4
  75. package/source/css/_components/widgets/timeline.styl +1 -1
  76. package/source/css/_components/widgets/toc.styl +9 -6
  77. package/source/css/_components/widgets/widgets.styl +11 -10
  78. package/source/css/_custom.styl +5 -2
  79. package/source/css/_defines/const.styl +2 -2
  80. package/source/css/_defines/func.styl +49 -3
  81. package/source/css/_defines/theme_base.styl +22 -1
  82. package/source/css/_plugins/comments/artalk.styl +2 -2
  83. package/source/css/_plugins/comments/twikoo.styl +0 -2
  84. package/source/css/_plugins/tianli_gpt.styl +3 -0
  85. package/source/js/main.js +39 -17
  86. package/source/js/services/artalk_latest_comment.js +43 -1
  87. package/source/js/services/memos.js +12 -3
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: stellar-theme-dev
3
+ description: 主题仓库(hexo-theme-stellar)开发全流程:方案 → 开发 → 验证 → 提交 → 发版。当任务涉及本仓库主题文件、构建验证、知识库更新或主题发版时使用。
4
+ ---
5
+
6
+ # Stellar Theme Dev
7
+
8
+ 主题仓库(hexo-theme-stellar)开发全流程。开始前先读仓库根 `AGENTS.md`(唯一权威);本文件只给出执行顺序与完成条件。涉及主题代码、配置或行为问题时,先查 `docs/knowledge/` 对应领域,再读源码确认。
9
+
10
+ ## 流程
11
+
12
+ ### 1. 方案
13
+
14
+ - 先读 `AGENTS.md`「架构总览」(§6)与 `docs/knowledge/00-总览与安装配置/overview.md` 建立整体认知、定位改动范围。
15
+ - 在 `docs/designs/{YYYY-MM-DD}-{功能简称}/` 下建方案文档(模板 `docs/designs/_template/`,含 `spec.md` / `plan.md` / `checklist.md`)。
16
+ - 方案需写明:要解决的问题、技术方案与实现思路、影响范围、需同步的知识库页面与文档。
17
+ - 完成条件:方案文档已就位;改动范围与受影响维度已确认。
18
+
19
+ ### 2. 开发
20
+
21
+ - 新增功能覆盖全部相关维度:`layout/` + `scripts/` + `source/css/` + `source/js/`(如需)+ `languages/`(如需)+ `docs/`。
22
+ - 新增或重构标签插件先读 `docs/guides/tag-plugins-style-guide.md`;代码遵循 `AGENTS.md` 编码规范。
23
+ - 完成条件:改动文件清单覆盖全部相关维度;涉及行为或配置变更时已同步 `docs/knowledge/` 并在 `VERIFICATION.md` 登记。
24
+
25
+ ### 3. 验证
26
+
27
+ - UI 方面(样式、模板、前端交互等)改动量不大时无需验证,除非用户明确要求。
28
+
29
+ 命令按需执行:
30
+
31
+ - `scripts/` 有改动 → 必须在主工程(xaoxuu.com)执行 `npm run g` 全量验证(已含 `hexo clean && hexo generate && npx gulp minify`);`npm run s` 是按需渲染,不能替代。
32
+ - 新增/修改纯函数 → 补充单测并跑 `npm run check`(lint + 单测 + 知识库硬事实核查)。
33
+ - 知识库有改动 → `python3 docs/knowledge/tools/verify.py` 硬事实核查。
34
+ - UI 方面(样式、模板、前端交互等)改动量不大时无需自检流程,除非用户明确要求。
35
+ - 检查所有受影响页面类型(首页、文章页、Wiki 页等),验证结果记录在方案目录 `checklist.md`。
36
+ - 完成条件:应执行的命令全部通过;首页、文章页、Wiki 页等受影响页面类型均检查通过。
37
+
38
+ ### 4. 提交
39
+
40
+ - 任务完成后**不自动提交**:改动保留在工作区供用户审查。
41
+ - 仅在用户明确要求提交时执行;提交前须通过第 3 步中应执行的验证。
42
+ - 使用 Conventional Commits,一次提交对应一个需求点;如果几个需求任务逻辑相似,可以合并为一次提交;类型与格式见 `AGENTS.md`「Git 规范」(§7)。
43
+ - 改动只提交在本仓库(stellar);仅当用户明确要求时 push。
44
+ - 完成条件:改动已通过应执行的验证并保留在工作区;如用户要求提交,提交符合规范;如用户要求 push,已推送且远端为最新。
45
+
46
+ ### 5. 发版
47
+
48
+ - 由用户触发时执行:分析自上一 tag 起的 commit 确定版本号 → 在 `CHANGELOG.md` 写入对应非空章节(H2 版本号 + H3 分类)→ 向用户确认版本号与变更摘要 → `npm run release:dry -- <version>` 预演 → 正式发版。
49
+ - 详见 `docs/guides/release-process.md` 与 `AGENTS.md`「发版规范」(§8)。
50
+ - 完成条件:版本号与变更摘要已获用户确认;dry-run 通过后完成正式发版。
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.39.0
4
+
5
+ > 发布日期:2026-08-13
6
+
7
+ ### 新功能
8
+ - 左侧栏新增纯色卡片风格(`style.leftbar.ui-style: card`):实色 `var(--card)` 背景 + 中间档阴影,列表项、搜索条交互与右栏观感一致
9
+ - 列表页新增置顶内容轮播:首页/归档/标签/分类/专栏/wiki 列表自动渲染置顶文章或项目(无需额外配置),bar UI 统一、分页器图标更新
10
+ - 头像彩虹光环改为 CSS 锥形渐变(`style.gradient.avatar`),不再依赖外部图片
11
+
12
+ ### 修复
13
+ - 最新评论组件:正文转纯文本并截断、保留表情图并限高,修复侧栏布局
14
+ - 懒加载图片自动注册动态插入的图片
15
+ - 置顶轮播翻页按钮垂直居中
16
+ - integration 构建因 workspace 路径限制导致的 demo 检出失败
17
+
18
+ ### 样式
19
+ - 压缩页面顶部与侧边栏间距,胶囊元素改为正圆端帽(`style.radius.bar` 默认 8px → 12px)
20
+ - 左栏卡片阴影透明度调整为 0.05,card 风格组件背景统一为 `var(--block)` / `var(--block-border)`
21
+ - 侧栏底部间距改为仅手机端生效,PC 上下统一为 gap-margin
22
+ - linklist 多列项按 leftbar 风格显示背景色
23
+ - 导航链接移除 corner-shape 覆盖,与父容器保持一致
24
+
25
+ ### 其他
26
+ - 新增主题中文知识库(`docs/knowledge/`)、AI 协作规范与贡献指南
27
+ - integration 构建切换至 Hexo 8,并补充兼容适配方案
28
+ - 新增标签插件风格设计规范
29
+
30
+ ### 升级注意(配置变更与破坏性改动)
31
+ - 新增 `style.leftbar.ui-style`(`glass` / `card`,默认 `card`):未显式设置的站点升级后默认显示卡片风格,可用 `glass` 恢复原磨砂玻璃效果
32
+ - 新增 `style.gradient.avatar`(头像光环渐变色);移除 `style.animated_avatar.background`
33
+ - 移除 `style.paginator.prev` / `style.paginator.next`(分页器图标改为内置 SVG)
34
+
35
+ Full Changelog: [1.38.0...1.39.0](https://github.com/xaoxuu/hexo-theme-stellar/compare/1.38.0...1.39.0)
36
+
37
+ ## 1.38.0
38
+
39
+ > 发布日期:2026-08-11
40
+
41
+ ### 新功能
42
+ - 新增连续曲率圆角配置 `style.corner-shape`(默认 `superellipse(1.2)`):所有带圆角的位置统一使用曲率连续的 squircle 曲线,自动适配容器宽高;文章卡片与横幅的渐变模糊改为「同图模糊层」实现以兼容连续曲率(仅 Chromium 139+ 原生支持,其余浏览器自动回退普通圆角,可设 `round` 关闭)
43
+ - 左栏导航列表化,wiki 内页增加返回按钮与搜索条交互优化
44
+ - 菜单栏激活/悬停图标与圆点支持可配置角度的主题色渐变(`style.gradient.angle`)
45
+ - 首页支持可配置评论区(默认关闭,`site_tree.home.comments`)
46
+ - 新增 mbti 标签
47
+
48
+ ### 修复
49
+ - 补全 npm-publish workflow 的 GH_TOKEN,修复 GitHub Release 创建失败
50
+ - GitHub Release 正文不再包含 CHANGELOG 发布日期行
51
+ - 克隆站提示源站从 encoded 反解,防止批量替换域名误导
52
+ - 侧栏内部滚动容器组件 scrollreveal 不显示
53
+ - 仅当页面包含 toc 或评论时显示 toc 操作按钮
54
+ - wiki 封面「开始使用」按钮平滑滚动,#start 锚点贴顶定位
55
+
56
+ ### 重构
57
+ - 移除官方备用站提示的关闭按钮与配置项
58
+
59
+ ### 优化
60
+ - 动态数据组件缓存优化:同 URL 请求去重、memos 用户详情缓存、stale 兜底
61
+
62
+ ### 样式
63
+ - 侧栏光照效果覆盖相关卡片、返回胶囊与 widget 操作按钮
64
+ - 侧栏导航区边距调整
65
+ - 左栏激活书签等彩色图标使用主题色渐变
66
+ - 侧栏高亮项顶部叠加白色光照渐变与高光边
67
+ - 左侧栏底部留白调整为 32px
68
+ - 作者页与错误页侧栏不再显示时间线
69
+ - 移动端顶部导航吸顶距离调整为 8px
70
+
71
+ ### 升级注意(配置变更与破坏性改动)
72
+ - 新增 `style.corner-shape`(默认 `superellipse(1.2)`):连续曲率圆角仅 Chromium 139+ 生效,其余浏览器自动回退普通圆角;设置 `round` 可关闭
73
+ - 新增 `style.gradient.angle` 与 `site_tree.home.comments` 配置
74
+ - 移除 `canonical.closeEnable`、`canonical.closeText` 配置项:官方备用站提示不再支持手动关闭
75
+
76
+ Full Changelog: [1.37.0...1.38.0](https://github.com/xaoxuu/hexo-theme-stellar/compare/1.37.0...1.38.0)
77
+
3
78
  ## 1.37.0
4
79
 
5
80
  > 发布日期:2026-08-09
@@ -0,0 +1,155 @@
1
+ # 贡献指南
2
+
3
+ 感谢你考虑为 [Stellar](https://github.com/xaoxuu/hexo-theme-stellar) 贡献代码或文档!Stellar 是一个功能强大的综合型 Hexo 主题,内置博客、知识库、专栏、笔记四大系统,并提供丰富的标签组件与动态数据组件。
4
+
5
+ 本指南面向开发者,描述从环境准备、开发、验证到提交 PR 的完整流程;主题仓库的 AI 协作规范(唯一权威)见 [AGENTS.md](AGENTS.md)。使用上的问题请先查阅 [Wiki 文档](https://xaoxuu.com/wiki/stellar/)。
6
+
7
+ ## 仓库与职责边界
8
+
9
+ | 仓库 | 职责 |
10
+ |------|------|
11
+ | [hexo-theme-stellar](https://github.com/xaoxuu/hexo-theme-stellar) | 主题代码(`layout/`、`scripts/`、`source/`)、国际化(`languages/`)、主题文档(`docs/`)、版本发布 |
12
+ | [xaoxuu.com 主工程](https://github.com/xaoxuu/xaoxuu.com) | 博客站点,以 git submodule 方式引用本主题;只更新子模块指针,不包含主题源码 |
13
+ | [hexo-theme-stellar-docs](https://github.com/xaoxuu/hexo-theme-stellar-docs) | Wiki 文档内容(对应 xaoxuu.com/wiki/stellar/) |
14
+ | [hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples) | 官方示例工程(`blog` 博客场景、`docs` 文档场景),用于集成开发与验证 |
15
+
16
+ 主题无法单独运行,开发调试需要在主工程或官方 demo 工程中集成。
17
+
18
+ ## 环境准备
19
+
20
+ ```yaml
21
+ Hexo: 6.3.0 ~ latest(已验证至 8.1.2)
22
+ hexo-cli: 4.3.0 ~ latest
23
+ node: >= 22 # 建议选择 LTS 版本
24
+ npm: >= 10
25
+ ```
26
+
27
+ 推荐使用官方 demo 工程集成开发:
28
+
29
+ 1. Fork 本仓库并克隆到本地。
30
+ 2. 克隆 [hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples),将你的主题副本放到 `blog/themes/stellar`(或 `docs/themes/stellar`)。
31
+ 3. 在 demo 工程中执行 `npm install`,然后按需 `npx hexo generate` / `npx gulp minify` 构建验证。
32
+
33
+ 也可以使用 git submodule 将主题挂载到自己的博客或主工程:
34
+
35
+ ```bash
36
+ git submodule add https://github.com/<your-name>/hexo-theme-stellar.git themes/stellar
37
+ ```
38
+
39
+ ## 开发流程
40
+
41
+ 每个功能或修复请按以下顺序推进,产物保留在仓库中。
42
+
43
+ ### 1. 方案
44
+
45
+ 在 `docs/designs/{YYYY-MM-DD}-{功能简称}/` 下创建方案文档(模板见 `docs/designs/_template/`),包含 `spec.md` / `plan.md` / `checklist.md`,写明:
46
+
47
+ - 要解决的问题或新增的能力
48
+ - 技术方案和实现思路
49
+ - 影响范围(涉及哪些文件 / 模块)
50
+ - 需要同步的知识库页面与文档
51
+
52
+ ### 2. 实施
53
+
54
+ 新增功能覆盖全部相关维度:
55
+
56
+ | 维度 | 目录 | 说明 |
57
+ |------|------|------|
58
+ | 模板 | `layout/` | EJS 模板与可复用 partial |
59
+ | 服务端脚本 | `scripts/` | Hexo 标签 / 辅助函数 / 过滤器 |
60
+ | 样式 | `source/css/` | Stylus 样式 |
61
+ | 浏览器脚本 | `source/js/` | ES2015+ 源码(Gulp Babel 转译输出) |
62
+ | 国际化 | `languages/` | 新增文案时同步 |
63
+ | 文档 | `docs/` | 方案 + 执行计划 + 测试记录 + 知识库同步 |
64
+
65
+ ### 3. 文档与知识库同步
66
+
67
+ 涉及主题代码、配置或行为变化时,必须同步更新 `docs/knowledge/` 并在 `docs/knowledge/VERIFICATION.md` 登记;涉及逻辑变更(API、配置项、行为变化)同时更新仓库 Wiki。
68
+
69
+ ## 编码规范摘要
70
+
71
+ 完整规范见 `AGENTS.md` §6,核心要求:
72
+
73
+ - **EJS 模板**:`<%- %>` 输出非转义 HTML;变量声明用 `var`(IE8 兼容);2 空格缩进;HTML 属性双引号;复杂逻辑提取到 `helpers/`
74
+ - **Node 脚本**:CommonJS(`require()` / `module.exports`);文件头 `/* global hexo */` + `'use strict';`;2 空格缩进、双引号、分号结尾
75
+ - **Stylus 样式**:类名和文件名 `kebab-case`;变量在 `_defines/`,通用样式在 `_common/`,组件在 `_components/`;2 空格缩进
76
+ - **浏览器 JS**:ES2015+ 语法;避免直接操作 DOM,使用主题工具函数
77
+ - **不引入新构建系统**,保持 Hexo 原生 + Gulp 后处理;CSS 兼容 IE8,JS 兼容 ES2015+
78
+ - 新增或重构标签插件时,先阅读 `docs/guides/tag-plugins-style-guide.md`
79
+
80
+ ## 测试与验证
81
+
82
+ 在主题仓库根目录执行:
83
+
84
+ ```bash
85
+ npm run lint # ESLint
86
+ npm test # node:test 单测
87
+ python3 docs/knowledge/tools/verify.py # 知识库硬事实核查
88
+ npm run check # 一键执行 lint + 单测 + 知识库核查
89
+ ```
90
+
91
+ 修改 `scripts/` 后**必须**在主工程(xaoxuu.com)执行全量验证:
92
+
93
+ ```bash
94
+ npm run g # hexo clean && hexo generate && npx gulp minify
95
+ ```
96
+
97
+ > `npm run s`(本地按需渲染)不能替代全量验证。UI 方面(样式、模板、前端交互)改动量不大时无需执行自检流程,除非用户明确要求。
98
+
99
+ 新增 / 修改纯函数时请补充单元测试。
100
+
101
+ ## 提交规范
102
+
103
+ 使用 Conventional Commits,一次提交对应一个需求点(逻辑相似的需求可以合并):
104
+
105
+ ```
106
+ <type>(<scope>): <description>
107
+ ```
108
+
109
+ `type` 白名单(完整规则以 `ci/check-commit-msg.js` 为准):`feat` / `fix` / `refactor` / `perf` / `style` / `docs` / `chore` / `content` / `release`。
110
+
111
+ - 任务完成后**不自动提交**:改动保留在工作区供审查
112
+ - 只有明确要求时才 push
113
+ - 发版流程除外(见下文)
114
+
115
+ ## 提交 Pull Request
116
+
117
+ 按 [PULL_REQUEST_TEMPLATE.md](.github/PULL_REQUEST_TEMPLATE.md) 填写 PR:
118
+
119
+ - **变更说明**:描述解决的问题或新增能力,附相关 issue 编号(如有)
120
+ - **改动范围**:勾选涉及维度(`layout/`、`scripts/`、`source/css/`、`source/js/`、`languages/`、`docs/`)
121
+ - **验证清单**:确认 lint / 单测 / 全量构建 / 知识库同步等已通过
122
+
123
+ CI 会在 PR 上强制执行以下检查,全部通过后才可合并:
124
+
125
+ | 检查 | 内容 |
126
+ |------|------|
127
+ | Lint | ESLint |
128
+ | Unit tests | node:test 单测 |
129
+ | Conventional Commits | 提交信息符合规范 |
130
+ | Skill mirror sync | `.agents/` 与 `.claude/` 技能镜像一致 |
131
+ | Integration build | 官方 demo 全量构建(hexo generate)+ Gulp minify |
132
+ | Knowledge base verify | `docs/knowledge/tools/verify.py` 硬事实核查 |
133
+
134
+ ## 发版
135
+
136
+ 发版由维护者(或明确授权的贡献者)执行,一键全自动:
137
+
138
+ ```bash
139
+ npm run release -- <version> --yes
140
+ ```
141
+
142
+ 发版前需在 `CHANGELOG.md` 准备好对应版本的非空章节(H2 版本号 + H3 分类),脚本校验通过后自动更新版本号、推送并触发 CI 完成 npm 发布、tag 与 GitHub Release。完整流程见 [docs/guides/release-process.md](docs/guides/release-process.md)。
143
+
144
+ ## 社区与支持
145
+
146
+ - [Issues](https://github.com/xaoxuu/hexo-theme-stellar/issues):技术问题答疑、BUG 反馈
147
+ - [Discussions](https://github.com/xaoxuu/hexo-theme-stellar/discussions):论坛、相关话题讨论
148
+ - [探索号](https://xaoxuu.com/wiki/stellar/articles/):文章收录
149
+ - [社区支持页面](https://xaoxuu.com/wiki/stellar/contributors/):开发者列表、社区渠道与提问建议
150
+
151
+ 无论在什么渠道提问,建议先学习[「提问的智慧」](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md),描述清楚问题现象、尝试过程与报错信息,能帮助大家更高效地解决你的问题。
152
+
153
+ ## 许可
154
+
155
+ 本仓库基于 [MIT License](LICENSE) 开源。
package/README.md CHANGED
@@ -1,63 +1,84 @@
1
1
  # Stellar - 每个人的独立博客
2
2
 
3
- Stellar 是一个极为强大的综合型 Hexo 主题,包含博客系统、知识库系统、专栏系统、笔记系统,内置海量的标签和动态数据组件。
3
+ [![npm](https://img.shields.io/npm/v/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
4
+ [![license](https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/LICENSE)
5
+ [![stars](https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar)
6
+ [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
7
+ [![release](https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/releases)
8
+
9
+ Stellar 是一个功能强大的综合型 Hexo 主题,内置博客、知识库、专栏、笔记四大系统,并提供丰富的标签组件与动态数据组件,开箱即用。
4
10
 
5
11
  ## 亮点
6
12
 
7
- - 支持技术/生活文章布局风格,为不同类型的文章使用不同的风格。
8
- - 内置 wiki 系统,可以展示多个项目文档,或个人知识库。
9
- - 内置专栏系统,可以沉浸式阅读专栏系列文章。
10
- - 内置笔记系统,更方便梳理笔记。
11
- - 内置海量的灵活而强大的标签组件,互相之间还可以混搭嵌套。
12
- - 内置多种动态数据组件,静态博客更新不再依赖于重新部署。
13
- - 动态时间线(像发朋友圈一样发布短文,也可以订阅他人的时间线)
14
- - 自动化的动态友链(自动检测友链状态、打标签、友链文章订阅)
15
- - 渲染远程 markdown 文件(例如渲染项目仓库的 README 以减少重复工作)
16
- - 模块化设计,内置多种复用性极强的小组件,自由搭配布局。
17
- - 图片懒加载占位固定原图长宽比,不会发生高度跳变,体验更佳。
18
- - 支持一站多作者,可以为不同文章指定不同的作者,每位作者都有专属主页。
19
- - 社区文化:可订阅「探索号」时间线数据源获取社区用户的宝贵经验分享。
13
+ - 支持技术 / 生活两种文章布局风格,为不同类型的文章呈现不同的阅读体验。
14
+ - 内置 Wiki 系统,既可以展示多个项目文档,也可以作为个人知识库。
15
+ - 内置专栏系统,支持沉浸式阅读专栏系列文章。
16
+ - 内置笔记系统,方便地梳理和归档笔记。
17
+ - 内置大量灵活而强大的标签组件,互相之间可以自由混搭嵌套。
18
+ - 内置多种动态数据组件,让静态博客的内容更新不再依赖重新部署:
19
+ - 动态时间线:像发朋友圈一样发布短文,也可以订阅他人的时间线。
20
+ - 自动化友链:自动检测友链状态、打标签、订阅友链文章。
21
+ - 远程 Markdown 渲染:例如直接渲染项目仓库的 README,避免重复维护。
22
+ - 模块化设计,内置多种高复用性的小组件,可以自由搭配布局。
23
+ - 图片懒加载时按原图比例预留占位,不会出现高度跳变,体验更佳。
24
+ - 支持一站多作者,可以为不同文章指定不同作者,每位作者都有专属主页。
25
+ - 社区文化:可以订阅「探索号」时间线数据源,获取社区用户的宝贵经验分享。
26
+
27
+ 以上功能都可以在 [文档](https://xaoxuu.com/wiki/stellar/) 中找到详细的使用方法。
28
+
29
+ [![Star History Chart](https://star-history.dera.page/svg?repos=xaoxuu/hexo-theme-stellar&type=date&legend=top-left)](https://star-history.dera.page/#xaoxuu/hexo-theme-stellar&type=date&legend=top-left)
20
30
 
21
- 上述亮点都可以在 [文档](https://xaoxuu.com/wiki/stellar/) 中找到详细使用方法。
31
+ ## 示例与展示
22
32
 
23
- [![Stargazers over time](https://starchart.cc/xaoxuu/hexo-theme-stellar.svg)](https://starchart.cc/xaoxuu/hexo-theme-stellar)
33
+ - 示例源码:[hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/)(`blog` 博客场景、`docs` 文档场景)
34
+ - 展示墙:[使用 Stellar 主题的博客](https://xaoxuu.com/wiki/stellar/examples/)(30 个站点)
24
35
 
36
+ 部分使用站点:[杜老师说](https://dusays.com)、[Watermelonabc](https://watermelonabc.top/)、[妄司逸](https://blog.flechazo.icu/)
25
37
 
26
- ## Getting Started
38
+ ## 快速开始
27
39
 
28
- Check your environment:
40
+ ### 环境要求
29
41
 
30
42
  ```yaml
31
- Hexo: 6.3.0 ~ latest
43
+ Hexo: 6.3.0 ~ latest(已验证至 8.1.2)
32
44
  hexo-cli: 4.3.0 ~ latest
33
- node: 14.17.3 latest LTS # 建议选择 LTS 版本,过高的版本 hexo 还没有进行兼容。
34
- npm: 6.14.13 ~ latest
45
+ node: >= 22 # 建议选择 LTS 版本
46
+ npm: >= 10
35
47
  ```
36
48
 
37
- Edit your `_config.yml`:
49
+ ### 安装
38
50
 
39
- ```yaml
40
- theme: stellar
51
+ 在博客根目录执行:
52
+
53
+ ```bash
54
+ npm install hexo-theme-stellar
41
55
  ```
42
56
 
43
- Install Stellar in terminal:
57
+ ### 配置
44
58
 
45
- ```bash
46
- npm i hexo-theme-stellar
59
+ 编辑 `_config.yml`,启用主题:
60
+
61
+ ```yaml
62
+ theme: stellar
47
63
  ```
48
64
 
49
- ## Usage
65
+ ## 使用文档
50
66
 
51
- See docs: https://xaoxuu.com/wiki/stellar/
67
+ 完整文档请见:https://xaoxuu.com/wiki/stellar/
52
68
 
53
- > AI docs: https://deepwiki.com/xaoxuu/hexo-theme-stellar/
69
+ > AI 文档:https://deepwiki.com/xaoxuu/hexo-theme-stellar/
54
70
 
55
- ## Examples
71
+ - 更新日志:[CHANGELOG.md](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/CHANGELOG.md) · [Releases](https://github.com/xaoxuu/hexo-theme-stellar/releases)
56
72
 
57
- https://xaoxuu.com/wiki/stellar/examples/
73
+ ## 常用文档
58
74
 
59
- ## Feedback
75
+ - [标签组件](https://xaoxuu.com/wiki/stellar/tag-plugins/)
76
+ - [主题配置](https://xaoxuu.com/wiki/stellar/theme-settings/)
77
+ - [Wiki 系统](https://xaoxuu.com/wiki/stellar/wiki-settings/)
78
+ - [专栏与笔记](https://xaoxuu.com/wiki/stellar/topic/)
60
79
 
61
- Issues: https://github.com/xaoxuu/hexo-theme-stellar/issues/
80
+ ## 反馈
62
81
 
63
- Discussions: https://github.com/xaoxuu/hexo-theme-stellar/discussions/
82
+ - 提交 Issues:https://github.com/xaoxuu/hexo-theme-stellar/issues/
83
+ - 参与讨论:https://github.com/xaoxuu/hexo-theme-stellar/discussions/
84
+ - 贡献指南:[CONTRIBUTING.md](CONTRIBUTING.md) · [Wiki 贡献页](https://xaoxuu.com/wiki/stellar/contributors/)
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.37.0'
3
+ version: '1.39.0'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
6
  main_css: /css/main.css
@@ -17,8 +17,6 @@ preconnect:
17
17
  # 一旦设置源站地址,非源站地址将不会被SEO收录,并且访问时弹出提示
18
18
  # 如果访问地址不在备用站主机列表,则警告信息为非法克隆
19
19
  canonical:
20
- closeEnable: true # 是否显示关闭提示按钮
21
- closeText: 关闭提示 # 关闭提示按钮的文字描述
22
20
  originalHost: # 主站点域名主机,例如 xaoxuu.com
23
21
  officialHosts: # 官方主机列表,每行一个,例如 xaoxuu.vercel.app
24
22
  - localhost
@@ -40,7 +38,6 @@ logo:
40
38
 
41
39
  # 侧边栏主功能导航菜单
42
40
  menubar:
43
- columns: 4 # 一行多少个
44
41
  items: # 可按照自己需求增加,符合以下格式即可
45
42
  # id: 页面中高亮的 menu_id
46
43
  # theme: 高亮时的颜色,仅 svg 中 fill="currentColor" 时有效
@@ -77,6 +74,10 @@ site_tree:
77
74
  home:
78
75
  leftbar: welcome, recent
79
76
  rightbar:
77
+ # 首页评论区,默认不显示。可设为 true 使用全局评论服务,
78
+ # 或参考页面 front-matter 覆盖评论参数:
79
+ # service、comment_title、comment_id 及 beaudar/utterances/giscus/twikoo/waline/artalk 各服务参数。
80
+ comments:
80
81
  # 博客列表页配置
81
82
  index_blog:
82
83
  base_dir: blog # 只影响自动生成的页面路径
@@ -138,14 +139,14 @@ site_tree:
138
139
  author:
139
140
  base_dir: author # 只影响自动生成的页面路径
140
141
  menu_id: post
141
- leftbar: recent, timeline
142
- rightbar: timeline
142
+ leftbar: recent
143
+ rightbar:
143
144
  # 错误页配置
144
145
  error_page:
145
146
  menu_id: post
146
147
  '404': '/404.html'
147
- leftbar: recent, timeline
148
- rightbar: timeline
148
+ leftbar: recent
149
+ rightbar:
149
150
  # 其它自定义页面配置 layout: page
150
151
  page:
151
152
  leftbar: recent
@@ -530,6 +531,7 @@ data_cache:
530
531
  waline: 600
531
532
  artalk: 600
532
533
  memos: 600
534
+ memos-user: 86400
533
535
  sites: 86400
534
536
  friends: 86400
535
537
  friends_and_posts: 86400
@@ -668,10 +670,11 @@ style:
668
670
  card-l: 24px # 侧边栏、文章横幅位置的圆角
669
671
  card: 16px # 文章内大部分卡片的圆角
670
672
  card-s: 12px # 文章内小型卡片的圆角
671
- bar: 8px # 横条类元素的圆角
673
+ bar: 12px # 横条类元素的圆角
672
674
  image-l: 24px # 非技术类文章插图圆角
673
675
  image: 16px # 技术类文章插图圆角
674
676
  image-s: 8px # 评论区图片圆角(部分评论支持)
677
+ corner-shape: superellipse(1.5) # 连续曲率圆角(仅 Chromium 139+ 支持,其余浏览器自动回退普通圆角):superellipse(1.x) 开启,round 关闭
675
678
  color:
676
679
  # 主题色配置(不会根据明暗动态调整,请设置为通用的颜色)
677
680
  theme: 'hsl(192 98% 55%)' # 主题色
@@ -679,7 +682,6 @@ style:
679
682
  link: 'hsl(207 90% 54%)' # 超链接颜色
680
683
  animated_avatar:
681
684
  animate: auto # auto, always
682
- background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
683
685
  codeblock:
684
686
  scrollbar: 4px
685
687
  highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.9/build/styles/atom-one-dark.min.css
@@ -688,7 +690,11 @@ style:
688
690
  error: 加载失败,请稍后重试。
689
691
  gradient: # https://webgradients.com/
690
692
  start: 'linear-gradient(to right, hsl(215, 95%, 64%), hsl(195, 95%, 60%), hsl(165, 95%, 56%), hsl(165, 95%, 56%), hsl(195 95% 60%), hsl(215, 95%, 64%))'
693
+ searchbar: 'linear-gradient(to right, #04f3ff, #08ffc6, #ddf730, #ffbd19, #ff1fe0, #c418ff, #3b5bff, #04f3ff)' # 搜索条激活时底部横条的渐变色(彩虹,收尾经蓝色平滑过渡)
694
+ avatar: 'conic-gradient(from 0deg, #04f3ff, #08ffc6, #ddf730, #ffbd19, #ff1fe0, #c418ff, #3b5bff, #04f3ff)' # 头像 hover 时旋转光环的渐变色(彩虹,首尾同色保证旋转无缝)
695
+ angle: 210deg # 主题色渐变的角度(0=向上,顺时针;225deg = 右上角 → 左下角)
691
696
  leftbar:
697
+ ui-style: card # glass(背景图+磨砂玻璃效果)/ card(纯色卡片:var(--card) 实色背景 + 中间阴影)
692
698
  # 可以设置:纯色/渐变色/图片作为背景
693
699
  # 设置为纯色时,可以分别设置浅色和深色模式背景色
694
700
  background-color-light: var(--card) # var(--block) #'rgb(#C3C3C3)'
@@ -697,9 +703,6 @@ style:
697
703
  blur-px: 100px
698
704
  blur-bg: var(--bg-a60)
699
705
  background-opacity: 0.8
700
- paginator:
701
- prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg
702
- next: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/064b95430caf4.svg
703
706
  error_page: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/404/1c830bfcd517d.svg
704
707
  site: # 使用 background-image 后,blur 设置才有效
705
708
  # background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.14/image/site-bg1@small.webp)
package/_data/icons.yml CHANGED
@@ -2,6 +2,9 @@
2
2
  # - 如果更换了图标之后变得很大,请把原本的 class 复制到新的图标中
3
3
  # - 如果更换了图标之后视觉轻微偏移,可以通过 style="xx" 来修正
4
4
 
5
+ # 翻页
6
+ solar:double-alt-arrow-left-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --><path fill="currentColor" d="M17.75 19a.75.75 0 0 1-1.32.488l-6-7a.75.75 0 0 1 0-.976l6-7A.75.75 0 0 1 17.75 5z" opacity=".5"/><path fill="currentColor" fill-rule="evenodd" d="M13.488 19.57a.75.75 0 0 0 .081-1.058L7.988 12l5.581-6.512a.75.75 0 1 0-1.138-.976l-6 7a.75.75 0 0 0 0 .976l6 7a.75.75 0 0 0 1.057.082" clip-rule="evenodd"/></svg>
7
+ solar:double-alt-arrow-right-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --><path fill="currentColor" d="M6.25 19a.75.75 0 0 0 1.32.488l6-7a.75.75 0 0 0 0-.976l-6-7A.75.75 0 0 0 6.25 5z" opacity=".5"/><path fill="currentColor" fill-rule="evenodd" d="M10.512 19.57a.75.75 0 0 1-.081-1.058L16.012 12l-5.581-6.512a.75.75 0 1 1 1.139-.976l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.058.082" clip-rule="evenodd"/></svg>
5
8
 
6
9
  solar:documents-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M5.879 2.879C5 3.757 5 5.172 5 8v8c0 2.828 0 4.243.879 5.121C6.757 22 8.172 22 11 22h2c2.828 0 4.243 0 5.121-.879C19 20.243 19 18.828 19 16V8c0-2.828 0-4.243-.879-5.121C17.243 2 15.828 2 13 2h-2c-2.828 0-4.243 0-5.121.879M8.25 17a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75M9 12.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5zM8.25 9A.75.75 0 0 1 9 8.25h6a.75.75 0 0 1 0 1.5H9A.75.75 0 0 1 8.25 9" clip-rule="evenodd"/><path fill="currentColor" d="M5.235 4.058C5 4.941 5 6.177 5 8v8c0 1.823 0 3.058.235 3.942L5 19.924c-.975-.096-1.631-.313-2.121-.803C2 18.243 2 16.828 2 14v-4c0-2.829 0-4.243.879-5.121c.49-.49 1.146-.707 2.121-.803zm13.53 15.884C19 19.058 19 17.822 19 16V8c0-1.823 0-3.059-.235-3.942l.235.018c.975.096 1.631.313 2.121.803C22 5.757 22 7.17 22 9.999v4c0 2.83 0 4.243-.879 5.122c-.49.49-1.146.707-2.121.803z" opacity=".5"/></svg>
7
10
  solar:chat-square-like-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262" opacity=".5"/><path fill="currentColor" d="M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502c-.329 0-.556-.167-1.01-.502"/></svg>
package/languages/en.yml CHANGED
@@ -68,3 +68,40 @@ symbol:
68
68
  colon: ": "
69
69
  brackets_l: "("
70
70
  brackets_r: ")"
71
+
72
+ tag_plugins:
73
+ mbti:
74
+ title: 'My MBTI Type: %s (%s)'
75
+ types:
76
+ INTJ: Architect
77
+ INTP: Logician
78
+ ENTJ: Commander
79
+ ENTP: Debater
80
+ INFJ: Advocate
81
+ INFP: Mediator
82
+ ENFJ: Protagonist
83
+ ENFP: Campaigner
84
+ ISTJ: Logistician
85
+ ISFJ: Defender
86
+ ESTJ: Executive
87
+ ESFJ: Consul
88
+ ISTP: Virtuoso
89
+ ISFP: Adventurer
90
+ ESTP: Entrepreneur
91
+ ESFP: Entertainer
92
+ traits:
93
+ energy:
94
+ left: Extraverted
95
+ right: Introverted
96
+ mind:
97
+ left: Intuitive
98
+ right: Observant
99
+ nature:
100
+ left: Thinking
101
+ right: Feeling
102
+ tactics:
103
+ left: Judging
104
+ right: Prospecting
105
+ identity:
106
+ left: Assertive
107
+ right: Turbulent
@@ -68,3 +68,40 @@ symbol:
68
68
  colon: ":"
69
69
  brackets_l: "("
70
70
  brackets_r: ")"
71
+
72
+ tag_plugins:
73
+ mbti:
74
+ title: 我的 MBTI 人格:%s(%s)
75
+ types:
76
+ INTJ: 架构师
77
+ INTP: 逻辑学家
78
+ ENTJ: 指挥官
79
+ ENTP: 辩论家
80
+ INFJ: 提倡者
81
+ INFP: 调停者
82
+ ENFJ: 主人公
83
+ ENFP: 活动家
84
+ ISTJ: 物流师
85
+ ISFJ: 守卫者
86
+ ESTJ: 管理者
87
+ ESFJ: 执政官
88
+ ISTP: 鉴赏家
89
+ ISFP: 冒险家
90
+ ESTP: 企业家
91
+ ESFP: 表演者
92
+ traits:
93
+ energy:
94
+ left: 外向
95
+ right: 内向
96
+ mind:
97
+ left: 天马行空
98
+ right: 求真务实
99
+ nature:
100
+ left: 理性思考
101
+ right: 情感细腻
102
+ tactics:
103
+ left: 运筹帷幄
104
+ right: 随机应变
105
+ identity:
106
+ left: 自信果断
107
+ right: 情绪易波动
@@ -68,3 +68,40 @@ symbol:
68
68
  colon: ":"
69
69
  brackets_l: "("
70
70
  brackets_r: ")"
71
+
72
+ tag_plugins:
73
+ mbti:
74
+ title: 我的 MBTI 人格:%s(%s)
75
+ types:
76
+ INTJ: 架構師
77
+ INTP: 邏輯學家
78
+ ENTJ: 指揮官
79
+ ENTP: 辯論家
80
+ INFJ: 提倡者
81
+ INFP: 調停者
82
+ ENFJ: 主人公
83
+ ENFP: 活動家
84
+ ISTJ: 物流師
85
+ ISFJ: 守衛者
86
+ ESTJ: 管理者
87
+ ESFJ: 執政官
88
+ ISTP: 鑑賞家
89
+ ISFP: 冒險家
90
+ ESTP: 企業家
91
+ ESFP: 表演者
92
+ traits:
93
+ energy:
94
+ left: 外向
95
+ right: 內向
96
+ mind:
97
+ left: 天馬行空
98
+ right: 求真務實
99
+ nature:
100
+ left: 理性思考
101
+ right: 情感細膩
102
+ tactics:
103
+ left: 運籌帷幄
104
+ right: 隨機應變
105
+ identity:
106
+ left: 自信果斷
107
+ right: 情緒易波動