hexo-theme-stellar 1.26.7 → 1.27.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 (150) hide show
  1. package/_config.yml +134 -94
  2. package/_data/icons.yml +8 -1
  3. package/_data/widgets.yml +19 -7
  4. package/languages/en.yml +4 -2
  5. package/languages/zh-CN.yml +3 -1
  6. package/languages/zh-TW.yml +4 -2
  7. package/layout/404.ejs +1 -1
  8. package/layout/_partial/{plugins/comments → comments}/artalk/script.ejs +2 -2
  9. package/layout/_partial/{plugins/comments/utterances → comments/giscus}/layout.ejs +5 -2
  10. package/layout/_partial/{plugins/comments → comments}/giscus/script.ejs +1 -4
  11. package/layout/_partial/{plugins/comments → comments}/layout.ejs +1 -1
  12. package/layout/_partial/{plugins/comments → comments}/twikoo/script.ejs +1 -1
  13. package/layout/_partial/comments/waline/script.ejs +43 -0
  14. package/layout/_partial/head.ejs +0 -1
  15. package/layout/_partial/main/article/article_footer.ejs +1 -1
  16. package/layout/_partial/main/footer.ejs +1 -1
  17. package/layout/_partial/main/navbar/article_banner.ejs +81 -17
  18. package/layout/_partial/main/navbar/ghinfo.ejs +1 -1
  19. package/layout/_partial/main/post_list/post_card.ejs +1 -1
  20. package/layout/_partial/menubtn.ejs +6 -3
  21. package/layout/_partial/scripts/defines.ejs +31 -0
  22. package/layout/_partial/scripts/services.ejs +29 -0
  23. package/layout/_partial/scripts/sidebar.ejs +25 -0
  24. package/layout/_partial/scripts/utils.ejs +158 -0
  25. package/layout/_partial/scripts.ejs +32 -0
  26. package/layout/_partial/sidebar/{index.ejs → index_leftbar.ejs} +22 -20
  27. package/layout/_partial/sidebar/index_rightbar.ejs +84 -0
  28. package/layout/_partial/sidebar/logo.ejs +1 -1
  29. package/layout/_partial/widgets/author.ejs +37 -0
  30. package/layout/_partial/widgets/components/edit.ejs +24 -0
  31. package/layout/_partial/widgets/ghissues.ejs +1 -1
  32. package/layout/_partial/widgets/ghrepo.ejs +2 -2
  33. package/layout/_partial/widgets/ghuser.ejs +2 -2
  34. package/layout/_partial/widgets/markdown.ejs +1 -1
  35. package/layout/_partial/widgets/recent.ejs +1 -5
  36. package/layout/_partial/widgets/related.ejs +1 -1
  37. package/layout/_partial/widgets/timeline.ejs +1 -1
  38. package/layout/_partial/widgets/toc.ejs +32 -85
  39. package/layout/_partial/widgets/tree.ejs +71 -0
  40. package/layout/_plugins/copycode.ejs +13 -0
  41. package/layout/_plugins/fancybox.ejs +32 -0
  42. package/layout/_plugins/heti.ejs +21 -0
  43. package/layout/_plugins/index.ejs +24 -0
  44. package/layout/_plugins/lazyload.ejs +21 -0
  45. package/layout/{_partial/plugins/parser/mathjax/script.ejs → _plugins/mathjax.ejs} +1 -1
  46. package/layout/_plugins/mermaid.ejs +29 -0
  47. package/layout/_plugins/preload.ejs +9 -0
  48. package/layout/_plugins/scrollreveal.ejs +15 -0
  49. package/layout/_plugins/search/local_search.ejs +8 -0
  50. package/layout/_plugins/swiper.ejs +26 -0
  51. package/layout/_plugins/tianli_gpt.ejs +11 -0
  52. package/layout/archive.ejs +9 -2
  53. package/layout/layout.ejs +9 -6
  54. package/layout/page.ejs +2 -10
  55. package/package.json +1 -1
  56. package/scripts/events/lib/doc_tree.js +8 -8
  57. package/scripts/events/lib/topic_tree.js +3 -0
  58. package/scripts/generators/author.js +1 -1
  59. package/scripts/helpers/parse_config.js +6 -5
  60. package/scripts/tags/lib/albums.js +2 -2
  61. package/scripts/tags/lib/button.js +1 -1
  62. package/scripts/tags/lib/emoji.js +1 -1
  63. package/scripts/tags/lib/friends.js +1 -1
  64. package/scripts/tags/lib/icon.js +10 -5
  65. package/scripts/tags/lib/link.js +2 -2
  66. package/scripts/tags/lib/md.js +1 -1
  67. package/scripts/tags/lib/posters.js +2 -2
  68. package/scripts/tags/lib/sites.js +1 -1
  69. package/scripts/tags/lib/timeline.js +2 -2
  70. package/source/css/_common/button.styl +8 -2
  71. package/source/css/_common/device.styl +39 -12
  72. package/source/css/_custom.styl +15 -16
  73. package/source/css/_defines/const.styl +1 -1
  74. package/source/css/_defines/func.styl +14 -4
  75. package/source/css/_defines/theme.styl +38 -27
  76. package/source/css/_layout/layout.styl +61 -26
  77. package/source/css/_layout/list.styl +1 -1
  78. package/source/css/_layout/main.styl +1 -4
  79. package/source/css/_layout/md.styl +16 -2
  80. package/source/css/_layout/pages/archives.styl +4 -0
  81. package/source/css/_layout/partial/article-banner.styl +14 -15
  82. package/source/css/_layout/partial/article-footer.styl +0 -5
  83. package/source/css/_layout/partial/footer.styl +8 -6
  84. package/source/css/_layout/partial/related.styl +4 -0
  85. package/source/css/_layout/sidebar/footer.styl +3 -1
  86. package/source/css/_layout/sidebar/logo.styl +3 -1
  87. package/source/css/_layout/sidebar/nav-area.styl +1 -1
  88. package/source/css/_layout/sidebar/sidebar.styl +23 -16
  89. package/source/css/_layout/tag-plugins/banner.styl +1 -8
  90. package/source/css/_layout/tag-plugins/common.styl +10 -5
  91. package/source/css/_layout/tag-plugins/icon.styl +6 -0
  92. package/source/css/_layout/tag-plugins/image.styl +1 -1
  93. package/source/css/_layout/tag-plugins/quot.styl +1 -1
  94. package/source/css/_layout/tag-plugins/timeline.styl +26 -27
  95. package/source/css/_layout/widgets/ghrepo.styl +1 -1
  96. package/source/css/_layout/widgets/ghuser.styl +9 -5
  97. package/source/css/_layout/widgets/list.styl +4 -2
  98. package/source/css/_layout/widgets/related.styl +0 -1
  99. package/source/css/_layout/widgets/timeline.styl +27 -21
  100. package/source/css/_layout/widgets/toc.styl +182 -0
  101. package/source/css/_layout/widgets/tree.styl +0 -0
  102. package/source/css/_layout/widgets/widgets.styl +26 -7
  103. package/source/css/_plugins/comments/twikoo.styl +6 -6
  104. package/source/css/_plugins/comments/waline.styl +13 -10
  105. package/source/css/_plugins/index.styl +2 -0
  106. package/source/css/_plugins/katex.styl +5 -0
  107. package/source/css/_plugins/mermaid.styl +49 -59
  108. package/source/css/_plugins/tianli_gpt.styl +208 -151
  109. package/source/js/main.js +48 -251
  110. package/source/js/plugins/copycode.js +24 -28
  111. package/source/js/search/local-search.js +32 -0
  112. package/source/js/services/fcircle.js +36 -0
  113. package/source/js/services/friends.js +27 -0
  114. package/source/js/services/ghinfo.js +33 -0
  115. package/source/js/services/mdrender.js +10 -0
  116. package/source/js/services/memos.js +73 -0
  117. package/source/js/services/siteinfo.js +38 -0
  118. package/source/js/services/sites.js +30 -0
  119. package/source/js/services/timeline.js +106 -0
  120. package/source/js/services/weibo.js +60 -0
  121. package/layout/_partial/main/navbar/article_top_area.ejs +0 -35
  122. package/layout/_partial/main/navbar/author_banner.ejs +0 -29
  123. package/layout/_partial/plugins/ai/tianli_gpt.ejs +0 -9
  124. package/layout/_partial/plugins/comments/waline/script.ejs +0 -39
  125. package/layout/_partial/plugins/parser/head.ejs +0 -3
  126. package/layout/_partial/plugins/parser/katex/head.ejs +0 -3
  127. package/layout/_partial/plugins/parser/katex/script.ejs +0 -4
  128. package/layout/_partial/plugins/parser/mermaid/script.ejs +0 -29
  129. package/layout/_partial/plugins/parser/script.ejs +0 -9
  130. package/layout/_partial/scripts/index.ejs +0 -176
  131. package/source/css/_layout/widgets/toc_blog.styl +0 -3
  132. package/source/css/_layout/widgets/toc_common.styl +0 -92
  133. package/source/css/_layout/widgets/toc_wiki.styl +0 -62
  134. package/source/js/plugins/fcircle.js +0 -92
  135. package/source/js/plugins/friends.js +0 -84
  136. package/source/js/plugins/ghinfo.js +0 -85
  137. package/source/js/plugins/linkcard.js +0 -48
  138. package/source/js/plugins/marked.js +0 -50
  139. package/source/js/plugins/memos.js +0 -132
  140. package/source/js/plugins/sites.js +0 -87
  141. package/source/js/plugins/timeline.js +0 -162
  142. package/source/js/plugins/weibo.js +0 -116
  143. /package/layout/_partial/{plugins/comments → comments}/artalk/layout.ejs +0 -0
  144. /package/layout/_partial/{plugins/comments → comments}/beaudar/layout.ejs +0 -0
  145. /package/layout/_partial/{plugins/comments → comments}/beaudar/script.ejs +0 -0
  146. /package/layout/_partial/{plugins/comments → comments}/script.ejs +0 -0
  147. /package/layout/_partial/{plugins/comments → comments}/twikoo/layout.ejs +0 -0
  148. /package/layout/_partial/{plugins/comments/giscus → comments/utterances}/layout.ejs +0 -0
  149. /package/layout/_partial/{plugins/comments → comments}/utterances/script.ejs +0 -0
  150. /package/layout/_partial/{plugins/comments → comments}/waline/layout.ejs +0 -0
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.26.7'
3
+ version: '1.27.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
@@ -21,9 +21,9 @@ open_graph:
21
21
  ######## Sidebar ########
