hexo-theme-ayeria 1.9.7-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 (120) hide show
  1. package/LICENSE +38 -0
  2. package/README.md +553 -0
  3. package/_config.yml +271 -0
  4. package/_scaffolds/post.md +8 -0
  5. package/index.js +2 -0
  6. package/languages/de.yml +39 -0
  7. package/languages/default.yml +39 -0
  8. package/languages/en.yml +39 -0
  9. package/languages/es.yml +39 -0
  10. package/languages/fr.yml +39 -0
  11. package/languages/ja.yml +39 -0
  12. package/languages/ko.yml +39 -0
  13. package/languages/nl.yml +39 -0
  14. package/languages/no.yml +39 -0
  15. package/languages/pt.yml +39 -0
  16. package/languages/ru.yml +39 -0
  17. package/languages/vi.yml +39 -0
  18. package/languages/zh-CN.yml +39 -0
  19. package/languages/zh-TW.yml +39 -0
  20. package/layout/_partial/ads.ejs +9 -0
  21. package/layout/_partial/after-footer.ejs +84 -0
  22. package/layout/_partial/archive-post.ejs +14 -0
  23. package/layout/_partial/archive.ejs +62 -0
  24. package/layout/_partial/article.ejs +94 -0
  25. package/layout/_partial/ayeria.ejs +53 -0
  26. package/layout/_partial/baidu-analytics.ejs +11 -0
  27. package/layout/_partial/broadcast.ejs +20 -0
  28. package/layout/_partial/float-btns.ejs +8 -0
  29. package/layout/_partial/footer.ejs +62 -0
  30. package/layout/_partial/google-analytics.ejs +10 -0
  31. package/layout/_partial/head.ejs +67 -0
  32. package/layout/_partial/katex.ejs +22 -0
  33. package/layout/_partial/lock.ejs +37 -0
  34. package/layout/_partial/mathjax.ejs +19 -0
  35. package/layout/_partial/modal.ejs +77 -0
  36. package/layout/_partial/music.ejs +16 -0
  37. package/layout/_partial/post/albums.ejs +17 -0
  38. package/layout/_partial/post/author.ejs +8 -0
  39. package/layout/_partial/post/busuanzi.ejs +5 -0
  40. package/layout/_partial/post/category.ejs +10 -0
  41. package/layout/_partial/post/clipboard.ejs +54 -0
  42. package/layout/_partial/post/date.ejs +3 -0
  43. package/layout/_partial/post/gallery.ejs +15 -0
  44. package/layout/_partial/post/giscus.ejs +40 -0
  45. package/layout/_partial/post/gitalk.ejs +12 -0
  46. package/layout/_partial/post/justifiedGallery.ejs +9 -0
  47. package/layout/_partial/post/nav.ejs +22 -0
  48. package/layout/_partial/post/search.ejs +4 -0
  49. package/layout/_partial/post/share.ejs +51 -0
  50. package/layout/_partial/post/tag.ejs +6 -0
  51. package/layout/_partial/post/title.ejs +16 -0
  52. package/layout/_partial/post/tocbot.ejs +6 -0
  53. package/layout/_partial/post/topping.ejs +3 -0
  54. package/layout/_partial/post/twikoo.ejs +7 -0
  55. package/layout/_partial/post/valine.ejs +48 -0
  56. package/layout/_partial/post/word.ejs +20 -0
  57. package/layout/_partial/sidebar.ejs +34 -0
  58. package/layout/_partial/viewer.ejs +106 -0
  59. package/layout/archive.ejs +1 -0
  60. package/layout/categories.ejs +8 -0
  61. package/layout/friends.ejs +20 -0
  62. package/layout/index.ejs +4 -0
  63. package/layout/layout.ejs +31 -0
  64. package/layout/page.ejs +3 -0
  65. package/layout/plain-page.ejs +4 -0
  66. package/layout/post.ejs +3 -0
  67. package/layout/tags.ejs +88 -0
  68. package/logo.png +0 -0
  69. package/package.json +38 -0
  70. package/scripts/default_config.js +6 -0
  71. package/scripts/events/index.js +11 -0
  72. package/scripts/events/lib/hello.js +45 -0
  73. package/scripts/events/lib/merge-configs.js +28 -0
  74. package/scripts/filters/index.js +13 -0
  75. package/scripts/filters/meta_generator.js +17 -0
  76. package/scripts/helpers/ayeria-plus-vendors.js +9 -0
  77. package/scripts/helpers/category-tree.js +90 -0
  78. package/scripts/helpers/wordcount.js +39 -0
  79. package/scripts/lib/core.js +25 -0
  80. package/scripts/utils/join-path.js +12 -0
  81. package/scripts/utils/object.js +31 -0
  82. package/source/404.html +187 -0
  83. package/source/css/clipboard.styl +37 -0
  84. package/source/css/custom.styl +971 -0
  85. package/source/css/fonts/remixicon.css +1816 -0
  86. package/source/css/fonts/remixicon.eot +0 -0
  87. package/source/css/fonts/remixicon.svg +5329 -0
  88. package/source/css/fonts/remixicon.ttf +0 -0
  89. package/source/css/fonts/remixicon.woff +0 -0
  90. package/source/css/fonts/remixicon.woff2 +0 -0
  91. package/source/data/random-sentences.txt +136 -0
  92. package/source/dist/main.css +1 -0
  93. package/source/dist/main.js +1 -0
  94. package/source/favicon.svg +1 -0
  95. package/source/images/ayeria-side.svg +1 -0
  96. package/source/images/ayeria.png +0 -0
  97. package/source/images/ayeria.svg +1 -0
  98. package/source/images/beian.png +0 -0
  99. package/source/images/cover1.jpg +0 -0
  100. package/source/images/cover2.webp +0 -0
  101. package/source/images/cover3.jpg +0 -0
  102. package/source/images/cover4.jpg +0 -0
  103. package/source/images/cover5.jpg +0 -0
  104. package/source/images/cover6.jpg +0 -0
  105. package/source/images/forkme.png +0 -0
  106. package/source/images/gitee.png +0 -0
  107. package/source/images/github.png +0 -0
  108. package/source/images/hexo-tag-chart.png +0 -0
  109. package/source/images/hexo.png +0 -0
  110. package/source/images/mouse.cur +0 -0
  111. package/source/js/busuanzi-2.3.pure.min.js +1 -0
  112. package/source/js/clickBoom1.js +152 -0
  113. package/source/js/clickBoom2.js +180 -0
  114. package/source/js/clickLove.js +1 -0
  115. package/source/js/dz.js +1 -0
  116. package/source/js/jquery-3.6.0.min.js +2 -0
  117. package/source/js/lazyload.min.js +8 -0
  118. package/source/js/random-sentences.js +166 -0
  119. package/source/js/search.js +127 -0
  120. package/source/js/tocbot.min.js +1 -0
