hexo-theme-stellar 1.40.0 → 1.42.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 (146) hide show
  1. package/.claude/skills/stellar-theme-dev/SKILL.md +1 -2
  2. package/CHANGELOG.md +90 -0
  3. package/CONTRIBUTING.md +2 -1
  4. package/README.md +50 -21
  5. package/README_EN.md +113 -0
  6. package/_config.yml +40 -12
  7. package/_data/icons.yml +248 -37
  8. package/languages/en.yml +6 -0
  9. package/languages/zh-CN.yml +6 -0
  10. package/languages/zh-TW.yml +6 -0
  11. package/layout/_partial/comments/artalk/script.ejs +25 -8
  12. package/layout/_partial/comments/beaudar/script.ejs +1 -0
  13. package/layout/_partial/comments/twikoo/script.ejs +1 -0
  14. package/layout/_partial/comments/utterances/script.ejs +1 -0
  15. package/layout/_partial/comments/waline/script.ejs +1 -0
  16. package/layout/_partial/cover/index.ejs +0 -3
  17. package/layout/_partial/head.ejs +43 -7
  18. package/layout/_partial/main/article/article_tags.ejs +16 -0
  19. package/layout/_partial/main/navbar/article_banner.ejs +33 -20
  20. package/layout/_partial/main/notebook/note_card.ejs +1 -1
  21. package/layout/_partial/main/notebook/paginator.ejs +2 -2
  22. package/layout/_partial/main/pin_slider.ejs +61 -30
  23. package/layout/_partial/main/post_list/latest_post_card.ejs +25 -0
  24. package/layout/_partial/main/post_list/paginator.ejs +2 -2
  25. package/layout/_partial/main/post_list/post_card.ejs +16 -64
  26. package/layout/_partial/main/post_list/topic_card.ejs +26 -5
  27. package/layout/_partial/menubtn.ejs +2 -2
  28. package/layout/_partial/scripts/bootstrap.ejs +35 -0
  29. package/layout/_partial/scripts/defines.ejs +27 -2
  30. package/layout/_partial/scripts.ejs +39 -7
  31. package/layout/_partial/sidebar/logo.ejs +1 -1
  32. package/layout/_partial/sidebar/menu.ejs +1 -1
  33. package/layout/_partial/sidebar/search.ejs +1 -1
  34. package/layout/_partial/widgets/author.ejs +1 -1
  35. package/layout/_partial/widgets/components/link.ejs +2 -2
  36. package/layout/_partial/widgets/ghuser.ejs +1 -1
  37. package/layout/_partial/widgets/related.ejs +1 -1
  38. package/layout/_partial/widgets/toc.ejs +3 -3
  39. package/layout/_partial/widgets/tree.ejs +1 -1
  40. package/layout/_plugins/adaptive_text.ejs +11 -0
  41. package/layout/_plugins/copycode.ejs +2 -2
  42. package/layout/_plugins/fancybox.ejs +4 -2
  43. package/layout/_plugins/mermaid.ejs +3 -2
  44. package/layout/_plugins/scrollreveal.ejs +22 -16
  45. package/layout/_plugins/search/local_search.ejs +4 -3
  46. package/layout/_plugins/swiper.ejs +2 -1
  47. package/layout/categories.ejs +1 -1
  48. package/layout/index.ejs +10 -2
  49. package/layout/index_topic.ejs +4 -4
  50. package/layout/page.ejs +3 -0
  51. package/layout/tags.ejs +1 -0
  52. package/package.json +3 -3
  53. package/scripts/events/lib/doc_tree.js +12 -208
  54. package/scripts/events/lib/notebooks.js +8 -148
  55. package/scripts/events/lib/utils.js +10 -1
  56. package/scripts/filters/index.js +1 -0
  57. package/scripts/filters/lib/img_lazyload.js +4 -0
  58. package/scripts/filters/lib/img_onerror.js +4 -0
  59. package/scripts/filters/lib/md_table.js +46 -0
  60. package/scripts/generators/search.js +12 -18
  61. package/scripts/generators/stellar-icons.js +47 -0
  62. package/scripts/helpers/ai_label.js +29 -0
  63. package/scripts/helpers/icon.js +2 -2
  64. package/scripts/helpers/json_ld.js +10 -13
  65. package/scripts/helpers/related_posts.js +0 -7
  66. package/scripts/helpers/seo.js +9 -0
  67. package/scripts/helpers/subtitle.js +8 -0
  68. package/scripts/lib/ai_label.js +55 -0
  69. package/scripts/lib/doc_tree.js +267 -0
  70. package/scripts/lib/notebooks.js +181 -0
  71. package/scripts/lib/search_index.js +82 -0
  72. package/scripts/lib/seo.js +79 -0
  73. package/scripts/lib/subtitle.js +24 -0
  74. package/scripts/tags/lib/about.js +2 -2
  75. package/scripts/tags/lib/albums.js +1 -1
  76. package/scripts/tags/lib/banner.js +5 -4
  77. package/scripts/tags/lib/chat.js +49 -49
  78. package/scripts/tags/lib/copy.js +1 -1
  79. package/scripts/tags/lib/friends.js +1 -1
  80. package/scripts/tags/lib/gallery.js +1 -1
  81. package/scripts/tags/lib/hashtag.js +1 -1
  82. package/scripts/tags/lib/image.js +3 -3
  83. package/scripts/tags/lib/posters.js +1 -1
  84. package/scripts/tags/lib/sites.js +2 -2
  85. package/source/css/_common/base.styl +5 -9
  86. package/source/css/_common/cover-overlay.styl +111 -0
  87. package/source/css/_common/device.styl +3 -3
  88. package/source/css/_common/title.styl +17 -0
  89. package/source/css/_components/layout.styl +9 -13
  90. package/source/css/_components/list.styl +135 -64
  91. package/source/css/_components/main.styl +2 -2
  92. package/source/css/_components/md-table.styl +23 -0
  93. package/source/css/_components/pages/archives.styl +5 -22
  94. package/source/css/_components/pages/article-story.styl +5 -14
  95. package/source/css/_components/partial/article-banner.styl +61 -37
  96. package/source/css/_components/partial/article-tags.styl +13 -0
  97. package/source/css/_components/partial/bread-nav.styl +19 -12
  98. package/source/css/_components/partial/navbar.styl +11 -3
  99. package/source/css/_components/partial/post-panel.styl +76 -0
  100. package/source/css/_components/pin-slider.styl +38 -41
  101. package/source/css/_components/sidebar/footer.styl +1 -1
  102. package/source/css/_components/sidebar/logo.styl +2 -2
  103. package/source/css/_components/sidebar/search.styl +25 -5
  104. package/source/css/_components/sidebar/sidebar.styl +7 -7
  105. package/source/css/_components/tag-plugins/banner.styl +53 -11
  106. package/source/css/_components/tag-plugins/friends_posts.styl +5 -86
  107. package/source/css/_components/tag-plugins/gallery.styl +3 -0
  108. package/source/css/_components/tag-plugins/read/paper.styl +3 -3
  109. package/source/css/_components/tag-plugins/read/reel.styl +4 -4
  110. package/source/css/_components/tag-plugins/table.styl +16 -11
  111. package/source/css/_components/tag-plugins/timeline.styl +4 -0
  112. package/source/css/_components/widgets/components.styl +6 -0
  113. package/source/css/_components/widgets/list.styl +6 -0
  114. package/source/css/_components/widgets/timeline.styl +2 -2
  115. package/source/css/_components/widgets/toc.styl +13 -7
  116. package/source/css/_components/widgets/widgets.styl +8 -7
  117. package/source/css/_custom.styl +9 -21
  118. package/source/css/_defines/func.styl +28 -3
  119. package/source/css/_plugins/index.styl +0 -18
  120. package/source/css/_plugins/lazyload.styl +1 -0
  121. package/source/css/{_plugins/comments → comments}/artalk.styl +4 -0
  122. package/source/css/{_plugins/comments → comments}/twikoo.styl +4 -0
  123. package/source/css/{_plugins → plugins}/mermaid.styl +3 -0
  124. package/source/css/{_plugins → plugins}/swiper.styl +5 -1
  125. package/source/js/color.js +325 -0
  126. package/source/js/icons.js +60 -0
  127. package/source/js/main.js +115 -1
  128. package/source/js/plugins/adaptive-text.js +146 -0
  129. package/source/js/search/highlight.js +82 -0
  130. package/source/js/search/local-search.js +294 -103
  131. package/source/js/services/friends_and_posts.js +1 -1
  132. package/source/js/services/timeline.js +1 -1
  133. package/source/js/services/weibo.js +3 -3
  134. package/source/js/services.js +179 -0
  135. package/source/js/tagtree.js +29 -0
  136. package/source/js/theme.js +61 -0
  137. package/{layout/_partial/scripts/utils.ejs → source/js/utils.js} +27 -11
  138. package/layout/_partial/cover/post_cover.ejs +0 -37
  139. package/layout/_partial/scripts/services.ejs +0 -178
  140. package/layout/_partial/scripts/sidebar.ejs +0 -25
  141. package/layout/_partial/scripts/tagtree.ejs +0 -29
  142. package/layout/_partial/scripts/theme.ejs +0 -67
  143. /package/source/css/{_plugins/comments → comments}/beaudar.styl +0 -0
  144. /package/source/css/{_plugins/comments → comments}/utterances.styl +0 -0
  145. /package/source/css/{_plugins/comments → comments}/waline.styl +0 -0
  146. /package/source/css/{_plugins → plugins}/fancybox.styl +0 -0