22
22
  # 左上角显示的 logo 区域,包含图标、大标题、副标题
23
23
  logo:
24
- avatar: '[${config.avatar}](/about/)' # you can set avatar link in _config.yml or '[https://xxx.png](/about/)'
25
- title: '[${config.title}](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
26
- subtitle: '' # '文字1 | 文字2' (鼠标放上去会切换到文字2)
24
+ avatar: '[{config.avatar}](/about/)' # you can set avatar link in _config.yml or '[https://xxx.png](/about/)'
25
+ title: '[{config.title}](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
26
+ subtitle: '{config.subtitle}' # '文字1 | 文字2' (鼠标放上去会切换到文字2)
27
27
 
28
28
  # 侧边栏主功能导航菜单
29
29
  menubar:
@@ -62,12 +62,14 @@ site_tree:
62
62
  # -- 列表类页面 -- #
63
63
  # 主页配置
64
64
  home:
65
- sidebar: welcome, recent, timeline
65
+ leftbar: welcome, recent
66
+ rightbar:
66
67
  # 博客列表页配置
67
68
  index_blog:
68
69
  base_dir: blog # 只影响自动生成的页面路径
69
70
  menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
70
- sidebar: welcome, recent, timeline # for categories/tags/archives
71
+ leftbar: welcome, recent # for categories/tags/archives
72
+ rightbar:
71
73
  nav_tabs: # 近期发布 分类 标签 专栏 归档 and ...