package/LICENSE ADDED
@@ -0,0 +1,38 @@
1
+ The Star And Thank Author License (SATA)
2
+
3
+ Copyright © 2019 Shen-Yu(shenyu@hotmail.com)
4
+
5
+ Project Url: https://github.com/Shen-Yu/hexo-theme-ayer (original)
6
+ Project Url: https://github.com/KaleidScoper/hexo-theme-ayeria (maintained fork)
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ And wait, the most important, you shall star/+1/like the project(s) in project url
19
+ section above first, and then thank the author(s) in Copyright section.
20
+
21
+ Here are some suggested ways:
22
+
23
+ - Email the authors a thank-you letter, and make friends with him/her/them.
24
+ - Report bugs or issues.
25
+ - Tell friends what a wonderful project this is.
26
+ - And, sure, you can just express thanks in your mind without telling the world.
27
+
28
+ Contributors of this project by forking have the option to add his/her name and
29
+ forked project url at copyright and project url sections, but shall not delete
30
+ or modify anything else in these two sections.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
38
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,553 @@
1
+ # hexo-theme-ayeria
2
+
3
+ 一个干净且优雅的 Hexo 博客主题,基于 [Ayer](https://github.com/Shen-Yu/hexo-theme-ayer) 深度定制。
4
+
5
+ Ayeria —— 源自 Ayer(马来语"水"、西班牙语"昨日"),独立维护的衍生主题。原作者:[Eric-Shen](https://github.com/Shen-Yu)。
6
+
7
+ ## 功能特性
8
+
9
+ - 全屏封面 + typed.js 打字动效
10
+ - 深色模式一键切换
11
+ - 本地搜索(XML 索引 + 前端全文检索)
12
+ - 四种评论系统(Valine / Gitalk / Twikoo / Giscus)
13
+ - 数学公式(MathJax / KaTeX)+ Mermaid 流程图
14
+ - 打赏功能(数据驱动,支持多渠道、子渠道、品牌色、图标)
15
+ - 文章 TOC 目录、字数统计、代码复制、图片放大、版权声明
16
+ - 随机句子(本地 txt 文件或内置句子库,防重复队列)
17
+ - 告示板(自定义文字 / 一言 API)
18
+ - 访问量统计(不蒜子 / 友盟 CNZZ / Google Analytics / 百度统计)
19
+ - 网易云音乐嵌入
20
+ - 鼠标特效(自定义光标、点击爱心/爆炸/粒子)
21
+ - Canvas 动态背景
22
+ - 加密锁屏(SweetAlert2)
23
+ - 广告位、ICP/公安备案信息
24
+ - 14 种语言支持
25
+ - 自定义 CSS(`source/css/custom.styl`)
26
+ - Rollup 构建流水线
27
+
28
+ ## 安装
29
+
30
+ ### 方式一:npm(Hexo >= 5.0)
31
+
32
+ ```bash
33
+ npm i hexo-theme-ayeria -S
34
+ ```
35
+
36
+ ### 方式二:Git
37
+
38
+ ```bash
39
+ git clone https://github.com/KaleidScoper/hexo-theme-ayeria.git themes/ayeria
40
+ ```
41
+
42
+ 在站点根目录的 `_config.yml` 中启用主题:
43
+
44
+ ```yml
45
+ theme: ayeria
46
+ ```
47
+
48
+ ## 配置
49
+
50
+ 主题自带默认配置文件 `themes/ayeria/_config.yml`。你**不应直接修改**这个文件,而是在站点根目录创建 `_config.ayeria.yml`,只填写需要覆盖的选项。Hexo 5+ 会自动将其与主题默认配置合并。
51
+
52
+ 下文列出所有可配置项。
53
+
54
+ ### 侧边栏菜单
55
+
56
+ ```yml
57
+ menu:
58
+ 主页: /
59
+ 全部文章: /archives
60
+ 文章分类: /categories
61
+ 全部标签: /tags
62
+ 友情链接: /friends
63
+ 关于本站: /about
64
+ ```
65
+
66
+ 添加的页面需要先用 `hexo new page <name>` 创建(详见下方[页面创建](#页面创建))。
67
+
68
+ ### 封面
69
+
70
+ 全屏背景图封面,可选叠加 Logo。主题内附一张示例封面图 `source/images/cover2.webp`。
71
+
72
+ ```yml
73
+ cover:
74
+ enable: true
75
+ path: /images/cover.jpg # 背景图路径(放在主题或站点的 source/images/ 下)
76
+ logo: false # 封面 Logo 图片路径,不需要设为 false
77
+ ```
78
+
79
+ ### 打字动效
80
+
81
+ 封面上基于 [typed.js](https://github.com/mattboldt/typed.js) 的文字滚动效果。
82
+
83
+ ```yml
84
+ subtitle:
85
+ enable: true
86
+ text: 第一行文字
87
+ text2: 第二行文字 # 可留空
88
+ text3: 第三行文字 # 最多三行
89
+ startDelay: 1000
90
+ typeSpeed: 200
91
+ loop: true
92
+ backSpeed: 100
93
+ showCursor: true
94
+ ```
95
+
96
+ ### 网站图标与 Logo
97
+
98
+ ```yml
99
+ favicon: /favicon.svg # 浏览器标签页图标
100
+ logo: /favicon.svg # 侧边栏顶部 Logo
101
+ ```
102
+
103
+ 请将你自己的 favicon 放到站点 `source/` 或主题 `source/` 目录下。
104
+
105
+ ### 进度条
106
+
107
+ 页面顶部加载进度条(Pace.js CDN)。
108
+
109
+ ```yml
110
+ progressBar: true
111
+ ```
112
+
113
+ ### 告示板
114
+
115
+ ```yml
116
+ broadcast:
117
+ enable: true
118
+ type: 2 # 1: 自定义文字;2: 一言 API (hitokoto.cn)
119
+ text: 自定义告示内容 # type 为 1 时有效
120
+ ```
121
+
122
+ ### 随机句子
123
+
124
+ 页脚展示随机句子,支持本地 txt 文件(`source/data/random-sentences.txt`)或内置句子库。具有防重复队列机制。
125
+
126
+ ```yml
127
+ random_sentences:
128
+ enable: true
129
+ use_local_file: true # true: 读取 source/data/random-sentences.txt;false: 内置句子库
130
+ queue_size: 5 # 防重复队列大小,建议为句子总数的 1/4 ~ 1/3
131
+ ```
132
+
133
+ 本地 txt 文件格式:每行一句,`#` 开头为注释,双空格会转换为换行,空行自动忽略。
134
+
135
+ ### 文章功能
136
+
137
+ ```yml
138
+ excerpt_link: 显示更多... # 截断按钮文字(在文章中插入 <!--more--> 标记截断位置)
139
+ excerpt_all: false # true: 首页只显示文章归档,不展示正文
140
+
141
+ copy_btn: true # 代码复制按钮
142
+ share_enable: true # 文章分享按钮
143
+ share_china: true # 使用国内社交平台
144
+ share_text: 分享
145
+
146
+ toc: true # 文章目录(单篇可通过 front-matter no_toc: true 关闭)
147
+ image_viewer: true # 图片点击放大
148
+ ```
149
+
150
+ ### 分页文字
151
+
152
+ ```yml
153
+ nav_text:
154
+ page_prev: 上一页
155
+ page_next: 下一页
156
+ post_prev: 上一篇
157
+ post_next: 下一篇
158
+ ```
159
+
160
+ ### 字数统计
161
+
162
+ 需要安装插件:`npm i hexo-wordcount -S`
163
+
164
+ ```yml
165
+ word_count:
166
+ enable: true
167
+ only_article_visit: true # 只在文章详情页显示(不在首页显示)
168
+ ```
169
+
170
+ 单篇文章可通过 `no_word_count: true` 关闭。
171
+
172
+ ### 打赏
173
+
174
+ ```yml
175
+ reward_type: 1 # 0: 关闭;1: front-matter 中 reward:true 才显示;2: 所有文章
176
+ reward_wording: "如果这篇文章对你有帮助,可以请我喝杯茶"
177
+
178
+ reward:
179
+ button_text: "赏杯茶" # 留空则使用语言包默认值
180
+ channels:
181
+ - name: "支付宝"
182
+ icon: "ri-alipay-line" # RemixIcon 类名
183
+ color: "#1677FF" # 品牌主题色
184
+ qrcode: "/images/reward/alipay.jpg"
185
+ description: "支付宝扫一扫"
186
+
187
+ - name: "微信支付"
188
+ icon: "ri-wechat-pay-line"
189
+ color: "#07C160"
190
+ qrcode: "/images/reward/wechat.jpg"
191
+ description: "微信扫一扫"
192
+
193
+ - name: "USDT" # 支持子渠道
194
+ icon: "ri-coin-line"
195
+ color: "#50AF95"
196
+ description: "选择网络后扫码转账"
197
+ children:
198
+ - name: "TRC-20"
199
+ badge: "推荐"
200
+ qrcode: "/images/reward/USDT-TRC20.webp"
201
+ description: "Tron 链 · 手续费最低"
202
+ - name: "ERC-20"
203
+ qrcode: "/images/reward/USDT-ERC20.webp"
204
+ description: "以太坊主网"
205
+ ```
206
+
207
+ 二维码图片建议放在站点 `source/images/reward/` 目录下。单篇文章可通过 `no_reward: true` 强制关闭。
208
+
209
+ ### 版权声明
210
+
211
+ ```yml
212
+ copyright_type: 0 # 0: 关闭;1: front-matter 中 copyright:true 才显示;2: 所有文章
213
+ ```
214
+
215
+ ### 搜索
216
+
217
+ 需要安装插件:`npm i hexo-generator-searchdb -S`
218
+
219
+ 并在站点 `_config.yml` 中添加:
220
+
221
+ ```yml
222
+ search:
223
+ path: search.xml
224
+ field: post
225
+ format: html
226
+ ```
227
+
228
+ 然后启用主题搜索:
229
+
230
+ ```yml
231
+ search: true
232
+ ```
233
+
234
+ ### RSS 订阅
235
+
236
+ 需要安装插件:`npm i hexo-generator-feed -S`
237
+
238
+ 并在站点 `_config.yml` 中配置 feed。然后在主题配置中:
239
+
240
+ ```yml
241
+ rss: /atom.xml # 留空则不在侧边栏显示 RSS 入口
242
+ ```
243
+
244
+ ### 深色模式
245
+
246
+ ```yml
247
+ darkmode: true # 侧边栏显示深色模式切换按钮
248
+ ```
249
+
250
+ ### 视觉效果
251
+
252
+ ```yml
253
+ canvas_bg: 0 # 动态背景:0-关闭,1-动态线条(跟随鼠标)
254
+
255
+ mouse:
256
+ enable: false
257
+ path: /images/mouse.cur # 自定义鼠标样式文件路径
258
+
259
+ click_effect: 0 # 鼠标点击效果:0-关闭,1-爱心,2-爆炸烟花,3-粒子烟花
260
+ ```
261
+
262
+ ### 布局宽度
263
+
264
+ ```yml
265
+ layout:
266
+ article_width: 80rem
267
+ sidebar_width: 8rem
268
+ ```
269
+
270
+ ### GitHub Ribbon
271
+
272
+ 封面右上角 Fork-me 图标。可替换 `source/images/` 下的 forkme 图片自定义样式。
273
+
274
+ ```yml
275
+ github:
276
+ enable: false
277
+ url: https://github.com/your-username/your-repo
278
+ ```
279
+
280
+ ### 音乐播放器
281
+
282
+ 嵌入网易云音乐。
283
+
284
+ ```yml
285
+ music:
286
+ enable: false
287
+ type: 1 # 1: 小尺寸;2: 大尺寸
288
+ id: 22707008 # 网易云音乐 ID
289
+ autoPlay: true
290
+ ```
291
+
292
+ ### 统计分析
293
+
294
+ ```yml
295
+ busuanzi:
296
+ enable: true # 不蒜子页面访问量统计
297
+
298
+ cnzz:
299
+ enable: false
300
+ url: # 友盟 CNZZ 的 js 代码 src 链接
301
+
302
+ google_analytics: "" # Google Analytics 追踪 ID
303
+ baidu_analytics: "" # 百度统计追踪 ID
304
+ ```
305
+
306
+ ### 数学公式
307
+
308
+ MathJax 和 KaTeX 二选一。使用 KaTeX 需要更换渲染器:
309
+
310
+ ```bash
311
+ npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S
312
+ ```
313
+
314
+ ```yml
315
+ mathjax: false
316
+
317
+ katex:
318
+ enable: false
319
+ allpost: true # false: 仅 front-matter 中 math:true 的文章开启
320
+ copy_tex: false
321
+ ```
322
+
323
+ ### Mermaid 流程图
324
+
325
+ ```yml
326
+ mermaid:
327
+ enable: false
328
+ cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js
329
+ theme: forest
330
+ ```
331
+
332
+ ### 网站信息
333
+
334
+ ```yml
335
+ since: 2019 # 网站成立年份,小于当前年份时显示为 "2019-2026" 格式
336
+
337
+ icp:
338
+ enable: false
339
+ url: "https://beian.miit.gov.cn/"
340
+ text: "浙ICP备88888888"
341
+
342
+ gongan:
343
+ enable: false
344
+ img: /images/beian.png
345
+ url: ""
346
+ text: ""
347
+ ```
348
+
349
+ ### 友情链接
350
+
351
+ ```yml
352
+ friends_link:
353
+ 网站名称:
354
+ url: https://example.com
355
+ img: /images/logo.png # 可省略
356
+ ```
357
+
358
+ 友链图片建议放在站点 `source/images/` 目录下。
359
+
360
+ ### 评论系统
361
+
362
+ 四种评论系统任选其一,其余保持 `enable: false`。
363
+
364
+ #### Valine
365
+
366
+ 需要先创建 [LeanCloud](https://console.leancloud.app) 应用。
367
+
368
+ ```yml
369
+ leancloud:
370
+ enable: true
371
+ app_id: # LeanCloud App ID
372
+ app_key: # LeanCloud App Key
373
+
374
+ valine:
375
+ enable: true
376
+ avatar: monsterid
377
+ placeholder: 给我的文章加点评论吧~
378
+ ```
379
+
380
+ #### Gitalk
381
+
382
+ ```yml
383
+ gitalk:
384
+ enable: true
385
+ clientID: # GitHub OAuth App Client ID
386
+ clientSecret: # Client Secret
387
+ repo: # 存储评论的仓库名
388
+ owner: # 仓库所有者的 GitHub 用户名
389
+ admin: # 管理员的 GitHub 用户名
390
+ ```
391
+
392
+ #### Twikoo
393
+
394
+ ```yml
395
+ twikoo:
396
+ enable: true
397
+ envId: # 环境 ID
398
+ ```
399
+
400
+ #### Giscus(推荐)
401
+
402
+ 基于 GitHub Discussions,无需 OAuth Secret。前往 [giscus.app](https://giscus.app/) 获取配置参数。
403
+
404
+ ```yml
405
+ giscus:
406
+ enable: true
407
+ repo: owner/repo # 启用了 Discussions 的仓库
408
+ repo_id: # 从 giscus.app 获取
409
+ category: Announcements
410
+ category_id: # 从 giscus.app 获取
411
+ mapping: pathname
412
+ reactions_enabled: 1
413
+ emit_metadata: 0
414
+ input_position: top
415
+ lang: zh-CN
416
+ ```
417
+
418
+ ### 广告位
419
+
420
+ 可自行增加 `ad_2`、`ad_3` 等条目。建议图片和 URL 避免包含 "ad" 等关键词,以免被广告拦截插件屏蔽。
421
+
422
+ ```yml
423
+ ads:
424
+ ad_1:
425
+ title: 广告标题
426
+ img: /images/banner.jpg
427
+ url: https://example.com
428
+ width: 300
429
+ ```
430
+
431
+ ### 加密访问
432
+
433
+ 使用 SweetAlert2 实现的密码保护。
434
+
435
+ ```yml
436
+ lock:
437
+ enable: false
438
+ password: 123456
439
+ ```
440
+
441
+ ### 自定义 CSS
442
+
443
+ 主题提供 `source/css/custom.styl` 文件用于用户自定义样式覆盖,修改此文件不会影响主题升级。
444
+
445
+ ## 页面创建
446
+
447
+ 主题支持以下特殊页面,需要手动创建:
448
+
449
+ ### 分类页面
450
+
451
+ ```bash
452
+ hexo new page categories
453
+ ```
454
+
455
+ 编辑生成的 `source/categories/index.md`:
456
+
457
+ ```md
458
+ ---
459
+ title: categories
460
+ type: categories
461
+ layout: "categories"
462
+ ---
463
+ ```
464
+
465
+ ### 标签页面
466
+
467
+ ```bash
468
+ hexo new page tags
469
+ ```
470
+
471
+ 编辑生成的 `source/tags/index.md`:
472
+
473
+ ```md
474
+ ---
475
+ title: tags
476
+ type: tags
477
+ layout: "tags"
478
+ ---
479
+ ```
480
+
481
+ ### 友情链接页面
482
+
483
+ ```bash
484
+ hexo new page friends
485
+ ```
486
+
487
+ 编辑生成的 `source/friends/index.md`:
488
+
489
+ ```md
490
+ ---
491
+ title: friends
492
+ type: friends
493
+ layout: "friends"
494
+ ---
495
+ ```
496
+
497
+ 然后在 `_config.ayeria.yml` 中配置 `friends_link`。
498
+
499
+ ## Front-matter 参数
500
+
501
+ 除了 Hexo 内置的 front-matter 字段外,本主题额外支持:
502
+
503
+ | 字段 | 类型 | 说明 |
504
+ |------|------|------|
505
+ | `reward` | boolean | 是否显示打赏(`reward_type: 1` 时生效) |
506
+ | `no_reward` | boolean | 强制关闭打赏 |
507
+ | `copyright` | boolean | 是否显示版权声明(`copyright_type: 1` 时生效) |
508
+ | `no_toc` | boolean | 关闭本文目录 |
509
+ | `no_word_count` | boolean | 关闭本文字数统计 |
510
+ | `math` | boolean | 开启本文数学公式(KaTeX `allpost: false` 时生效) |
511
+ | `albums` | array | 相册模式,格式:`[["图片URL", "说明"], ...]` |
512
+
513
+ 建议在 `scaffolds/post.md` 中预设常用字段:
514
+
515
+ ```md
516
+ ---
517
+ title: {{ title }}
518
+ date: {{ date }}
519
+ categories:
520
+ tags:
521
+ reward: false
522
+ copyright: true
523
+ ---
524
+ ```
525
+
526
+ ## 多语言
527
+
528
+ 支持 14 种语言,语言包位于 `languages/` 目录:
529
+
530
+ zh-CN(简体中文)、zh-TW(繁体中文)、en(English)、ja(日本語)、ko(한국어)、es(Español)、de(Deutsch)、fr(Français)、ru(Русский)、vi(Tiếng Việt)、nl(Nederlands)、no(Norsk)、pt(Português)
531
+
532
+ 在站点 `_config.yml` 中设置:
533
+
534
+ ```yml
535
+ language: zh-CN
536
+ ```
537
+
538
+ ## 开发
539
+
540
+ 主题使用 Rollup 构建 CSS/JS。源码位于 `source-src/`,产出位于 `source/dist/`。
541
+
542
+ ```bash
543
+ cd themes/ayeria
544
+ npm install
545
+ npm run dev # 开发模式(监听变更)
546
+ npm run build # 生产构建
547
+ ```
548
+
549
+ ## 开源协议
550
+
551
+ [SATA License](LICENSE) — 基于 MIT,额外要求使用者给原项目点 Star 并感谢原作者。
552
+
553
+ 感谢原作者 [Eric-Shen](https://github.com/Shen-Yu) 提供的优秀主题框架。