@@ -24,8 +24,6 @@ description: 主题仓库(hexo-theme-stellar)开发全流程:方案 →
24
24
 
25
25
  ### 3. 验证
26
26
 
27
- - UI 方面(样式、模板、前端交互等)改动量不大时无需验证,除非用户明确要求。
28
-
29
27
  命令按需执行:
30
28
 
31
29
  - `scripts/` 有改动 → 必须在主工程(xaoxuu.com)执行 `npm run g` 全量验证(已含 `hexo clean && hexo generate && npx gulp minify`);`npm run s` 是按需渲染,不能替代。
@@ -46,5 +44,6 @@ description: 主题仓库(hexo-theme-stellar)开发全流程:方案 →
46
44
  ### 5. 发版
47
45
 
48
46
  - 由用户触发时执行:分析自上一 tag 起的 commit 确定版本号 → 在 `CHANGELOG.md` 写入对应非空章节(H2 版本号 + H3 分类)→ 向用户确认版本号与变更摘要 → `npm run release:dry -- <version>` 预演 → 正式发版。
47
+ - 发版前核对:`npm run check` 内含提交登记完整性检查,自上一 tag 起涉及主题代码/配置/行为变化的非合并提交须在 `docs/knowledge/VERIFICATION.md`「提交登记(发版前核对)」表登记短 SHA(纯文档 / CI 改动无需登记);缺失先补登记再发版。
49
48
  - 详见 `docs/guides/release-process.md` 与 `AGENTS.md`「发版规范」(§8)。
