hexo-theme-stellar 2.0.0-rc.1 → 2.0.0-rc.3

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 (229) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +54 -62
  3. package/README_EN.md +62 -39
  4. package/_config.yml +173 -68
  5. package/_data/icons.yml +1 -0
  6. package/assets/icon-v2-x512.webp +0 -0
  7. package/languages/en.yml +1 -0
  8. package/languages/zh-CN.yml +1 -0
  9. package/languages/zh-TW.yml +1 -0
  10. package/layout/404.ejs +4 -1
  11. package/layout/_partial/comments/beaudar/layout.ejs +1 -1
  12. package/layout/_partial/comments/giscus/layout.ejs +1 -1
  13. package/layout/_partial/comments/utterances/layout.ejs +1 -1
  14. package/layout/_partial/cover/wiki_cover.ejs +2 -1
  15. package/layout/_partial/head.ejs +21 -15
  16. package/layout/_partial/main/article/post_footer.ejs +1 -1
  17. package/layout/_partial/main/article/post_read_next.ejs +4 -1
  18. package/layout/_partial/main/footer.ejs +8 -8
  19. package/layout/_partial/main/navbar/article_banner.ejs +3 -1
  20. package/layout/_partial/main/pin_slider.ejs +33 -20
  21. package/layout/_partial/menubtn.ejs +1 -1
  22. package/layout/_partial/primitives/region.ejs +3 -3
  23. package/layout/_partial/primitives/shell.ejs +2 -1
  24. package/layout/_partial/scripts/defines.ejs +20 -119
  25. package/layout/_partial/scripts/runtime.ejs +10 -4
  26. package/layout/_partial/scripts.ejs +7 -27
  27. package/layout/_partial/search/dialog.ejs +1 -1
  28. package/layout/_partial/sidebar/brand.ejs +1 -1
  29. package/layout/_partial/widgets/related.ejs +1 -1
  30. package/layout/_partial/widgets/tagtree.ejs +2 -2
  31. package/layout/archive.ejs +14 -23
  32. package/layout/index.ejs +4 -0
  33. package/layout/layout.ejs +7 -4
  34. package/layout/page.ejs +1 -1
  35. package/layout/settings.ejs +1 -1
  36. package/package.json +17 -6
  37. package/scripts/commands/stellar.js +15 -3
  38. package/scripts/events/index.js +10 -23
  39. package/scripts/events/lib/authors.js +1 -0
  40. package/scripts/events/lib/doc_tree.js +8 -7
  41. package/scripts/events/lib/notebooks.js +6 -21
  42. package/scripts/filters/index.js +8 -3
  43. package/scripts/filters/lib/img.js +15 -0
  44. package/scripts/filters/lib/img_lazyload.js +1 -0
  45. package/scripts/filters/lib/img_onerror.js +21 -12
  46. package/scripts/filters/lib/md_link.js +26 -0
  47. package/scripts/filters/lib/page-view-model.js +36 -16
  48. package/scripts/generators/author.js +0 -1
  49. package/scripts/generators/notebooks.js +2 -2
  50. package/scripts/generators/search.js +3 -3
  51. package/scripts/generators/stellar-icons.js +2 -0
  52. package/scripts/helpers/collection.js +3 -3
  53. package/scripts/helpers/comments_model.js +2 -2
  54. package/scripts/helpers/extension_assets.js +16 -2
  55. package/scripts/helpers/json_ld.js +5 -4
  56. package/scripts/helpers/md_link.js +7 -0
  57. package/scripts/helpers/page_meta.js +2 -0
  58. package/scripts/helpers/post_view_model.js +15 -12
  59. package/scripts/helpers/script_json.js +3 -0
  60. package/scripts/lib/brand.js +2 -2
  61. package/scripts/lib/browser-runtime.js +4 -11
  62. package/scripts/lib/collection-pipeline/adapters/notebook.js +4 -6
  63. package/scripts/lib/collection-pipeline/adapters/post.js +5 -2
  64. package/scripts/lib/collection-pipeline/adapters/topic.js +15 -10
  65. package/scripts/lib/collection-pipeline/index.js +13 -8
  66. package/scripts/lib/comments.js +20 -2
  67. package/scripts/lib/config-schema.js +13 -3
  68. package/scripts/lib/content-config.js +35 -23
  69. package/scripts/lib/content-defaults.js +8 -4
  70. package/scripts/lib/contribution-contract.js +8 -16
  71. package/scripts/lib/contribution-registry.js +103 -52
  72. package/scripts/lib/doctor.js +14 -10
  73. package/scripts/lib/hero-effect-registry.js +0 -8
  74. package/scripts/lib/html-images.js +7 -6
  75. package/scripts/lib/image-metadata.js +308 -0
  76. package/scripts/lib/internal-constants.js +3 -29
  77. package/scripts/lib/models/index.js +21 -1533
  78. package/scripts/lib/models/notebook.js +292 -0
  79. package/scripts/lib/models/post.js +72 -0
  80. package/scripts/lib/models/shared.js +571 -0
  81. package/scripts/lib/models/topic.js +201 -0
  82. package/scripts/lib/models/wiki.js +413 -0
  83. package/scripts/lib/page-view-model-registry.js +126 -82
  84. package/scripts/lib/partial-navigation.js +64 -0
  85. package/scripts/lib/resource-assets.js +19 -0
  86. package/scripts/lib/script-json.js +13 -0
  87. package/scripts/lib/source-config.js +26 -16
  88. package/scripts/schema/config-rules.js +33 -26
  89. package/scripts/schema/config-schema.js +2 -1
  90. package/scripts/schema/content-config-rules.js +3 -1
  91. package/scripts/schema/content-config-schema.js +6 -4
  92. package/scripts/schema/model-schema.js +21 -13
  93. package/scripts/tags/lib/albums.js +1 -1
  94. package/scripts/tags/lib/friends.js +1 -1
  95. package/scripts/tags/lib/ghcard.js +1 -1
  96. package/scripts/tags/lib/posters.js +1 -1
  97. package/scripts/tags/lib/sites.js +2 -2
  98. package/source/css/_appearances/_mixins.styl +14 -16
  99. package/source/css/_appearances/minimal.styl +80 -46
  100. package/source/css/_common/button.styl +2 -2
  101. package/source/css/_common/cap.styl +1 -1
  102. package/source/css/_common/highlight.styl +2 -3
  103. package/source/css/_common/html.styl +5 -1
  104. package/source/css/_common/input.styl +1 -1
  105. package/source/css/_common/md-link.styl +13 -0
  106. package/source/css/_common/span.styl +1 -1
  107. package/source/css/_common/title.styl +2 -2
  108. package/source/css/_common/toast.styl +1 -1
  109. package/source/css/_components/collection.styl +3 -3
  110. package/source/css/_components/layout.styl +42 -8
  111. package/source/css/_components/list.styl +5 -3
  112. package/source/css/_components/md.styl +1 -2
  113. package/source/css/_components/pages/archives.styl +4 -4
  114. package/source/css/_components/pages/article-story.styl +1 -1
  115. package/source/css/_components/pages/article-tech.styl +2 -2
  116. package/source/css/_components/partial/article-footer.styl +1 -1
  117. package/source/css/_components/partial/article-share.styl +3 -0
  118. package/source/css/_components/partial/bread-nav.styl +2 -2
  119. package/source/css/_components/partial/cover.styl +4 -4
  120. package/source/css/_components/partial/footer.styl +2 -2
  121. package/source/css/_components/partial/paginator.styl +1 -1
  122. package/source/css/_components/partial/post-panel.styl +3 -3
  123. package/source/css/_components/partial/related.styl +14 -3
  124. package/source/css/_components/pin-slider.styl +7 -4
  125. package/source/css/_components/sidebar/brand.styl +3 -3
  126. package/source/css/_components/sidebar/search.styl +44 -20
  127. package/source/css/_components/tag-plugins/banner.styl +1 -1
  128. package/source/css/_components/tag-plugins/chat.styl +2 -2
  129. package/source/css/_components/tag-plugins/copy.styl +1 -1
  130. package/source/css/_components/tag-plugins/emoji.styl +1 -0
  131. package/source/css/_components/tag-plugins/folders.styl +2 -2
  132. package/source/css/_components/tag-plugins/folding.styl +2 -2
  133. package/source/css/_components/tag-plugins/friends.styl +2 -2
  134. package/source/css/_components/tag-plugins/friends_posts.styl +4 -2
  135. package/source/css/_components/tag-plugins/gallery.styl +4 -3
  136. package/source/css/_components/tag-plugins/hashtag.styl +1 -1
  137. package/source/css/_components/tag-plugins/image.styl +2 -0
  138. package/source/css/_components/tag-plugins/inline-labels.styl +2 -2
  139. package/source/css/_components/tag-plugins/link.styl +1 -1
  140. package/source/css/_components/tag-plugins/mark.styl +2 -2
  141. package/source/css/_components/tag-plugins/mbti.styl +6 -4
  142. package/source/css/_components/tag-plugins/mdrender.styl +1 -1
  143. package/source/css/_components/tag-plugins/navbar.styl +1 -1
  144. package/source/css/_components/tag-plugins/note.styl +1 -1
  145. package/source/css/_components/tag-plugins/okr.styl +2 -2
  146. package/source/css/_components/tag-plugins/poetry.styl +2 -2
  147. package/source/css/_components/tag-plugins/quot.styl +4 -2
  148. package/source/css/_components/tag-plugins/rating.styl +2 -2
  149. package/source/css/_components/tag-plugins/read/paper.styl +3 -3
  150. package/source/css/_components/tag-plugins/read/reel.styl +3 -3
  151. package/source/css/_components/tag-plugins/sites.styl +2 -2
  152. package/source/css/_components/tag-plugins/tabs.styl +1 -1
  153. package/source/css/_components/tag-plugins/timeline.styl +6 -6
  154. package/source/css/_components/tag-plugins/toc.styl +2 -2
  155. package/source/css/_components/tag-plugins/vote.styl +2 -2
  156. package/source/css/_components/widgets/ghrepo.styl +1 -1
  157. package/source/css/_components/widgets/ghuser.styl +4 -4
  158. package/source/css/_components/widgets/markdown.styl +3 -0
  159. package/source/css/_components/widgets/settings.styl +2 -2
  160. package/source/css/_components/widgets/toc.styl +24 -3
  161. package/source/css/_components/widgets/widgets.styl +1 -1
  162. package/source/css/_components/wiki-card.styl +3 -3
  163. package/source/css/_custom.styl +1 -0
  164. package/source/css/_defines/func.styl +2 -2
  165. package/source/css/_defines/theme_base.styl +0 -2
  166. package/source/css/_defines/typography.styl +10 -0
  167. package/source/css/_plugins/card-hover.styl +46 -43
  168. package/source/css/_plugins/index.styl +1 -1
  169. package/source/css/comments/artalk.styl +1 -1
  170. package/source/css/comments/twikoo.styl +2 -2
  171. package/source/css/comments/waline.styl +1 -1
  172. package/source/css/plugins/swiper.styl +2 -1
  173. package/source/js/color.js +21 -85
  174. package/source/js/main.js +63 -56
  175. package/source/js/navigation-init.js +58 -0
  176. package/source/js/plugins/adaptive-text.js +51 -25
  177. package/source/js/plugins/card-hover.js +5 -3
  178. package/source/js/plugins/download-file.js +26 -28
  179. package/source/js/plugins/video.js +22 -63
  180. package/source/js/profile.js +2 -0
  181. package/source/js/runtime/asset-loader.js +43 -34
  182. package/source/js/runtime/extension-registry.js +78 -57
  183. package/source/js/runtime/extensions/adaptive-text.js +14 -0
  184. package/source/js/runtime/extensions/card-hover.js +3 -2
  185. package/source/js/runtime/extensions/code-copy.js +19 -0
  186. package/source/js/runtime/extensions/comments.js +4 -3
  187. package/source/js/runtime/extensions/deferred-icons.js +13 -7
  188. package/source/js/runtime/extensions/diagrams.js +20 -0
  189. package/source/js/runtime/extensions/hero-effect.js +7 -3
  190. package/source/js/runtime/extensions/heti.js +12 -0
  191. package/source/js/runtime/extensions/lazy-loading.js +74 -0
  192. package/source/js/runtime/extensions/lightbox.js +28 -0
  193. package/source/js/runtime/extensions/link-prefetch.js +5 -0
  194. package/source/js/runtime/extensions/mathjax.js +24 -0
  195. package/source/js/runtime/extensions/page-controls.js +14 -0
  196. package/source/js/runtime/extensions/partial-navigation.js +172 -0
  197. package/source/js/runtime/extensions/reveal.js +29 -8
  198. package/source/js/runtime/extensions/search.js +4 -1
  199. package/source/js/runtime/extensions/services.js +113 -16
  200. package/source/js/runtime/extensions/settings.js +14 -10
  201. package/source/js/runtime/extensions/swiper.js +22 -0
  202. package/source/js/runtime/image-color.js +211 -0
  203. package/source/js/runtime/index.js +60 -43
  204. package/source/js/runtime/legacy-request-adapter.js +2 -0
  205. package/source/js/runtime/request-cache.js +26 -0
  206. package/source/js/search/algolia-search.js +1 -1
  207. package/source/js/search/highlight.js +6 -9
  208. package/source/js/search/local-search.js +128 -81
  209. package/source/js/services/artalk_latest_comment.js +6 -4
  210. package/source/js/services/contributors.js +6 -3
  211. package/source/js/services/friends.js +7 -4
  212. package/source/js/services/friends_and_posts.js +7 -4
  213. package/source/js/services/ghinfo.js +6 -3
  214. package/source/js/services/giscus_latest_comment.js +6 -3
  215. package/source/js/services/mdrender.js +10 -9
  216. package/source/js/services/memos.js +9 -3
  217. package/source/js/services/rating.js +13 -10
  218. package/source/js/services/rss.js +6 -3
  219. package/source/js/services/siteinfo.js +43 -14
  220. package/source/js/services/sites.js +9 -6
  221. package/source/js/services/timeline.js +6 -3
  222. package/source/js/services/twikoo_latest_comment.js +10 -5
  223. package/source/js/services/vote.js +11 -8
  224. package/source/js/services/waline_latest_comment.js +6 -3
  225. package/source/js/services/weibo.js +6 -3
  226. package/source/js/tagtree.js +7 -7
  227. package/scripts/events/lib/fix_image_tags.js +0 -44
  228. package/scripts/events/lib/get_image_ratios.js +0 -110
  229. package/source/js/runtime/extensions/feature.js +0 -200
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-rc.3
4
+
5
+ > 发布日期:2026-09-10
6
+
7
+ 本节记录从公开候选 `2.0.0-rc.2` 到 `2.0.0-rc.3` 最终文件树的净变化。
8
+
9
+ ### 新功能
10
+
11
+ - 默认启用同集合局部导航:外壳兼容时更新正文、右栏和页面元数据,保留导航区域;支持历史滚动恢复,不兼容页面或请求失败时整页跳转。
12
+ - 图片尺寸与 HSLA 平均色在 server/generate 时自动增量提取并持久缓存,补全生成 HTML,不修改 Markdown 或原图;新增 `hexo stellar images` 及 `--dry-run/--page/--refresh` 选项。
13
+ - Markdown 文本链接、文章参考链接、远程 Markdown 与评论链接支持站点图标增强;站点信息支持 `appicon/favicon`,保留 `icon` 回退,行内请求失败显示断链图标。
14
+ - 新增字体平滑与设计字重映射;卡片 Spotlight 与 Tilt 可独立开关。
15
+ - 第三方 JS/CSS 地址可在对应搜索、评论、Feature 或 Markdown 服务配置中覆盖;Artalk 默认使用服务端配套资源。
16
+
17
+ ### 修复与改进
18
+
19
+ - 共享 Collection 模型并隔离构建缓存,复用 PageViewModel 和归档文章投影,减少重复解析与校验;忽略 Collection 目录中的 macOS `.DS_Store` 文件。
20
+ - 完善 Extension 的页面/文档作用域、异步取消及卸载清理;修复 Flying Pages 初始化、图片懒加载与 Safari 错误占位时序,Reveal 待入场透明度在卸载时恢复。
21
+ - 修复文章上下篇、作者页 Topic 文章与作者横幅;Topic 文章默认继承全局分享配置,Wiki 与 Notebook 仍默认关闭分享。
22
+ - Doctor 与构建统一恢复可用的配置:普通字段问题和不适用的表现参数给出 warning,缺少集合显示名时使用 Collection ID;根结构与归属冲突仍阻止构建。
23
+ - 本地搜索按章节组织结果并分批查询、渲染,改进摘要、高亮、加载更多和结束提示。
24
+ - 调整 minimal 外观、暗色背景、移动导航、品牌、目录吸顶与当前条目滚动;修复 Markdown Widget 背景、稀疏 Wiki 网格宽度、画廊列数以及轮播、图片标签、头像、MBTI 卡片的比例与布局。
25
+ - GitHub 卡片默认服务切换为 `https://github-stats-extended.vercel.app`;图片颜色处理新增 Sharp 直接依赖。
26
+
27
+ ### 升级注意(配置变更与破坏性改动)
28
+
29
+ - 将 `footer.sections` 改为 `footer.sitemap`;分组保留 `title/items`,但 items 中的 `{title, url}` 对象需改写为 `'[标题](地址)'` Markdown 字符串。默认 sitemap 为空数组;默认页脚正文新增 CC BY-NC-SA 4.0 说明,可自行覆盖 `footer.content`。
30
+ - 将 `features.card_hover.enabled` 替换为独立的 `spotlight` 与 `tilt` 布尔值;希望保持原先全部开启效果时两项均设为 `true`,默认均为 `false`。
31
+ - `features.partial_navigation.enabled` 默认开启,含非主题管理可执行脚本的页面使用整页导航;需要全部整页跳转时将其关闭。
32
+ - `features.image_optimization.enabled` 默认开启,首次处理远程图片可能增加构建时间;关闭后仍复用站点 `source/_data/caches/images_metadata.json`。`features.lazy_loading.auto_aspect_ratio` 继续控制尺寸/比例补全。
33
+ - 第三方资源覆盖不保证任意上游 API 版本兼容;KaTeX 自定义 CSS 时需配套更新 `css_integrity`,或设为 `null` 不附加 SRI。仅覆盖 CSS 地址时会清除继承的旧哈希。
34
+
35
+ Full Changelog: [2.0.0-rc.2...2.0.0-rc.3](https://github.com/xaoxuu/hexo-theme-stellar/compare/2.0.0-rc.2...2.0.0-rc.3)
36
+
37
+ ## 2.0.0-rc.2
38
+
39
+ > 发布日期:2026-09-07
40
+
41
+ 本节记录从公开候选 `2.0.0-rc.1` 到 `2.0.0-rc.2` 最终文件树的净变化。
42
+
43
+ ### 新功能
44
+
45
+ - Notebook 列表、设置页与错误页的专属配置统一收敛到 `profiles`;404 页新增默认关闭的评论区,可独立覆盖标题、线程、Provider 与参数。
46
+ - 可信页面注入补全 `head_begin/head_end/body_begin/body_end` 四个位置,站点主题配置与页面 Front Matter 使用同一合并顺序和原样输出语义。
47
+
48
+ ### 修复与工程变化
49
+
50
+ - 将 `hexo-front-matter` 声明为主题直接依赖,避免源码配置与 `stellar new note` 依赖 Hexo 宿主的传递依赖。
51
+ - 重构中英文 README,明确 npm、源码与 Blueprint 三种安装入口,并补充随 npm 包分发的 Stellar 图标、项目描述、关键词和作者元数据。
52
+
53
+ ### 升级注意(配置变更与破坏性改动)
54
+
55
+ - 从 RC1 升级时,将顶层 `notebook` 移到 `profiles.notebook`,将 `settings.about` 移到 `profiles.settings.about`,将 `error_page.image` 移到 `profiles.error.image`。
56
+ - `profiles.notebook_index` 更名为 `profiles.notebooks`,`profiles.note_index` 更名为 `profiles.notebook`;Note 内容页继续使用 `profiles.note`。
57
+ - `inject` 内容会作为可信 HTML 原样输出;只应配置维护者完全信任的内容,站点级内容在前、页面 Front Matter 在后。
58
+
59
+ Full Changelog: [2.0.0-rc.1...2.0.0-rc.2](https://github.com/xaoxuu/hexo-theme-stellar/compare/2.0.0-rc.1...2.0.0-rc.2)
60
+
3
61
  ## 2.0.0-rc.1
4
62
 
5
63
  > 发布日期:2026-09-07
package/README.md CHANGED
@@ -1,81 +1,87 @@
1
- # Stellar - 每个人的独立博客
1
+ <div align="center">
2
+ <img src="assets/icon-v2-x512.webp" width="160" alt="Stellar">
3
+ <h1>Stellar</h1>
4
+ <p>每个人的独立博客</p>
5
+ <p>基于 Hexo 的全能个人知识库,开箱即用,内置海量标签和动态数据组件。可用于个人博客、项目文档、知识库、专栏、笔记等。</p>
6
+ <p><a href="README.md">简体中文</a> · <a href="README_EN.md">English</a></p>
7
+ <p>
8
+ <a href="https://github.com/xaoxuu/hexo-theme-stellar/releases"><img src="https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar" alt="release"></a>
9
+ <a href="https://www.npmjs.com/package/hexo-theme-stellar"><img src="https://img.shields.io/npm/v/hexo-theme-stellar" alt="npm"></a>
10
+ <a href="https://www.npmjs.com/package/hexo-theme-stellar"><img src="https://img.shields.io/npm/dm/hexo-theme-stellar" alt="npm downloads"></a>
11
+ <a href="https://github.com/xaoxuu/hexo-theme-stellar"><img src="https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar" alt="stars"></a>
12
+ <a href="LICENSE"><img src="https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar" alt="license"></a>
13
+ </p>
14
+ <p>
15
+ <a href="https://xaoxuu.com/wiki/stellar/start/install/">创建第一个博客</a> ·
16
+ <a href="https://xaoxuu.com/wiki/stellar/support/examples/">站点示例</a> ·
17
+ <a href="https://xaoxuu.com/wiki/stellar/">完整文档</a>
18
+ </p>
19
+ </div>
2
20
 
3
- [简体中文](README.md) · [English](README_EN.md)
21
+ ## 在纷繁中建立秩序
4
22
 
5
- 一个博客,也是一套可以长期生长的内容系统。
23
+ > 真正的简约不止删繁就简,而是在纷繁中建立秩序。
6
24
 
7
- 从一篇文章开始。以后想加项目文档、专栏或笔记,仍然在同一个站点里写。
25
+ ### 完善的内容组织体系
8
26
 
9
- [创建第一个博客](https://xaoxuu.com/wiki/stellar/start/install/) · [蓝图与展示墙](https://xaoxuu.com/wiki/stellar/support/examples/) · [完整文档](https://xaoxuu.com/wiki/stellar/)
27
+ 从普通文章开始。项目需要稳定的文档目录时,用 Wiki;文章逐渐形成系列时,收进专栏;零散知识需要长期积累时,放进笔记本。它们共享同一套导航、搜索、侧栏与阅读体验,没有启用的内容系统不会增加额外负担。
10
28
 
11
- > Stellar v2 当前版本为 `2.0.0-rc.1`;是否已经公开发布,以 npm 页面和 GitHub Releases 为准。
29
+ ### 灵活的排版与表达方式
12
30
 
13
- [![npm](https://img.shields.io/npm/v/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
14
- [![license](https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/LICENSE)
15
- [![stars](https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar)
16
- [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
17
- [![release](https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/releases)
31
+ 从外观预设、配色和字体,到分栏、选项卡、折叠块与图库,站点的样子和内容的表达方式都可以按需组合。本地搜索可以直接定位到相关章节,响应式布局会在窄屏上把主要空间留给正文。
18
32
 
19
- ## 内容多起来,也不用推倒重来
33
+ ### 静态页面,也能常看常新
20
34
 
21
- 普通文章照常发布。项目需要一套稳定目录时,用 Wiki;几篇文章写成了系列,收进专栏;零散知识想长期补充,放进笔记本。
35
+ 手写内容沉淀观点,外部数据保持新鲜。远程内容、社区数据和外部服务可以按需加载,与静态正文保持解耦;经常变化的数据不必每次都随整站重新生成。
22
36
 
23
- 博客、Wiki、专栏和笔记本共享同一套导航、搜索、侧栏与阅读体验。只写博客时,其它系统不会跑出来打扰你。
37
+ ## 站点示例
24
38
 
25
- ## 静态博客,也能放一些活的内容
39
+ [Stellar Examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/) 提供可以直接运行的示例站,适合先体验接近自己目标的站点,再逐步替换内容与配置。更多真实站点见[站点示例](https://xaoxuu.com/wiki/stellar/support/examples/)。
26
40
 
27
- 动态时间线、自动友链、远程 README、GitHub 仓库与贡献者、评分和投票都可以按需接入。博客仍然是静态文件,但经常变化的内容不必每次都跟着整站重新部署。
41
+ ## 开始使用
28
42
 
29
- 远程服务不会挡住正文先显示。接口暂时不可用时,文章仍然可以读。
30
-
31
- ## 写作、检索和阅读是一件事
32
-
33
- 提示框、折叠、标签页、图库、时间线、聊天和表格等内容组件可以互相组合。Markdown 表达不够时,不需要临时拼一套风格各异的插件。
34
-
35
- 本地搜索由主题生成索引,结果可以直接落到文章章节;桌面端目录和信息栏到了手机上会变成抽屉,把位置让给正文。
43
+ ### 环境要求
36
44
 
37
- [内容组件](https://xaoxuu.com/wiki/stellar/reference/tags/) · [站内搜索](https://xaoxuu.com/wiki/stellar/guides/search/) · [外观与排版](https://xaoxuu.com/wiki/stellar/guides/appearance/)
45
+ - Node.js 22 或更高版本
46
+ - Hexo 8 或更高版本
38
47
 
39
- > 如果你只想写博客,它不会逼你理解这些系统;内容真的多起来时,它们已经在那里了。
48
+ ### 从蓝图创建
40
49
 
41
- ## 选择一个起点
50
+ 准备好 Git 和 npm 后,一条命令即可启动交互式蓝图安装器:
42
51
 
43
- | 示例 | 适合什么样的站点 |
44
- | --- | --- |
45
- | 留白 · Light Blog | 安静写长文、随笔和生活记录 |
46
- | 星迹 · Blog | 使用经典侧栏整理文章、分类与专栏 |
47
- | 个人知识库 · Knowledge | 把博客、项目资料和长期主题放在一起 |
48
- | 项目文档 · Docs | 给一个项目维护清晰的文档目录 |
52
+ ```bash
53
+ sh -c "$(curl -fsSL https://github.com/xaoxuu/hexo-theme-stellar-examples/raw/main/install.sh)"
54
+ ```
49
55
 
50
- 示例源码在 [hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/)
56
+ 安装器会读取示例仓库的 [`blueprints.json`](https://github.com/xaoxuu/hexo-theme-stellar-examples/blob/main/blueprints.json),展示当前可用的蓝图,并依次确认蓝图、项目目录、依赖安装和创建计划。
51
57
 
52
- ## 快速开始
58
+ ### 从 npm 安装
53
59
 
54
- ### 环境要求
60
+ 在博客根目录安装 npm 当前提供的默认版本,并确认实际安装结果:
55
61
 
56
- ```yaml
57
- Hexo: '>= 8'
58
- hexo-cli: 4.3.0 ~ latest
59
- node: '>= 22'
60
- npm: '>= 10'
62
+ ```bash
63
+ npm install hexo-theme-stellar
64
+ npm ls hexo-theme-stellar
61
65
  ```
62
66
 
63
- ### 使用最新源码
67
+ ### 跟随最新源码
64
68
 
65
- 在博客根目录添加主题源码并安装依赖:
69
+ 将官方仓库的 `main` 分支添加为子模块,并安装主题自身的依赖:
66
70
 
67
71
  ```bash
68
72
  git submodule add -b main https://github.com/xaoxuu/hexo-theme-stellar.git themes/stellar
69
73
  npm install --prefix themes/stellar
70
74
  ```
71
75
 
72
- 然后在博客 `_config.yml` 中启用主题:
76
+ ### 启用并检查
77
+
78
+ 在博客 `_config.yml` 中启用主题:
73
79
 
74
80
  ```yaml
75
81
  theme: stellar
76
82
  ```
77
83
 
78
- 运行 Doctor 和生成:
84
+ 然后运行 Doctor 并生成站点:
79
85
 
80
86
  ```bash
81
87
  npx hexo stellar doctor
@@ -84,29 +90,15 @@ npx hexo generate
84
90
 
85
91
  完整步骤见[环境与安装](https://xaoxuu.com/wiki/stellar/start/install/)和[创建第一个站点](https://xaoxuu.com/wiki/stellar/start/first-site/)。
86
92
 
87
- ### 使用 npm 公开稳定版
88
-
89
- ```bash
90
- npm install hexo-theme-stellar
91
- ```
93
+ ## 文档与社区
92
94
 
93
- 这条命令不保证安装到 v2。复制 v2 配置前,请先运行 `npm ls hexo-theme-stellar` 核对实际版本。
94
-
95
- ## 文档
96
-
97
- - [从第一篇文章开始](https://xaoxuu.com/wiki/stellar/start/first-site/)
98
- - [把博客变成自己的样子](https://xaoxuu.com/wiki/stellar/start/configuration/)
99
- - [用 Wiki 写项目文档](https://xaoxuu.com/wiki/stellar/guides/wiki/)
100
- - [把文章整理成专栏](https://xaoxuu.com/wiki/stellar/guides/topic/)
101
- - [建立自己的笔记本](https://xaoxuu.com/wiki/stellar/guides/notebook/)
95
+ - [配置自己的站点](https://xaoxuu.com/wiki/stellar/start/configuration/)
96
+ - [使用内容组件](https://xaoxuu.com/wiki/stellar/reference/tags/)
97
+ - [管理 Wiki、专栏与笔记本](https://xaoxuu.com/wiki/stellar/reference/collection/)
102
98
  - [主题配置参考](https://xaoxuu.com/wiki/stellar/reference/theme/)
103
99
  - [从 v1 迁移到 v2](https://xaoxuu.com/wiki/stellar/migration/v1-to-v2/)
104
-
105
- ## 社区
106
-
107
100
  - [Issues](https://github.com/xaoxuu/hexo-theme-stellar/issues/):反馈可以复现的问题
108
101
  - [Discussions](https://github.com/xaoxuu/hexo-theme-stellar/discussions/):交流使用经验和想法
109
- - [蓝图与展示墙](https://xaoxuu.com/wiki/stellar/support/examples/):看看不同的人怎样使用 Stellar
110
102
  - [贡献指南](CONTRIBUTING.md):参与主题开发与文档维护
111
103
 
112
104
  ## 开源许可
package/README_EN.md CHANGED
@@ -1,79 +1,102 @@
1
- # Stellar — a blog that can grow with your work
1
+ <div align="center">
2
+ <img src="assets/icon-v2-x512.webp" width="160" alt="Stellar">
3
+ <h1>Stellar</h1>
4
+ <p>A blog that grows with your work</p>
5
+ <p>A complete, versatile, and feature-rich personal knowledge base designed to grow over time.</p>
6
+ <p><a href="README_EN.md">English</a> · <a href="README.md">简体中文</a></p>
7
+ <p>
8
+ <a href="https://github.com/xaoxuu/hexo-theme-stellar/releases"><img src="https://img.shields.io/github/v/release/xaoxuu/hexo-theme-stellar" alt="release"></a>
9
+ <a href="https://www.npmjs.com/package/hexo-theme-stellar"><img src="https://img.shields.io/npm/v/hexo-theme-stellar" alt="npm"></a>
10
+ <a href="https://www.npmjs.com/package/hexo-theme-stellar"><img src="https://img.shields.io/npm/dm/hexo-theme-stellar" alt="npm downloads"></a>
11
+ <a href="https://github.com/xaoxuu/hexo-theme-stellar"><img src="https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar" alt="stars"></a>
12
+ <a href="LICENSE"><img src="https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar" alt="license"></a>
13
+ </p>
14
+ <p>
15
+ <a href="https://xaoxuu.com/wiki/stellar/start/install/">Create your first blog</a> ·
16
+ <a href="https://xaoxuu.com/wiki/stellar/support/examples/">Site examples</a> ·
17
+ <a href="https://xaoxuu.com/wiki/stellar/">Documentation</a>
18
+ </p>
19
+ </div>
2
20
 
3
- [English](README_EN.md) · [简体中文](README.md)
21
+ ## Bring order to everything you publish
4
22
 
5
- Stellar can begin as a quiet personal blog and grow into a home for your articles, project documentation, series, and notes.
23
+ > True simplicity is not just subtraction; it is creating order within complexity.
6
24
 
7
- [See the examples](https://xaoxuu.com/wiki/stellar/support/examples/) · [Getting started](https://xaoxuu.com/wiki/stellar/start/install/) · [Chinese documentation](https://xaoxuu.com/wiki/stellar/)
25
+ ### A complete system for organizing content
8
26
 
9
- > The current Stellar v2 version is `2.0.0-rc.1`. Check npm and GitHub Releases for its public availability.
27
+ Start with regular posts. Give a project its own Wiki when it needs stable documentation, collect related posts into a Topic, and keep evolving knowledge in a Notebook. They share the same navigation, search, sidebars, and reading experience, while unused content systems stay out of the way.
10
28
 
11
- [![npm](https://img.shields.io/npm/v/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
12
- [![license](https://img.shields.io/github/license/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar/blob/main/LICENSE)
13
- [![stars](https://img.shields.io/github/stars/xaoxuu/hexo-theme-stellar)](https://github.com/xaoxuu/hexo-theme-stellar)
14
- [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-stellar)](https://www.npmjs.com/package/hexo-theme-stellar)
29
+ ### Flexible layout and expression
15
30
 
16
- ## Four kinds of content, one site
31
+ From appearance presets, colors, and type to columns, tabs, folding sections, and galleries, you can shape both the site and the way its content is presented. Local search can take readers directly to a matching section, while responsive layouts leave the main space to the article on narrow screens.
17
32
 
18
- Publish regular blog posts as usual. Give a project its own Wiki when it needs stable navigation. Keep a series of posts together as a Topic, or collect smaller pieces of knowledge in a Notebook.
33
+ ### Static pages that stay fresh
19
34
 
20
- They share the same navigation, search, sidebars, and reading experience. If all you need is a blog, the other systems stay out of the way.
35
+ Your writing preserves ideas while external data stays current. Remote content, community data, and external services can load on demand without being coupled to the static article, so frequently changing data does not require a full-site rebuild.
21
36
 
22
- ## A static site with room for live data
37
+ ## Site examples
23
38
 
24
- Timelines, link status, remote README files, GitHub repositories and contributors, ratings, and polls can load when they are needed. Your site remains static, while frequently changing data does not require a full rebuild.
39
+ [Stellar Examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/) provides runnable sites you can explore before replacing their content and configuration at your own pace. Visit [Site examples](https://xaoxuu.com/wiki/stellar/support/examples/) for more real sites.
25
40
 
26
- The article remains readable when a remote service is unavailable.
41
+ ## Get started
27
42
 
28
- ## Writing, finding, and reading belong together
43
+ ### Requirements
29
44
 
30
- Stellar includes content components for notes, folding sections, tabs, galleries, timelines, chat, tables, and more. Built-in local search can take a reader straight to a matching section. On smaller screens, navigation moves into drawers and leaves the page to the article.
45
+ - Node.js 22 or newer
46
+ - Hexo 8 or newer
31
47
 
32
- ## Choose a starting point
48
+ ### Create from a Blueprint
33
49
 
34
- | Example | A good fit for |
35
- | --- | --- |
36
- | Light Blog | Essays, personal notes, and distraction-free reading |
37
- | Blog | A classic sidebar blog with categories and series |
38
- | Knowledge | A personal site combining articles and long-lived knowledge |
39
- | Docs | Documentation for a single project |
50
+ With Git and npm available, launch the interactive Blueprint installer with one command:
40
51
 
41
- The source for these sites lives in the catalog-driven [hexo-theme-stellar-examples](https://github.com/xaoxuu/hexo-theme-stellar-examples/) repository.
52
+ ```bash
53
+ sh -c "$(curl -fsSL https://github.com/xaoxuu/hexo-theme-stellar-examples/raw/main/install.sh)"
54
+ ```
55
+
56
+ The installer reads the example repository's [`blueprints.json`](https://github.com/xaoxuu/hexo-theme-stellar-examples/blob/main/blueprints.json), presents the available Blueprints, then confirms the Blueprint, project directory, dependency installation, and creation plan.
57
+
58
+ ### Install from npm
59
+
60
+ Install the default version currently provided by npm, then confirm what was installed:
61
+
62
+ ```bash
63
+ npm install hexo-theme-stellar
64
+ npm ls hexo-theme-stellar
65
+ ```
42
66
 
43
- ## Use the latest source
67
+ ### Follow the latest source
44
68
 
45
- You need Node.js 22 or newer and Hexo 8 or newer. In the root of an existing Hexo site:
69
+ Add the official repository's `main` branch as a submodule and install the theme's own dependencies:
46
70
 
47
71
  ```bash
48
72
  git submodule add -b main https://github.com/xaoxuu/hexo-theme-stellar.git themes/stellar
49
73
  npm install --prefix themes/stellar
50
74
  ```
51
75
 
52
- Enable the theme in `_config.yml`:
76
+ ### Enable and check
77
+
78
+ Enable the theme in your site's `_config.yml`:
53
79
 
54
80
  ```yaml
55
81
  theme: stellar
56
82
  ```
57
83
 
58
- Then check and build the site:
84
+ Then run Doctor and generate the site:
59
85
 
60
86
  ```bash
61
87
  npx hexo stellar doctor
62
88
  npx hexo generate
63
89
  ```
64
90
 
65
- The full v2 documentation is currently maintained in Chinese. The example repository provides an English quick start and complete runnable sites that can be explored without reading the whole reference.
66
-
67
- ## Stable npm release
68
-
69
- ```bash
70
- npm install hexo-theme-stellar
71
- ```
72
-
73
- This command may still install v1. Run `npm ls hexo-theme-stellar` before using any v2 configuration.
91
+ See [Installation](https://xaoxuu.com/wiki/stellar/start/install/) and [Create your first site](https://xaoxuu.com/wiki/stellar/start/first-site/) for the complete workflow.
74
92
 
75
- ## Community
93
+ ## Documentation and community
76
94
 
95
+ - [Configure your site](https://xaoxuu.com/wiki/stellar/start/configuration/)
96
+ - [Use content components](https://xaoxuu.com/wiki/stellar/reference/tags/)
97
+ - [Manage Wikis, Topics, and Notebooks](https://xaoxuu.com/wiki/stellar/reference/collection/)
98
+ - [Theme configuration reference](https://xaoxuu.com/wiki/stellar/reference/theme/)
99
+ - [Migrate from v1 to v2](https://xaoxuu.com/wiki/stellar/migration/v1-to-v2/)
77
100
  - [Issues](https://github.com/xaoxuu/hexo-theme-stellar/issues/) for reproducible problems
78
101
  - [Discussions](https://github.com/xaoxuu/hexo-theme-stellar/discussions/) for ideas and usage questions
79
102
  - [Contributing](CONTRIBUTING.md) for code and documentation work