72
74
  # '朋友文章': /friends/rss/
73
75
  # 博客专栏列表页配置
@@ -78,34 +80,40 @@ site_tree:
78
80
  index_wiki:
79
81
  base_dir: wiki # 只影响自动生成的页面路径
80
82
  menu_id: wiki # 未在 front-matter 中指定 menu_id 时,layout 为 wiki 的页面默认使用这里配置的 menu_id
81
- sidebar: toc, ghissues, related, recent # for wiki
83
+ leftbar: related, recent # for wiki
84
+ rightbar:
82
85
  nav_tabs:
83
86
  # 'more': https://github.com/xaoxuu
84
87
  # -- 内容类页面 -- #
85
88
  # 博客文章内页配置
86
89
  post:
87
90
  menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
88
- sidebar: toc, related, ghrepo, ghissues, recent # for pages using 'layout:post'
91
+ leftbar: related, recent # for pages using 'layout:post'
92
+ rightbar: ghrepo, toc
89
93
  # 博客专栏文章内页配置
90
94
  topic:
91
95
  menu_id: post
92
96
  # 文档内页配置
93
97
  wiki:
94
98
  menu_id: wiki # 未在 front-matter 中指定 menu_id 时,layout 为 wiki 的页面默认使用这里配置的 menu_id
95
- sidebar: toc, ghissues, related, recent # for wiki
99
+ leftbar: tree, related, recent # for wiki
100
+ rightbar: ghrepo, toc
96
101
  # 作者信息配置
97
102
  author:
98
103
  base_dir: author # 只影响自动生成的页面路径
99
104
  menu_id: post
100
- sidebar: recent, timeline
105
+ leftbar: recent, timeline
106
+ rightbar: timeline
101
107
  # 错误页配置
102
108
  error_page:
103
109
  menu_id: post
104
110
  '404': '/404.html'
105
- sidebar: recent, timeline
111
+ leftbar: recent, timeline
112
+ rightbar: timeline
106
113
  # 其它自定义页面配置 layout: page
107
114
  page:
108
- sidebar: toc, recent, timeline
115
+ leftbar: recent
116
+ rightbar: toc
109
117
 
110
118
 
111
119
 
@@ -147,6 +155,7 @@ search:
147
155
  ######## Comments ########
148
156
  comments:
149
157
  service: # beaudar, utterances, giscus, twikoo, waline, artalk
158
+ comment_title: 快来参与讨论吧~
150
159
  # beaudar
151
160
  # https://beaudar.lipk.org/
152
161
  beaudar:
@@ -183,7 +192,7 @@ comments:
183
192
  data-input-position: top # top, bottom
184
193
  data-theme: preferred_color_scheme
185
194
  data-lang: zh-CN
186
- data-loading: lazy
195
+ data-loading: # lazy
187
196
  crossorigin: anonymous
188
197
 
189
198
  # Twikoo
@@ -195,10 +204,11 @@ comments:
195
204
  # Waline
196
205
  # https://waline.js.org/
197
206
  waline:
198
- js: https://unpkg.com/@waline/client@2.14.1/dist/waline.js
199
- css: https://unpkg.com/@waline/client@2.14.1/dist/waline.css
207
+ js: https://gcore.jsdelivr.net/npm/@waline/client@3.1.2/dist/waline.js
208
+ css: https://gcore.jsdelivr.net/npm/@waline/client@3.1.2/dist/waline.css
209
+ meta_css: https://gcore.jsdelivr.net/npm/@waline/client@3.1.2/dist/waline-meta.css
200
210
  # Waline server address url, you should set this to your own link
201
- serverURL:
211
+ serverURL: https://waline.vercel.app
202
212
  # If false, comment count will only be displayed in post page, not in home page
203
213
  commentCount: true
204
214
  # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`.
@@ -273,18 +283,13 @@ footer:
273
283
  # - '[关于本站](/)'
274
284
  # - '[GitHub](/)'
275
285
  content: | # 支持 Markdown 格式
276
- 本站由 [${author.name}](/) 使用 [${theme.name} ${theme.version}](${theme.tree}) 主题创建。
286
+ 本站由 [{author.name}](/) 使用 [{theme.name} {theme.version}]({theme.tree}) 主题创建。
277
287
  本博客所有文章除特别声明外,均采用 [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议,转载请注明出处。
278
288
  # 主题用户越多,开发者维护和更新的积极性就越高,如果您喜欢本主题,请在适当的位置显示主题信息和仓库链接以表支持。
279
289
 
280
290
 
281
291
  ######## Tag Plugins ########
282
292
  tag_plugins:
283
- # {% link %}
284
- linkcard:
285
- # 设置 api 可以自动提取网页标题、图标,服务部署方法:https://github.com/xaoxuu/site-info-api/
286
- # 接口测试通过后,把按钮的 href 部分替换成 ${href} 之后填写到下方,例如:https://api.vlts.cc/site_info/v1?url=${href}
287
- api:
288
293
  # {% box %} / {% note %}
289
294
  note:
290
295
  default_color: '' # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error
@@ -303,15 +308,18 @@ tag_plugins:
303
308
  prefix: ph:seal-question-fill
304
309
  # {% emoji %}
305
310
  emoji:
306
- default: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/${name}.gif
307
- twemoji: https://gcore.jsdelivr.net/gh/twitter/twemoji/assets/svg/${name}.svg
308
- qq: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/${name}.gif
309
- aru: https://gcore.jsdelivr.net/gh/cdn-x/emoji/aru-l/${name}.gif
310
- tieba: https://gcore.jsdelivr.net/gh/cdn-x/emoji/tieba/${name}.png
311
- blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/${name}.png
311
+ default: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/{name}.gif
312
+ twemoji: https://gcore.jsdelivr.net/gh/twitter/twemoji/assets/svg/{name}.svg
313
+ qq: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/{name}.gif
314
+ aru: https://gcore.jsdelivr.net/gh/cdn-x/emoji/aru-l/{name}.gif
315
+ tieba: https://gcore.jsdelivr.net/gh/cdn-x/emoji/tieba/{name}.png
316
+ blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/{name}.png
312
317
  icon:
313
318
  # 留空时,图标和文字颜色相同
314
319
  default_color: accent # theme, accent, red, orange, yellow, green, cyan, blue, purple
320
+ # {% button 标题 链接 %}
321
+ button:
322
+ default_color: theme # theme, accent, red, orange, yellow, green, cyan, blue, purple
315
323
  # {% image %}
316
324
  image:
317
325
  fancybox: false # true, false
@@ -354,77 +362,123 @@ tag_plugins:
354
362
  size: mix # s / m / l / xl / mix
355
363
  ratio: square # origin / square
356
364
 
357
-
358
365
 
359
-
360
- ######## JS Plugins ########
361
- plugins:
362
- ## required plugins ##
363
- # jquery
366
+ # 基础依赖
367
+ dependencies:
364
368
  jquery: https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js
369
+ marked: https://cdn.bootcdn.net/ajax/libs/marked/4.0.18/marked.min.js
365
370
 
366
- # stellar api
367
- stellar:
368
- sites: /js/plugins/sites.js
369
- friends: /js/plugins/friends.js
370
- ghinfo: /js/plugins/ghinfo.js
371
- timeline: /js/plugins/timeline.js
372
- linkcard: /js/plugins/linkcard.js
373
- fcircle: /js/plugins/fcircle.js
374
- weibo: /js/plugins/weibo.js
375
- memos: /js/plugins/memos.js
376
- marked: /js/plugins/marked.js
377
371
 
378
- marked: https://cdn.bootcdn.net/ajax/libs/marked/4.0.18/marked.min.js
372
+ # 内置服务,按需加载(页面内用到了就会加载,没有用到就不会加载)
373
+ data_services:
374
+ # 外部 md 渲染
375
+ mdrender:
376
+ js: /js/services/mdrender.js
377
+ # 数据填充类
378
+ siteinfo:
379
+ js: /js/services/siteinfo.js
380
+ # 设置 api 可以自动提取网页标题、图标,服务部署方法:https://github.com/xaoxuu/site-info-api/
381
+ # 接口测试通过后,把按钮的 href 部分替换成 {href} 之后填写到下方,例如:https://api.vlts.cc/site_info/v1?url={href}
382
+ api:
383
+ ghinfo:
384
+ js: /js/services/ghinfo.js
385
+ # 网格布局类
386
+ sites:
387
+ js: /js/services/sites.js
388
+ friends:
389
+ js: /js/services/friends.js
390
+ # 列表布局类
391
+ timeline:
392
+ js: /js/services/timeline.js
393
+ fcircle:
394
+ js: /js/services/fcircle.js
395
+ weibo:
396
+ js: /js/services/weibo.js
397
+ memos:
398
+ js: /js/services/memos.js
399
+
400
+
401
+ # 扩展插件接入方法:(插件名下面用 #plugin# 代替)
402
+ # 1. 在这里增加 #plugin# 配置,至少赢含有 enable 字段,默认为空(不启用)
403
+ # 2. 新建文件 layout/_plugins/#plugin#.ejs 文件中设置编写加载代码。
404
+ # 2.1. 在该文件中可以直接使用 conf 来读取用户在【步骤 1】填写的配置字段内容
405
+ # 2.2. 如果需要引入 css 或 js,可以使用 utils.css(xxx)、utils.js(xxx),具体可参考 layout/_plugins/fancybox.ejs
406
+ # 2.3. 如果需要本地 js 文件,请放入 /source/js/plugins 文件夹中,引入方式为:utils.js('/js/plugins/xxx.js');
407
+ # 3. 如果这个插件只需要引入外部文件,可以在【步骤 1】处增加 inject 字段,而无需进入【步骤 2】创建 ejs,参考 katex
408
+ plugins:
379
409
 
380
- ## optional plugins ##
381
410
  # preload
382
411
  preload:
383
412
  enable: true
384
413
  service: flying_pages # flying_pages
385
414
  flying_pages: https://cdn.bootcdn.net/ajax/libs/flying-pages/2.1.2/flying-pages.min.js
386
415
 
387
- # image lazyload
416
+ # lazyload
388
417
  # https://www.npmjs.com/package/vanilla-lazyload
389
418
  lazyload:
390
419
  enable: true # [hexo clean && hexo s] is required after changing this value.
391
420
  js: https://cdn.bootcdn.net/ajax/libs/vanilla-lazyload/17.8.4/lazyload.min.js
392
421
  transition: fade # blur, fade
393
422
 
394
- # https://scrollrevealjs.org/api/reveal.html
395
- scrollreveal:
396
- enable: #true
397
- js: https://cdn.bootcdn.net/ajax/libs/scrollReveal.js/4.0.9/scrollreveal.min.js
398
- distance: 16px
399
- duration: 800 # ms
400
- interval: 100 # ms
401
- scale: 1 # 0.1~1
402
-
403
423
  # https://fancyapps.com/docs/ui/fancybox/
404
424
  # available for {% image xxx %}
405
425
  fancybox:
406
426
  enable: true
427
+ loader: /js/plugins/fancybox-loader.js
407
428
  js: https://cdn.bootcdn.net/ajax/libs/fancyapps-ui/5.0.22/fancybox/fancybox.umd.min.js
408
429
  css: https://cdn.bootcdn.net/ajax/libs/fancyapps-ui/5.0.22/fancybox/fancybox.min.css
430
+ # 让 md 语法图片支持放大可以这样写: .md-text img:not([class]), .md-text .image img
409
431
  # 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
410
- # 使用twikoo评论可以写: .tk-content img:not([class*="emo"])
411
- # 使用waline评论可以写: #waline_container .vcontent img
412
- selector: # 多个选择器用英文逗号隔开
432
+ # 使用 twikoo 评论可以写: .tk-content img:not([class*="emo"])
433
+ # 使用 waline 评论可以写: #waline_container .vcontent img
434
+ selector: .timenode p>img # 多个选择器用英文逗号隔开
413
435
 
414
436
  # swiper
415
437
  swiper:
416
438
  enable: true
417
- css: https://unpkg.com/swiper@10.3/swiper-bundle.min.css
418
- js: https://unpkg.com/swiper@10.3/swiper-bundle.min.js
439
+ css: https://unpkg.com/swiper@10.3.1/swiper-bundle.min.css
440
+ js: https://unpkg.com/swiper@10.3.1/swiper-bundle.min.js
419
441
 
442
+ # https://scrollrevealjs.org/api/reveal.html
443
+ scrollreveal:
444
+ enable: #true
445
+ js: https://cdn.bootcdn.net/ajax/libs/scrollReveal.js/4.0.9/scrollreveal.min.js
446
+ distance: 16px
447
+ duration: 800 # ms
448
+ interval: 100 # ms
449
+ scale: 1 # 0.1~1
450
+
451
+ # AI 摘要
452
+ # https://github.com/qxchuckle/Post-Summary-AI
453
+ tianli_gpt:
454
+ enable: #true
455
+ js: https://jsd.onmicrosoft.cn/gh/qxchuckle/Post-Summary-AI@6.0/chuckle-post-ai.min.js
456
+ field: post # all, post, wiki
457
+ key: 5Q5mpqRK5DkwT1X9Gi5e # tianli_gpt key
458
+ total_length: 1000 # 设置提交的字数限制,默认为1000字,上限为5000,超过5000字符将被截断
459
+ typewriter: true # 打字机动画
460
+ summary_directly: true # 是否直接显示摘要,否则显示 AI 简介
461
+ rec_method: all # all, web # 文章推荐方式,all:匹配数据库内所有文章进行推荐,web:仅当前站内的文章,默认all
462
+ hide_shuttle: true # 是否隐藏矩阵穿梭
463
+ summary_toggle: false
464
+ interface:
465
+ name: AI摘要
466
+ introduce: '我是文章辅助AI: QX-AI,点击下方的按钮,让我生成本文简介、推荐相关文章等。'
467
+ version: TianliGPT
468
+ button: ["介绍自己", "推荐文章", "生成摘要", "矩阵穿梭"]
420
469
 
421
- # 赫蹏 (Heti) - 专为中文网页内容设计的排版样式增强
422
- # https://github.com/sivan/heti
423
- heti:
424
- enable: false # 此插件会和代码块冲突,仅适用于纯中文博主。
425
- css: https://unpkg.com/heti@0.9.2/umd/heti.min.css
426
- js: https://unpkg.com/heti@0.9.2/umd/heti-addon.min.js
427
470
 
471
+ # Katex - The fastest math typesetting library for the web
472
+ # https://katex.org/docs/autorender.html
473
+ # https://github.com/KaTeX/KaTeX
474
+ # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器:npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save
475
+ katex:
476
+ enable: #true # 可以在特定文章的 front-matter 中设置 katex: true 来开启,也可以在这里设置全局开启
477
+ inject: |
478
+ <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
479
+ <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script>
480
+ <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script>
481
+
428
482
  # MathJax
429
483
  # 需在Markdown文件开头加入mathjax: true
430
484
  # 推荐使用Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save
@@ -432,16 +486,6 @@ plugins:
432
486
  enable: # true # 可以在特定文章的 front-matter 中设置 mathjax: true 来开启,也可以在这里设置全局开启
433
487
  js: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML
434
488
 
435
- # Katex - The fastest math typesetting library for the web
436
- # https://katex.org/docs/autorender.html
437
- # https://github.com/KaTeX/KaTeX
438
- # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器:npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save
439
- katex:
440
- enable: # true # 可以在特定文章的 front-matter 中设置 katex: true 来开启,也可以在这里设置全局开启
441
- min_css: <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
442
- min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script>
443
- auto_render_min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script>
444
-
445
489
  # Mermaid - markdwon to flow chart, seq chart, class chart ...
446
490
  # 需要安装 npm install --save hexo-filter-mermaid-diagrams
447
491
  # 使用时 需要在Markdown文件开头加入 mermaid: true
@@ -458,26 +502,25 @@ plugins:
458
502
  js: https://cdn.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js
459
503
  # Available themes: default | dark | forest | neutral
460
504
  theme: neutral
461
-
505
+
462
506
  # 代码块复制按钮
463
507
  copycode:
464
508
  enable: true
465
- js: /js/plugins/copycode.js
466
509
  default_text: 'Copy'
467
510
  success_text: 'Copied'
468
511
  toast: 复制成功
469
512
 
470
- # AI 摘要
471
- # https://github.com/zhheo/Post-Abstract-AI
472
- tianli_gpt:
473
- enable: false
474
- field: post # all, post, wiki
475
- api: 5Q5mpqRK5DkwT1X9Gi5e # tianli_gpt key
476
- limit: 1000 # 设置提交的字数限制,默认为1000字,上限为5000,超过5000字符将被截断,不能为空
477
- typingAnimate: true # 打字机动画
513
+ # 赫蹏 (Heti) - 专为中文网页内容设计的排版样式增强
514
+ # https://github.com/sivan/heti
515
+ heti:
516
+ enable: false # 此插件会和代码块冲突,仅适用于纯中文博主。
517
+ css: https://unpkg.com/heti@0.9.2/umd/heti.min.css
518
+ js: https://unpkg.com/heti@0.9.2/umd/heti-addon.min.js
519
+
520
+
478
521
 
479
522
  style:
480
- darkmode: auto # auto / always / false
523
+ prefers_theme: auto # auto / light / dark
481
524
  smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
482
525
  font-size:
483
526
  root: 16px # 改这个会影响全局所有文字的字号
@@ -507,7 +550,6 @@ style:
507
550
  theme: 'hsl(192 98% 55%)' # 主题色
508
551
  accent: 'hsl(14 100% 57%)' # 强调色
509
552
  link: 'hsl(207 90% 54%)' # 超链接颜色
510
- button: 'hsl(192 98% 55%)' # 按钮颜色
511
553
  hover: 'hsl(14 100% 57%)' # 按钮高亮颜色
512
554
  animated_avatar:
513
555
  animate: auto # auto, always
@@ -520,11 +562,9 @@ style:
520
562
  error: 加载失败,请稍后重试。
521
563
  gradient: # https://webgradients.com/
522
564
  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%))'
523
- search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)'
524
- sidebar:
565
+ leftbar:
525
566
  # 可以设置:纯色/渐变色/图片作为背景
526
- # background: var(--sidebar-bg)
527
- # background-image: 'linear-gradient(to bottom, var(--sidebar-bg), var(--sidebar-bg))'
567
+ # background: var(--leftbar-bg)
528
568
  background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)
529
569
  blur-px: 100px
530
570
  blur-bg: var(--alpha60)
package/_data/icons.yml CHANGED
@@ -21,11 +21,18 @@ default:rss: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" view
21
21
  default:bookmark.active: <svg class="active-icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.225 2.225 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.238 2.238 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333C5.636 2 7.758 2 12 2c4.243 0 6.364 0 7.682 1.332C21 4.665 21 6.81 21 11.098" opacity=".5"/><path fill="currentColor" d="M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z"/></svg>
22
22
 
23
23
  # 侧边栏弹出按钮
24
- default:sidebar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 11c0-3.771 0-5.657 1.172-6.828C4.343 3 6.229 3 10 3h4c3.771 0 5.657 0 6.828 1.172C22 5.343 22 7.229 22 11v2c0 3.771 0 5.657-1.172 6.828C19.657 21 17.771 21 14 21h-4c-3.771 0-5.657 0-6.828-1.172C2 18.657 2 16.771 2 13z"/><path id="sep" stroke-linecap="round" d="M5.5 10h6m-5 4h4m4.5 7V3"/></g></svg>
24
+ default:leftbar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 11c0-3.771 0-5.657 1.172-6.828C4.343 3 6.229 3 10 3h4c3.771 0 5.657 0 6.828 1.172C22 5.343 22 7.229 22 11v2c0 3.771 0 5.657-1.172 6.828C19.657 21 17.771 21 14 21h-4c-3.771 0-5.657 0-6.828-1.172C2 18.657 2 16.771 2 13z"/><path id="sep" stroke-linecap="round" d="M5.5 10h6m-5 4h4m4.5 7V3"/></g></svg>
25
+ default:rightbar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6h11m-11 6h11m-11 6h11M4 6h1v4m-1 0h2m0 8H4c0-1 2-2 2-3s-1-1.5-2-1"/></svg>
26
+
25
27
  default:pin: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m12 16.068l-3.771 3.905c-.54.559-.81.839-1.04.935c-.52.22-1.099.032-1.373-.448c-.12-.21-.158-.59-.232-1.35c-.043-.43-.064-.644-.128-.824a1.433 1.433 0 0 0-.835-.864c-.173-.067-.38-.089-.795-.133c-.734-.077-1.101-.116-1.305-.24c-.463-.284-.646-.883-.433-1.422c.094-.237.364-.517.904-1.076L5.456 12l1.238-1.238zl5.306-5.306L18.544 12l2.464 2.55c.54.56.81.84.904 1.076c.213.54.03 1.139-.433 1.423c-.204.124-.57.163-1.305.24c-.414.044-.622.066-.795.133c-.389.149-.69.462-.835.864c-.064.18-.085.394-.128.823c-.075.76-.112 1.14-.232 1.351c-.274.48-.853.669-1.374.448c-.228-.096-.498-.376-1.038-.935z" opacity=".5"/><path fill="currentColor" fill-rule="evenodd" d="M12 16a7 7 0 1 0 0-14a7 7 0 0 0 0 14m0-10c-.284 0-.474.34-.854 1.023l-.098.176c-.108.194-.162.29-.246.354c-.085.064-.19.088-.4.135l-.19.044c-.738.167-1.107.25-1.195.532c-.088.283.164.577.667 1.165l.13.152c.143.167.215.25.247.354c.032.104.021.215 0 .438l-.02.203c-.076.785-.114 1.178.115 1.352c.23.174.576.015 1.267-.303l.178-.082c.197-.09.295-.135.399-.135c.104 0 .202.045.399.135l.178.082c.691.319 1.037.477 1.267.303c.23-.174.191-.567.115-1.352l-.02-.203c-.021-.223-.032-.334 0-.438c.032-.103.104-.187.247-.354l.13-.152c.503-.588.755-.882.667-1.165c-.088-.282-.457-.365-1.195-.532l-.19-.044c-.21-.047-.315-.07-.4-.135c-.084-.064-.138-.16-.246-.354l-.098-.176C12.474 6.34 12.284 6 12 6" clip-rule="evenodd"/></svg>
26
28
  default:calendar: <svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg>
27
29
  default:category: <svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>
28
30
 
31
+ # 编辑本文
32
+ default:edit: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M11.943 1.25H13.5a.75.75 0 0 1 0 1.5H12c-2.378 0-4.086.002-5.386.176c-1.279.172-2.05.5-2.62 1.069c-.569.57-.896 1.34-1.068 2.619c-.174 1.3-.176 3.008-.176 5.386s.002 4.086.176 5.386c.172 1.279.5 2.05 1.069 2.62c.57.569 1.34.896 2.619 1.068c1.3.174 3.008.176 5.386.176s4.086-.002 5.386-.176c1.279-.172 2.05-.5 2.62-1.069c.569-.57.896-1.34 1.068-2.619c.174-1.3.176-3.008.176-5.386v-1.5a.75.75 0 0 1 1.5 0v1.557c0 2.309 0 4.118-.19 5.53c-.194 1.444-.6 2.584-1.494 3.479c-.895.895-2.035 1.3-3.48 1.494c-1.411.19-3.22.19-5.529.19h-.114c-2.309 0-4.118 0-5.53-.19c-1.444-.194-2.584-.6-3.479-1.494c-.895-.895-1.3-2.035-1.494-3.48c-.19-1.411-.19-3.22-.19-5.529v-.114c0-2.309 0-4.118.19-5.53c.194-1.444.6-2.584 1.494-3.479c.895-.895 2.035-1.3 3.48-1.494c1.411-.19 3.22-.19 5.529-.19m4.827 1.026a3.503 3.503 0 0 1 4.954 4.953l-6.648 6.649c-.371.37-.604.604-.863.806a5.34 5.34 0 0 1-.987.61c-.297.141-.61.245-1.107.411l-2.905.968a1.492 1.492 0 0 1-1.887-1.887l.968-2.905c.166-.498.27-.81.411-1.107c.167-.35.372-.68.61-.987c.202-.26.435-.492.806-.863zm3.893 1.06a2.003 2.003 0 0 0-2.832 0l-.376.377c.022.096.054.21.098.338c.143.413.415.957.927 1.469a3.875 3.875 0 0 0 1.807 1.025l.376-.376a2.003 2.003 0 0 0 0-2.832m-1.558 4.391a5.397 5.397 0 0 1-1.686-1.146a5.395 5.395 0 0 1-1.146-1.686L11.218 9.95c-.417.417-.58.582-.72.76a3.84 3.84 0 0 0-.437.71c-.098.203-.172.423-.359.982l-.431 1.295l1.032 1.033l1.295-.432c.56-.187.779-.261.983-.358c.251-.12.49-.267.71-.439c.177-.139.342-.302.759-.718z" clip-rule="evenodd"/></svg>
33
+ default:upup: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"/><path stroke-linecap="round" stroke-linejoin="round" d="m9 15.5l3-3l3 3m-6-4l3-3l3 3"/></g></svg>
34
+
35
+
29
36
  github:logo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
30
37
  github:repo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
31
38
  github:star: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>
package/_data/widgets.yml CHANGED
@@ -21,22 +21,34 @@ recent:
21
21
  rss: # /atom.xml # npm i hexo-generator-feed
22
22
  limit: 10 # Count of posts
23
23
 
24
- # TOC (valid only in layout:post/wiki)
24
+ # 页面树(与当前页面强关联的上下篇文章列表)
25
+ tree:
26
+ layout: tree
27
+
28
+ # 本文目录(当前页面内各级标题列表)
25
29
  toc:
26
30
  layout: toc
27
31
  list_number: false
28
- min_depth: 2
29
- max_depth: 5
30
- fallback: # recent # Use a backup widget when toc does not exist.
32
+ min_depth: 1
33
+ max_depth: 6
31
34
  collapse: false # true / false / auto
35
+ # 编辑本文按钮
36
+ edit_this_page: # 从开头开始匹配替换
37
+ '_posts/': # https://github.com/xaoxuu/xaoxuu.com/blob/main/source/_posts/
38
+ 'wiki/stellar/': https://github.com/xaoxuu/hexo-theme-stellar-docs/blob/main/
32
39
 
33
- # github user info
40
+ # GitHub 用户信息
34
41
  ghuser:
35
42
  layout: ghuser
36
- username: github # your github login username
43
+ username: # your github login username
37
44
  avatar: true # show avatar or not
38
- menu: true # show menu or not
39
45
 
46
+ # 本文作者组件,需要先配置作者信息: authors.yml
47
+ author:
48
+ layout: author
49
+ avatar: true
50
+
51
+ # 标签云组件
40
52
  tagcloud:
41
53
  layout: tagcloud
42
54
  title: 标签云
package/languages/en.yml CHANGED
@@ -10,11 +10,14 @@ btn:
10
10
  tag: Tag
11
11
  tags: Tags
12
12
  archives: Archives
13
+ all_posts: All Posts
13
14
  getting_started: Getting Started
15
+ edit: Edit This Page
16
+ top: Scroll to Top
14
17
 
15
18
  meta:
16
19
  recent_update: Recent Update
17
- toc: TOC
20
+ toc: On This Page
18
21
  read_next: READ NEXT
19
22
  prev: Prev
20
23
  next: Next
@@ -22,7 +25,6 @@ meta:
22
25
  newer: Newer
23
26
  references: References
24
27
  related_posts: Related Posts
25
- comment_title: Join the discussion
26
28
  back_to_top: Back to top
27
29
  more: More
28
30
  created_author: '%s posted on'
@@ -10,7 +10,10 @@ btn:
10
10
  tag: 标签
11
11
  tags: 标签
12
12
  archives: 归档
13
+ all_posts: 所有文章
13
14
  getting_started: 开始使用
15
+ edit: 编辑本文
16
+ top: 回到顶部
14
17
 
15
18
  meta:
16
19
  recent_update: 最近更新
@@ -22,7 +25,6 @@ meta:
22
25
  newer: 较新文章
23
26
  references: 参考资料
24
27
  related_posts: 您可能感兴趣的文章
25
- comment_title: 快来参与讨论吧
26
28
  back_to_top: 回到顶部
27
29
  more: 更多
28
30
  created_author: 本文由 %s 发布于
@@ -4,13 +4,16 @@ btn:
4
4
  wiki: 文檔
5
5
  topic: 專欄
6
6
  recent_publish: 近期發布
7
- all_wiki: 所有 Wiki
7
+ all_wiki: 所有文檔
8
8
  category: 分類
9
9
  categories: 分類
10
10
  tag: 標籤
11
11
  tags: 標籤
12
12
  archives: 封存
13
+ all_posts: 所有網誌
13
14
  getting_started: 開始使用
15
+ edit: 編輯本文
16
+ top: 回到頂部
14
17
 
15
18
  meta:
16
19
  recent_update: 最近更新
@@ -22,7 +25,6 @@ meta:
22
25
  newer: 較新文章
23
26
  references: 參考資料
24
27
  related_posts: 您可能感興趣的文章
25
- comment_title: 參與討論
26
28
  back_to_top: 回到頁首
27
29
  more: 更多
28
30
  created_author: 本文由 %s 發布於
package/layout/404.ejs CHANGED
@@ -16,4 +16,4 @@ page.robots = 'none';
16
16
  <br><br>
17
17
  <a class='button' id='back' href="<%- config.root %>"><%- __('page.error.action') %></a>
18
18
  </article>
19
- <%- partial('_partial/plugins/comments/layout') %>
19
+ <%- partial('_partial/comments/layout') %>
@@ -1,8 +1,8 @@
1
1
  <script>
2
2
  function load_artalk() {
3
3
  if (!document.querySelectorAll("#artalk_container")[0]) return;
4
- stellar.loadCSS('<%- theme.comments.artalk.css %>');
5
- stellar.loadScript('<%- theme.comments.artalk.js %>', {defer: true}).then(function () {
4
+ utils.css('<%- theme.comments.artalk.css %>');
5
+ utils.js('<%- theme.comments.artalk.js %>', {defer: true}).then(function () {
6
6
  const el = document.getElementById("artalk_container");
7
7
  var path = el.getAttribute('comment_id');
8
8
  if (!path) {
@@ -2,9 +2,12 @@
2
2
  function layoutDiv() {
3
3
  var el = '';
4
4
  const cmt = page.cmt;
5
- if (cmt && cmt.service && (cmt.service.length > 0)) {
5
+ if (cmt?.service?.length > 0) {
6
6
  const name = cmt.service;
7
- const body = cmt[name];
7
+ var body = cmt[name];
8
+ if (theme.style.prefers_theme != 'auto' && body['data-theme'] == 'preferred_color_scheme') {
9
+ body['data-theme'] = theme.style.prefers_theme
10
+ }
8
11
  el += '<div id="' + name + '"';
9
12
  for (let key of Object.keys(body)) {
10
13
  if (body[key] !== null) {
@@ -1,5 +1,5 @@
1
1
  <script>
2
- function loadJS() {
2
+ window.addEventListener('DOMContentLoaded', (event) => {
3
3
  const els = document.querySelectorAll("#comments #giscus");
4
4
  if (els.length === 0) return;
5
5
  els.forEach((el, i) => {
@@ -18,8 +18,5 @@
18
18
  }
19
19
  el.appendChild(script);
20
20
  });
21
- }
22
- window.addEventListener('DOMContentLoaded', (event) => {
23
- loadJS();
24
21
  });
25
22
  </script>
@@ -33,7 +33,7 @@ page.cmt = cmt;
33
33
  <% if (loadComment) { %>
34
34
  <div class="related-wrap md-text<%- scrollreveal(' ') %>" id="comments">
35
35
  <section class='header cmt-title cap theme'>
36
- <%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
36
+ <%- markdown(page.comment_title || theme.comments.comment_title) %>
37
37
  </section>
38
38
  <section class='body cmt-body <%- cmt.service %>'>
39
39
  <%- partial(cmt.service + '/layout') %>
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  function load_twikoo() {
3
3
  if (!document.querySelectorAll("#twikoo_container")[0]) return;
4
- stellar.loadScript('<%- theme.comments.twikoo.js %>', {defer: true}).then(function () {
4
+ utils.js('<%- theme.comments.twikoo.js %>', {defer: true}).then(function () {
5
5
  const el = document.getElementById("twikoo_container");
6
6
  var path = el.getAttribute('comment_id');
7
7
  if (!path) {