50
49
  - 完成条件:版本号与变更摘要已获用户确认;dry-run 通过后完成正式发版。
package/CHANGELOG.md CHANGED
@@ -1,5 +1,95 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.42.0
4
+
5
+ > 发布日期:2026-08-16
6
+
7
+ ### 新功能
8
+ - 文章卡片新增 `article.card_style`(`hero` / `classic`):hero 全图文字封面卡片(有 cover 时标题 + 单行小字,文字区固定底部),classic 普通卡片;hero 与置顶轮播统一小字取值 `subtitle()`(`subtitle` > `description` > excerpt 前 50 字)
9
+ - 背景图/背景色上方文字颜色自适应(`plugins.adaptive_text`,默认开启):`theme` / `contrast` / `split` 三种模式,按背景平均色计算并写入 `--text-banner` / `--text-banner-theme`,接入文章封面、专栏最新文章卡片、置顶轮播、页顶横幅与 `{% banner %}` 标签
10
+ - 专栏列表页重构为上下布局:标题 + 描述 + 全宽最新文章卡片 + 其他文章列表,抽出 `.post-panel` 公共组件(友链文章订阅同步复用)
11
+
12
+ ### 修复
13
+ - 标签行负边距导致移动端页面横向溢出(#688)
14
+ - albums/posters 在 Firefox/Safari 标题竖排与遮罩消失问题(#689)
15
+ - Babel 转译将 `sidebar` 全局改名导致侧边栏失效
16
+ - 作者归档页横幅下块贴顶;页面顶部横幅黑色蒙版始终显示并贴边
17
+ - Safari 下顶部横幅与列表封面方角漏出(`isolation: isolate` + `translateZ(0)` + clip-path 兜底)
18
+ - banner 导航激活项 blur 导致 hover 圆角丢失
19
+ - TOC 回到顶部/参与讨论图标改为内联并修复占位符布局
20
+ - 轮播区/文章封面/页顶横幅/`{% banner %}` 图片角落跟随连续曲率圆角配置
21
+ - timeline 页脚评论图标尺寸与文字对齐
22
+
23
+ ### 样式
24
+ - 文章卡片标签 `#` 前缀替换为 hashtag 图标
25
+ - banner hover 动画对齐封面(背景图缩放 1.05 + 变暗),封面渐变模糊层增加黑色蒙版
26
+ - 统一封面、轮播、页顶横幅与 banner 标签背景图覆盖层观感(`cover-overlay()`)
27
+ - 左栏「所有项目」返回胶囊默认背景复用目录树激活光照效果
28
+ - 间距令牌重构为 `--gap-base` / `--gap-page`:组件内部间距固定 16px,页面级留白随断点分档(16/32px),侧边栏贴边时四周间距一致
29
+ - 右栏在侧边栏基础宽度上单独加宽(新增 `--rightbar-width-extra`,默认 32px)
30
+ - 右栏 `.l_right .widgets` 桌面端 padding 归零,折叠抽屉保留 16px 0
31
+ - 折叠抽屉位移改为跟随自身宽度(`calc(100% + inset*2)`),修复右栏加宽后收拢仍露边
32
+
33
+ ### 重构
34
+ - 移除已失效的 auto_banner(Unsplash 自动横幅)与 `poster` 配置
35
+ - 页面横幅上块重构为显式两行结构(面包屑 + 阅读时长/AI 标签 + 日期行)
36
+ - 评论数图标统一使用 `default:tocomment`,移除 `weibo:comment`
37
+
38
+ ### 其他
39
+ - 移除知识库合并版 `知识库全量.md`,知识库以领域页面为唯一事实源
40
+ - 新增 AI 规范引用一致性检查(check-spec-refs)与发版前提交登记完整性检查(随 `npm run check` 执行)
41
+
42
+ ### 升级注意(配置变更与破坏性改动)
43
+ - 移除 `article.auto_banner`(Unsplash 自动横幅已失效)与文章 front-matter `poster`(`headline` / `topic` / `caption`);`poster.color` / `banner_info.color` 显式文字颜色不再生效,由自适应文字颜色接管
44
+ - 新增 `article.card_style`(`hero` 默认 / `classic`):未显式设置的站点保持 hero 卡片样式
45
+ - 新增 `plugins.adaptive_text`(默认 `enable: true`):页面存在 `[data-text-adaptive]` 元素时才按需加载,文字颜色默认随背景自适应
46
+ - 删除间距令牌 `--gap-margin` / `--gap-padding` / `--gap-max`,替换为 `--gap-base`(组件内部间距)与 `--gap-page`(页面级留白);引用旧令牌的自定义 CSS 需迁移
47
+ - `weibo:comment` 图标已移除,评论数图标统一使用 `default:tocomment`;自定义中引用了 `weibo:comment` 的站点请改用 `default:tocomment`
48
+ - 知识库合并版 `知识库全量.md` 移除(RAG 可直接索引领域页面)
49
+
50
+ Full Changelog: [1.41.0...main](https://github.com/xaoxuu/hexo-theme-stellar/compare/1.41.0...main)
51
+
52
+ ## 1.41.0
53
+
54
+ > 发布日期:2026-08-15
55
+
56
+ ### 新功能
57
+ - 本地搜索:搜索结果按章节拆分展示,点击直达章节锚点,目标页自动高亮关键词(`?kw=` 定位)
58
+ - 本地搜索:懒加载与缓存 TTL(`search.local_search.lazy_load` 默认开启、`cache_ttl` 默认 1 天)
59
+ - navbar 未吸顶时采用卡片样式,吸顶后恢复玻璃效果
60
+ - 文章末尾新增标签行(`article.tags`,默认开启)
61
+ - 内容表格统一铺满滚动与圆角边框
62
+ - 文章新增 AI 成分标签(front-matter `ai_label: manual | polished | generated | reviewed`,`article.ai_label` 配置文案与颜色,默认不渲染)
63
+
64
+ ### 修复
65
+ - 移动端顶栏伸缩时 navbar 玻璃效果误消失
66
+ - 导航激活指示改为纯 CSS 小圆点,修复异步图标替换引起的抖动/闪烁
67
+ - 恢复标题锚点等页内链接平滑滚动
68
+ - 评论表情面板图片不再误触发 fancybox 弹窗
69
+ - 修正 toc 底部操作按钮分隔线选择器
70
+ - 修复 artalk 邮件链接无法定位评论区
71
+ - SEO 元数据修复:wiki 标题去重、`og:site_name`、JSON-LD 图片/描述回退、分页标题
72
+
73
+ ### 样式
74
+ - 调整 navbar 与 float-panel 按钮尺寸与间距(40px、gap 4px、底部 inset ×1)
75
+
76
+ ### 性能
77
+ - 按需加载与外置缓存优化,减小 html/css/js 体积
78
+ - 图标按命名空间异步加载,首屏关键图标保持内联
79
+ - 构建期脚本去重遍历与过滤器短路(generate 阶段优化)
80
+
81
+ ### 重构
82
+ - 主题内置图标统一迁移到 `_data/icons.yml`
83
+ - 图标键统一为语义化命名空间(`default:` / 标签名命名空间),消除 `solar:`、`ph:`、`bxs:` 前缀
84
+
85
+ ### 升级注意(配置变更与破坏性改动)
86
+ - 新增 `article.tags`(默认 `true`):文章末尾显示标签行,不需要时设为 `false`
87
+ - 新增 `article.ai_label` 与 front-matter `ai_label` 字段:不设置时不渲染,历史文章零变化
88
+ - 新增 `search.local_search.lazy_load`(默认 `true`)与 `cache_ttl`(默认 `86400`)
89
+ - 破坏性变更:图标键为公开接口,`solar:*` 等旧前缀键已全部改名;站点若在 `source/_data/icons.yml` 覆盖或 `_config.stellar.yml` 引用旧键需同步改名(主工程已确认无此类覆盖)
90
+
91
+ Full Changelog: [1.40.0...1.41.0](https://github.com/xaoxuu/hexo-theme-stellar/compare/1.40.0...1.41.0)
92
+
3
93
  ## 1.40.0
4
94
 
5
95
  > 发布日期:2026-08-14
package/CONTRIBUTING.md CHANGED
@@ -68,7 +68,7 @@ git submodule add https://github.com/<your-name>/hexo-theme-stellar.git themes/s
68
68
 
69
69
  ## 编码规范摘要
70
70
 
71
- 完整规范见 `AGENTS.md` §6,核心要求:
71
+ 完整规范见 `AGENTS.md` §4,核心要求:
72
72
 
73
73
  - **EJS 模板**:`<%- %>` 输出非转义 HTML;变量声明用 `var`(IE8 兼容);2 空格缩进;HTML 属性双引号;复杂逻辑提取到 `helpers/`
74
74
  - **Node 脚本**:CommonJS(`require()` / `module.exports`);文件头 `/* global hexo */` + `'use strict';`;2 空格缩进、双引号、分号结尾
@@ -128,6 +128,7 @@ CI 会在 PR 上强制执行以下检查,全部通过后才可合并:
128
128
  | Unit tests | node:test 单测 |
129
129
  | Conventional Commits | 提交信息符合规范 |
130
130
  | Skill mirror sync | `.agents/` 与 `.claude/` 技能镜像一致 |
131
+ | Spec refs | AGENTS.md 章节引用与关键措辞一致性 |
131
132
  | Integration build | 官方 demo 全量构建(hexo generate)+ Gulp minify |
132
133
  | Knowledge base verify | `docs/knowledge/tools/verify.py` 硬事实核查 |
133
134
 
package/README.md CHANGED
@@ -1,39 +1,60 @@
1
1
  # Stellar - 每个人的独立博客
2
2
 
3
+ [简体中文](README.md) · [English](README_EN.md)
4
+
3
5
  [![npm](https://img.shields.io/npm/v/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
4
6
  [![license](https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/LICENSE)
5
7
  [![stars](https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar)
6
8
  [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
7
9
  [![release](https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/releases)
8
10
 
9
- Stellar 是一个功能强大的综合型 Hexo 主题,内置博客、知识库、专栏、笔记四大系统,并提供丰富的标签组件与动态数据组件,开箱即用。
11
+ Stellar 是一个「博客 + 知识库一体」的 Hexo 主题:简约商务美学之下,内置博客、Wiki、专栏、笔记四大内容系统与丰富的标签、动态数据组件,开箱即用。
10
12
 
11
- ## 亮点
13
+ 可以只把它当作一个轻博客主题使用——安装启用即可写文章;Wiki 知识库、专栏、笔记与动态数据组件都按需启用,随着你的内容需求自然生长。
12
14
 
13
- - 支持技术 / 生活两种文章布局风格,为不同类型的文章呈现不同的阅读体验。
14
- - 内置 Wiki 系统,既可以展示多个项目文档,也可以作为个人知识库。
15
- - 内置专栏系统,支持沉浸式阅读专栏系列文章。
16
- - 内置笔记系统,方便地梳理和归档笔记。
17
- - 内置大量灵活而强大的标签组件,互相之间可以自由混搭嵌套。
18
- - 内置多种动态数据组件,让静态博客的内容更新不再依赖重新部署:
19
- - 动态时间线:像发朋友圈一样发布短文,也可以订阅他人的时间线。
20
- - 自动化友链:自动检测友链状态、打标签、订阅友链文章。
21
- - 远程 Markdown 渲染:例如直接渲染项目仓库的 README,避免重复维护。
22
- - 模块化设计,内置多种高复用性的小组件,可以自由搭配布局。
23
- - 图片懒加载时按原图比例预留占位,不会出现高度跳变,体验更佳。
24
- - 支持一站多作者,可以为不同文章指定不同作者,每位作者都有专属主页。
25
- - 社区文化:可以订阅「探索号」时间线数据源,获取社区用户的宝贵经验分享。
15
+ ## 为什么选择 Stellar
26
16
 
27
- 以上功能都可以在 [文档](https://xaoxuu.com/wiki/stellar/) 中找到详细的使用方法。
17
+ ### 四大内容系统,一体化整合
28
18
 
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)
19
+ - **博客系统**:支持技术 / 生活两种文章布局,分类、标签、分页与相关文章一应俱全;只想写博客时,它就是一个开箱即用的轻博客。
20
+ - **Wiki 文档系统**:既可以展示多个项目文档,也可以作为个人知识库,项目树、小节与层级导航开箱即用。
21
+ - **专栏系统**:系列文章集中管理,提供沉浸式的连续阅读体验。
22
+ - **笔记本系统**:三层架构与标签树导航,方便地梳理、归档和检索笔记。
23
+
24
+ 四套系统与动态数据组件一体化整合,无需拼装多个插件。
25
+
26
+ ### 富表达标签组件
27
+
28
+ 内置大量灵活而强大的标签组件——提示框、折叠、标签页、时间线、图库、图标、表情、高亮、OKR、聊天、表格等,互相之间可以自由混搭嵌套,让内容表达不再受 Markdown 语法限制。详见[标签组件文档](https://xaoxuu.com/wiki/stellar/tag-plugins/)。
29
+
30
+ ### 动态数据组件
31
+
32
+ 静态博客也能拥有动态能力,内容更新无需重新部署:
33
+
34
+ - **动态时间线**:像发朋友圈一样发布短文,也可以订阅他人的时间线。
35
+ - **自动化友链**:自动检测友链状态、打标签、订阅友链文章。
36
+ - **远程 Markdown 渲染**:例如直接渲染项目仓库的 README,避免重复维护。
37
+ - **GitHub 仓库 / 贡献者卡片、评分、投票、最新评论**等数据组件,按需加载,不拖慢首屏。
38
+ - **社区文化**:可以订阅「探索号」时间线数据源,获取社区用户的宝贵经验分享。
39
+
40
+ ### 体验与性能
41
+
42
+ - **模块化设计**:内置多种高复用性小组件,左右侧边栏自由搭配,布局随心。
43
+ - **设计令牌驱动的样式系统**:统一的设计语言、深色模式与移动端响应式适配。
44
+ - **图片懒加载**按原图比例预留占位,不会出现高度跳变,体验更佳。
45
+ - 可选插件按需启用:代码高亮与复制、KaTeX / MathJax 数学渲染、Mermaid 图表、Fancybox 灯箱、Swiper 轮播等。
46
+ - **本地搜索**:内置索引生成器,结果按章节展示,点击直达锚点并高亮关键词。
47
+ - **SEO 完备**:JSON-LD 结构化数据、Open Graph、canonical 与克隆站检测,保护原创内容。
48
+ - **一站多作者**:可以为不同文章指定不同作者,每位作者都有专属主页。
49
+
50
+ 以上功能都可以在[文档](https://xaoxuu.com/wiki/stellar/)中找到详细的使用方法。
30
51
 
31
52
  ## 示例与展示
32
53
 
33
- - 示例源码:[hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/)(`blog` 博客场景、`docs` 文档场景)
34
- - 展示墙:[使用 Stellar 主题的博客](https://xaoxuu.com/wiki/stellar/examples/)(30 个站点)
54
+ - 示例源码:[hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/)(`blog` 博客场景、`docs` 文档场景),可直接 fork 起步
55
+ - 展示墙:[使用 Stellar 主题的博客](https://xaoxuu.com/wiki/stellar/examples/)
35
56
 
36
- 部分使用站点:[杜老师说](https://dusays.com)、[Watermelonabc](https://watermelonabc.top/)、[妄司逸](https://blog.flechazo.icu/)
57
+ [![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)
37
58
 
38
59
  ## 快速开始
39
60
 
@@ -62,6 +83,10 @@ npm install hexo-theme-stellar
62
83
  theme: stellar
63
84
  ```
64
85
 
86
+ ### 从轻博客开始
87
+
88
+ 配置完成后即可发布文章。Wiki、专栏、笔记本与动态数据组件按需启用,文档中均有详细说明;也可以直接参考示例仓库的 `blog` 场景快速搭建。
89
+
65
90
  ## 使用文档
66
91
 
67
92
  完整文档请见:https://xaoxuu.com/wiki/stellar/
@@ -70,7 +95,7 @@ theme: stellar
70
95
 
71
96
  - 更新日志:[CHANGELOG.md](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/CHANGELOG.md) · [Releases](https://github.com/xaoxuu/hexo-theme-stellar/releases)
72
97
 
73
- ## 常用文档
98
+ ### 常用文档
74
99
 
75
100
  - [标签组件](https://xaoxuu.com/wiki/stellar/tag-plugins/)
76
101
  - [主题配置](https://xaoxuu.com/wiki/stellar/theme-settings/)
@@ -82,3 +107,7 @@ theme: stellar
82
107
  - 提交 Issues:https://github.com/xaoxuu/hexo-theme-stellar/issues/
83
108
  - 参与讨论:https://github.com/xaoxuu/hexo-theme-stellar/discussions/
84
109
  - 贡献指南:[CONTRIBUTING.md](CONTRIBUTING.md) · [Wiki 贡献页](https://xaoxuu.com/wiki/stellar/contributors/)
110
+
111
+ ## 开源许可
112
+
113
+ 本项目采用 [MIT License](LICENSE),Copyright (c) 2021 xaoxuu,永久开源、完全免费。
package/README_EN.md ADDED
@@ -0,0 +1,113 @@
1
+ # Stellar - Your Own Independent Blog
2
+
3
+ [English](README_EN.md) · [简体中文](README.md)
4
+
5
+ [![npm](https://img.shields.io/npm/v/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
6
+ [![license](https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/LICENSE)
7
+ [![stars](https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar)
8
+ [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
9
+ [![release](https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/releases)
10
+
11
+ Stellar is a Hexo theme that unifies blogging and knowledge base in one place. Beneath its clean, business-style aesthetics lie four built-in content systems — Blog, Wiki, Topic, and Notebook — plus a rich collection of tag plugins and dynamic data widgets, ready to use out of the box for every kind of expression.
12
+
13
+ You can also use it as a lightweight blog theme from day one: install, enable, and start writing. Wiki, Topic, Notebook, and dynamic data widgets are all enabled on demand, growing naturally with your content needs.
14
+
15
+ ## Why Stellar
16
+
17
+ ### Four Content Systems, Integrated in One
18
+
19
+ - **Blog**: Two article layouts (tech / story) offer different reading experiences, with categories, tags, pagination, and related posts — use it as a lightweight blog right away if that's all you need.
20
+ - **Wiki**: Showcase multiple project documentations or use it as your personal knowledge base, with project trees, sections, and hierarchical navigation.
21
+ - **Topic**: Manage series of articles with an immersive, continuous reading experience.
22
+ - **Notebook**: A three-layer architecture with a tag tree to organize, archive, and retrieve notes with ease.
23
+
24
+ All four systems and dynamic widgets are integrated out of the box — no need to assemble multiple plugins.
25
+
26
+ ### Expressive Tag Plugins
27
+
28
+ A large set of flexible and powerful tag plugins — notes, folding, tabs, timelines, galleries, icons, emoji, highlights, OKR, chat, tables, and more — that can be freely mixed and nested, freeing your content from the limits of plain Markdown. See the [tag plugins documentation](https://xaoxuu.com/wiki/stellar/tag-plugins/).
29
+
30
+ ### Dynamic Data Widgets
31
+
32
+ Static blogs with dynamic capabilities — update content without redeploying:
33
+
34
+ - **Dynamic timeline**: Post short updates like a social feed, or subscribe to others' timelines.
35
+ - **Automated friend links**: Automatically detect link status, tag links, and subscribe to friends' posts.
36
+ - **Remote Markdown rendering**: Render a project repository's README directly, avoiding duplicate maintenance.
37
+ - **GitHub repository / contributor cards, ratings, votes, latest comments**, and other data widgets — loaded on demand without slowing down the first screen.
38
+ - **Community culture**: Subscribe to the "Explorer" timeline data source to learn from the community.
39
+
40
+ ### Experience & Performance
41
+
42
+ - **Modular design**: Highly reusable widgets with freely configurable left/right sidebars.
43
+ - **Design-token-driven styling**: A unified design language, dark mode, and responsive mobile adaptation.
44
+ - **Lazy-loaded images** reserve space by original aspect ratio, preventing layout jumps.
45
+ - Optional plugins enabled on demand: code highlighting & copy, KaTeX / MathJax, Mermaid diagrams, Fancybox lightbox, Swiper carousel, and more.
46
+ - **Local search**: A built-in index generator, with results grouped by section, jumping to anchors and highlighting keywords.
47
+ - **Complete SEO**: JSON-LD structured data, Open Graph, canonical URLs, and clone-site detection to protect original content.
48
+ - **Multi-author support**: Assign different authors to different posts, each with their own dedicated homepage.
49
+
50
+ Detailed usage for all of the above can be found in the [documentation](https://xaoxuu.com/wiki/stellar/).
51
+
52
+ ## Examples & Showcase
53
+
54
+ - Example source: [hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/) (`blog` blog scenario, `docs` documentation scenario) — ready to fork and start
55
+ - Showcase: [Blogs using Stellar](https://xaoxuu.com/wiki/stellar/examples/)
56
+
57
+ [![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)
58
+
59
+ ## Quick Start
60
+
61
+ ### Requirements
62
+
63
+ ```yaml
64
+ Hexo: 6.3.0 ~ latest (verified up to 8.1.2)
65
+ hexo-cli: 4.3.0 ~ latest
66
+ node: >= 22 # LTS recommended
67
+ npm: >= 10
68
+ ```
69
+
70
+ ### Install
71
+
72
+ In the root directory of your blog:
73
+
74
+ ```bash
75
+ npm install hexo-theme-stellar
76
+ ```
77
+
78
+ ### Configure
79
+
80
+ Edit `_config.yml` and enable the theme:
81
+
82
+ ```yaml
83
+ theme: stellar
84
+ ```
85
+
86
+ ### Start Light
87
+
88
+ Once configured, you can publish posts immediately. Wiki, Topic, Notebook, and dynamic widgets can be enabled on demand and are documented in detail; alternatively, start from the `blog` scenario in the example repository for a quick setup.
89
+
90
+ ## Documentation
91
+
92
+ Full documentation: https://xaoxuu.com/wiki/stellar/ (currently available in Chinese)
93
+
94
+ > AI documentation: https://deepwiki.com/xaoxuu/hexo-theme-stellar/
95
+
96
+ - Changelog: [CHANGELOG.md](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/CHANGELOG.md) · [Releases](https://github.com/xaoxuu/hexo-theme-stellar/releases)
97
+
98
+ ### Common Topics
99
+
100
+ - [Tag Plugins](https://xaoxuu.com/wiki/stellar/tag-plugins/)
101
+ - [Theme Settings](https://xaoxuu.com/wiki/stellar/theme-settings/)
102
+ - [Wiki System](https://xaoxuu.com/wiki/stellar/wiki-settings/)
103
+ - [Topic & Notebook](https://xaoxuu.com/wiki/stellar/topic/)
104
+
105
+ ## Feedback
106
+
107
+ - Issues: https://github.com/xaoxuu/hexo-theme-stellar/issues/
108
+ - Discussions: https://github.com/xaoxuu/hexo-theme-stellar/discussions/
109
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md) · [Wiki contributors page](https://xaoxuu.com/wiki/stellar/contributors/)
110
+
111
+ ## License
112
+
113
+ This project is licensed under the [MIT License](LICENSE), Copyright (c) 2021 xaoxuu. Permanently open source and completely free.
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.40.0'
3
+ version: '1.42.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
@@ -46,22 +46,22 @@ menubar:
46
46
  # url: 点击跳转到哪,支持相对路径和绝对路径
47
47
  # - id: post
48
48
  # theme: '#1BCDFC'
49
- # icon: solar:documents-bold-duotone
49
+ # icon: default:documents
50
50
  # title: 博客
51
51
  # url: /
52
52
  # - id: wiki
53
53
  # theme: '#3DC550'
54
- # icon: solar:notebook-bookmark-bold-duotone
54
+ # icon: example:notebook
55
55
  # title: 文档
56
56
  # url: /wiki/
57
57
  # - id: explore
58
58
  # theme: '#FA6400'
59
- # icon: solar:planet-bold-duotone
59
+ # icon: example:planet
60
60
  # title: 探索
61
61
  # url: /explore/
62
62
  # - id: social
63
63
  # theme: '#F44336'
64
- # icon: solar:chat-square-like-bold-duotone
64
+ # icon: example:chat
65
65
  # title: 社交
66
66
  # url: /friends/
67
67
 
@@ -159,7 +159,7 @@ notebook:
159
159
  auto_excerpt: 128
160
160
  # 可以为某个 tag 设定图标(显示在标签树中)。
161
161
  tagcons:
162
- '': solar:hashtag-square-bold
162
+ '': quot:hashtag
163
163
  # 每页显示多少篇笔记。0 表示不分页,null 则 fallback 到 hexo 的配置。
164
164
  # 可以在笔记本 yaml 的 per_page 字段中覆盖此参数。
165
165
  per_page: null
@@ -188,15 +188,32 @@ article:
188
188
  indent: # true / false
189
189
  # 封面图宽高比
190
190
  cover_ratio: 2
191
+ # 文章卡片样式:hero = 全图文字封面卡片(有 cover 时标题 + 一行小字,文字区固定底部),classic = 普通卡片(封面/标题/摘要/meta)
192
+ card_style: hero
191
193
  # 文章内横幅宽高比
192
194
  banner_ratio: 2.5
193
- # 如果没有指定横幅,是否根据 tags 作为关键词搜索横幅图片?
194
- auto_banner: false # search from https://source.unsplash.com/
195
195
  # 如果没有指定 excerpt 和 description,将自动取多长的内容作为文章摘要?
196
196
  auto_excerpt: 128
197
197
  # 分类颜色
198
198
  category_color:
199
199
  '探索号': '#f44336'
200
+ # 文章 AI 成分标签:front-matter 用 ai_label: manual / reviewed / polished / generated 标记,
201
+ # 未设置时取 default(为空则不显示);文案由多语言系统提供(languages/*.yml 的 meta.ai_label.*),
202
+ # 此处配置各档文字颜色与可选 icon;文章页显示在顶部面包屑行最右(阅读时长右侧)
203
+ ai_label:
204
+ default:
205
+ manual:
206
+ color: '#03a9f4'
207
+ icon: default:shield-user
208
+ reviewed:
209
+ color: '#4caf50'
210
+ icon: default:shield-check
211
+ polished:
212
+ color: '#4caf50'
213
+ icon: default:shield-up
214
+ generated:
215
+ color: '#ff9800'
216
+ icon: default:shield-warning
200
217
  # 文章许可协议
201
218
  license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议,转载请注明出处。'
202
219
  # 分享
@@ -210,6 +227,8 @@ article:
210
227
  reading_time: false
211
228
  # 文章卡片是否显示标签(最多 5 个,#580)
212
229
  card_tags: false
230
+ # 文章末尾是否显示本文标签(位于 article-footer 之前)
231
+ tags: true
213
232
 
214
233
  search:
215
234
  service: local_search # local_search, algolia_search, todo...
@@ -217,6 +236,8 @@ search:
217
236
  field: all # post, page, all
218
237
  path: /search.json # 搜索文件存放位置
219
238
  content: true # 是否搜索内容
239
+ lazy_load: true # 懒加载:首次聚焦搜索框时才加载搜索数据(默认开启);站点内容较多时建议关闭,防止首次搜索卡顿
240
+ cache_ttl: 86400 # 搜索数据缓存时长(秒),默认 1 天;设为 0 表示不缓存,建议按内容更新频率调整
220
241
  skip_search: # 指定 path 中的内容不被搜索。
221
242
  algolia_search: # Docsearch https://docsearch.algolia.com/apply/ 申请
222
243
  appId:
@@ -392,12 +413,12 @@ tag_plugins:
392
413
  # {% quot %}
393
414
  quot:
394
415
  default: # 可以自行配置多种图标方案,支持icons.yml中配置的图片key,也支持直接设置svg/png等文件链接
395
- prefix: bxs:quote-left
396
- suffix: bxs:quote-right
416
+ prefix: quot:quote-left
417
+ suffix: quot:quote-right
397
418
  hashtag:
398
- prefix: solar:hashtag-square-bold
419
+ prefix: quot:hashtag
399
420
  question:
400
- prefix: ph:seal-question-fill
421
+ prefix: quot:question
401
422
  # {% emoji %}
402
423
  emoji:
403
424
  default: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/qq/{name}.gif
@@ -648,6 +669,11 @@ plugins:
648
669
  default_text: 'Copy'
649
670
  success_text: 'Copied'
650
671
  toast: 复制成功
672
+
673
+ # 文字自适应颜色:背景图/背景色上方的文字随背景亮度自适应
674
+ # 页面存在 [data-text-adaptive] 元素时才按需加载(theme:背景图平均色 lighten/darken;contrast:黑白对比)
675
+ adaptive_text:
676
+ enable: true
651
677
 
652
678
  # 赫蹏 (Heti) - 专为中文网页内容设计的排版样式增强
653
679
  # https://github.com/sivan/heti
@@ -731,8 +757,10 @@ default:
731
757
  project: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/2779789.png
732
758
  banner: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/banner/books.jpg
733
759
  topic: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/10433048.png
760
+ # loading 兼容回退:新值位于 _data/icons.yml(default:loading-placeholder)
734
761
  loading: https://api.iconify.design/eos-icons:three-dots-loading.svg?color=%231cd0fd
735
762
  # loading: https://github.githubassets.com/images/mona-loading-dark.gif
763
+ # image_onerror 兼容回退:新值位于 _data/icons.yml(image:onerror)
736
764
  image_onerror: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2rem' height='2rem' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='%23F44336' d='M22 12.698c-.002 1.47-.013 2.718-.096 3.743c-.097 1.19-.296 2.184-.74 3.009a4.2 4.2 0 0 1-.73.983c-.833.833-1.893 1.21-3.237 1.39C15.884 22 14.2 22 12.053 22h-.106c-2.148 0-3.83 0-5.144-.177c-1.343-.18-2.404-.557-3.236-1.39c-.738-.738-1.12-1.656-1.322-2.795c-.2-1.12-.236-2.512-.243-4.241Q1.999 12.737 2 12v-.054c0-2.148 0-3.83.177-5.144c.18-1.343.557-2.404 1.39-3.236s1.893-1.21 3.236-1.39c1.168-.157 2.67-.175 4.499-.177a.697.697 0 1 1 0 1.396c-1.855.002-3.234.018-4.313.163c-1.189.16-1.906.464-2.436.994S3.72 5.8 3.56 6.99C3.397 8.2 3.395 9.788 3.395 12v.784l.932-.814a2.14 2.14 0 0 1 2.922.097l3.99 3.99a1.86 1.86 0 0 0 2.385.207l.278-.195a2.79 2.79 0 0 1 3.471.209l2.633 2.37c.265-.557.423-1.288.507-2.32c.079-.972.09-2.152.091-3.63a.698.698 0 0 1 1.396 0' opacity='.5'/%3E%3Cpath fill='%23F44336' fill-rule='evenodd' d='M17.5 11c-2.121 0-3.182 0-3.841-.659S13 8.621 13 6.5s0-3.182.659-3.841S15.379 2 17.5 2s3.182 0 3.841.659S22 4.379 22 6.5s0 3.182-.659 3.841S19.621 11 17.5 11m-1.47-7.03a.75.75 0 1 0-1.06 1.06l1.47 1.47l-1.47 1.47a.75.75 0 0 0 1.06 1.06l1.47-1.47l1.47 1.47a.75.75 0 1 0 1.06-1.06L18.56 6.5l1.47-1.47a.75.75 0 0 0-1.06-1.06L17.5 5.44z' clip-rule='evenodd'/%3E%3C/svg%3E"
737
765
 
738
766
  api_host: