hexo-theme-ayeria 1.9.10 → 1.9.13

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 (95) hide show
  1. package/LICENSE +37 -37
  2. package/README.en.md +560 -560
  3. package/README.md +560 -560
  4. package/_config.yml +271 -271
  5. package/_scaffolds/post.md +8 -8
  6. package/index.js +11 -2
  7. package/languages/de.yml +39 -39
  8. package/languages/default.yml +40 -39
  9. package/languages/en.yml +40 -39
  10. package/languages/es.yml +39 -39
  11. package/languages/fr.yml +39 -39
  12. package/languages/ja.yml +39 -39
  13. package/languages/ko.yml +39 -39
  14. package/languages/nl.yml +39 -39
  15. package/languages/no.yml +39 -39
  16. package/languages/pt.yml +39 -39
  17. package/languages/ru.yml +39 -39
  18. package/languages/vi.yml +39 -39
  19. package/languages/zh-CN.yml +40 -39
  20. package/languages/zh-TW.yml +40 -39
  21. package/layout/_partial/ads.ejs +8 -8
  22. package/layout/_partial/after-footer.ejs +84 -84
  23. package/layout/_partial/archive-post.ejs +13 -13
  24. package/layout/_partial/archive.ejs +61 -61
  25. package/layout/_partial/article.ejs +94 -94
  26. package/layout/_partial/ayeria.ejs +53 -53
  27. package/layout/_partial/baidu-analytics.ejs +11 -11
  28. package/layout/_partial/broadcast.ejs +19 -19
  29. package/layout/_partial/float-btns.ejs +7 -7
  30. package/layout/_partial/footer.ejs +61 -61
  31. package/layout/_partial/google-analytics.ejs +10 -10
  32. package/layout/_partial/head.ejs +64 -68
  33. package/layout/_partial/katex.ejs +21 -21
  34. package/layout/_partial/lock.ejs +37 -37
  35. package/layout/_partial/mathjax.ejs +18 -18
  36. package/layout/_partial/modal.ejs +70 -76
  37. package/layout/_partial/music.ejs +15 -15
  38. package/layout/_partial/post/albums.ejs +16 -16
  39. package/layout/_partial/post/author.ejs +7 -7
  40. package/layout/_partial/post/busuanzi.ejs +4 -4
  41. package/layout/_partial/post/category.ejs +9 -9
  42. package/layout/_partial/post/clipboard.ejs +54 -54
  43. package/layout/_partial/post/date.ejs +2 -2
  44. package/layout/_partial/post/gallery.ejs +15 -15
  45. package/layout/_partial/post/giscus.ejs +40 -40
  46. package/layout/_partial/post/gitalk.ejs +12 -12
  47. package/layout/_partial/post/justifiedGallery.ejs +8 -8
  48. package/layout/_partial/post/nav.ejs +22 -22
  49. package/layout/_partial/post/search.ejs +3 -3
  50. package/layout/_partial/post/share.ejs +53 -53
  51. package/layout/_partial/post/tag.ejs +5 -5
  52. package/layout/_partial/post/title.ejs +16 -16
  53. package/layout/_partial/post/tocbot.ejs +6 -6
  54. package/layout/_partial/post/topping.ejs +2 -2
  55. package/layout/_partial/post/twikoo.ejs +7 -7
  56. package/layout/_partial/post/valine.ejs +48 -48
  57. package/layout/_partial/post/word.ejs +19 -19
  58. package/layout/_partial/sidebar.ejs +48 -33
  59. package/layout/_partial/viewer.ejs +105 -105
  60. package/layout/categories.ejs +8 -8
  61. package/layout/friends.ejs +19 -19
  62. package/layout/index.ejs +4 -4
  63. package/layout/layout.ejs +35 -30
  64. package/layout/page.ejs +2 -2
  65. package/layout/plain-page.ejs +4 -4
  66. package/layout/post.ejs +2 -2
  67. package/layout/tags.ejs +88 -88
  68. package/package.json +39 -39
  69. package/scripts/default_config.js +6 -6
  70. package/scripts/events/index.js +11 -11
  71. package/scripts/events/lib/hello.js +38 -38
  72. package/scripts/events/lib/merge-configs.js +28 -28
  73. package/scripts/filters/index.js +13 -13
  74. package/scripts/filters/meta_generator.js +17 -17
  75. package/scripts/helpers/ayeria-plus-vendors.js +9 -9
  76. package/scripts/helpers/category-tree.js +90 -90
  77. package/scripts/helpers/wordcount.js +39 -39
  78. package/scripts/lib/core.js +25 -25
  79. package/scripts/utils/join-path.js +12 -12
  80. package/scripts/utils/object.js +31 -31
  81. package/source/404.html +187 -187
  82. package/source/css/ayeria-layout.styl +48 -48
  83. package/source/css/clipboard.styl +37 -37
  84. package/source/css/custom.styl +17 -17
  85. package/source/css/fonts/remixicon.css +1816 -1816
  86. package/source/css/fonts/remixicon.svg +5329 -5329
  87. package/source/data/random-sentences.txt +2629 -141
  88. package/source/dist/main.css +1 -1
  89. package/source/dist/main.js +1 -1
  90. package/source/js/clickBoom1.js +152 -152
  91. package/source/js/clickBoom2.js +180 -180
  92. package/source/js/jquery-3.6.0.min.js +2 -2
  93. package/source/js/lazyload.min.js +7 -7
  94. package/source/js/search.js +126 -126
  95. package/source/js/random-sentences.js +0 -166
package/README.en.md CHANGED
@@ -1,560 +1,560 @@
1
- # hexo-theme-ayeria
2
-
3
- [![npm version](https://img.shields.io/npm/v/hexo-theme-ayeria.svg)](https://www.npmjs.com/package/hexo-theme-ayeria)
4
- [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-ayeria.svg)](https://www.npmjs.com/package/hexo-theme-ayeria)
5
-
6
- > **中文文档:** [README(简体中文)](README.md)
7
-
8
- ![Ayeria theme preview](screenshots/Ayeria.png)
9
-
10
- A clean and elegant Hexo blog theme, heavily customized from [Ayer](https://github.com/Shen-Yu/hexo-theme-ayer).
11
-
12
- **Ayeria** — a fork maintained independently; the name comes from *Ayer* (Malay “water”, Spanish “yesterday”). Original author: [Eric-Shen](https://github.com/Shen-Yu).
13
-
14
- ## Features
15
-
16
- - Full-screen cover + typed.js typing animation
17
- - One-click dark mode
18
- - Local search (XML index + client-side full-text search)
19
- - Four comment systems (Valine / Gitalk / Twikoo / Giscus)
20
- - Math (MathJax / KaTeX) + Mermaid diagrams
21
- - Tip / reward (data-driven: multiple channels, sub-channels, brand colors, icons)
22
- - Post TOC, word count, copy code, image zoom, copyright notice
23
- - Random quotes (local `.txt` or built-in pool, de-duplication queue)
24
- - Broadcast bar (custom text / Hitokoto API)
25
- - Visit analytics (Busuanzi / CNZZ / Google Analytics / Baidu)
26
- - NetEase Cloud Music embed
27
- - Mouse effects (custom cursor, click hearts / burst / particles)
28
- - Canvas animated background
29
- - Password lock screen (SweetAlert2)
30
- - Ad slots, ICP / public security filing info
31
- - 14 languages
32
- - Custom CSS (`source/css/custom.styl`)
33
- - Rollup build pipeline
34
-
35
- ## Installation
36
-
37
- ### Option A: npm (Hexo >= 5.0)
38
-
39
- ```bash
40
- npm i hexo-theme-ayeria -S
41
- ```
42
-
43
- ### Option B: Git
44
-
45
- ```bash
46
- git clone https://github.com/KaleidScoper/hexo-theme-ayeria.git themes/ayeria
47
- ```
48
-
49
- Enable the theme in your site root `_config.yml`:
50
-
51
- ```yml
52
- theme: ayeria
53
- ```
54
-
55
- ## Configuration
56
-
57
- The theme ships with `themes/ayeria/_config.yml`. **Do not edit that file directly.** Instead, create `_config.ayeria.yml` in the site root and only set the options you want to override. Hexo 5+ merges it with the theme defaults automatically.
58
-
59
- Below is a full list of configurable options.
60
-
61
- ### Sidebar menu
62
-
63
- ```yml
64
- menu:
65
- Home: /
66
- Archives: /archives
67
- Categories: /categories
68
- Tags: /tags
69
- Friends: /friends
70
- About: /about
71
- ```
72
-
73
- Create pages with `hexo new page <name>` first (see [Creating pages](#creating-pages)).
74
-
75
- ### Cover
76
-
77
- Full-screen background cover; optional logo overlay. A sample cover is included at `source/images/cover2.webp`.
78
-
79
- ```yml
80
- cover:
81
- enable: true
82
- path: /images/cover.jpg # Background path (place under theme or site source/images/)
83
- logo: false # Cover logo image path, or false to disable
84
- ```
85
-
86
- ### Typing animation
87
-
88
- Typed text on the cover using [typed.js](https://github.com/mattboldt/typed.js).
89
-
90
- ```yml
91
- subtitle:
92
- enable: true
93
- text: First line
94
- text2: Second line # can be empty
95
- text3: Third line # up to three lines
96
- startDelay: 1000
97
- typeSpeed: 200
98
- loop: true
99
- backSpeed: 100
100
- showCursor: true
101
- ```
102
-
103
- ### Favicon and logo
104
-
105
- ```yml
106
- favicon: /favicon.svg # Browser tab icon
107
- logo: /favicon.svg # Sidebar top logo
108
- ```
109
-
110
- Put your favicon under the site `source/` or theme `source/` directory.
111
-
112
- ### Progress bar
113
-
114
- Top loading bar (Pace.js from CDN).
115
-
116
- ```yml
117
- progressBar: true
118
- ```
119
-
120
- ### Broadcast bar
121
-
122
- ```yml
123
- broadcast:
124
- enable: true
125
- type: 2 # 1: custom text; 2: Hitokoto API (hitokoto.cn)
126
- text: Your message here # used when type is 1
127
- ```
128
-
129
- ### Random sentences
130
-
131
- Footer random lines; supports a local text file (`source/data/random-sentences.txt`) or the built-in pool, with a de-duplication queue.
132
-
133
- ```yml
134
- random_sentences:
135
- enable: true
136
- use_local_file: true # true: read source/data/random-sentences.txt; false: built-in pool
137
- queue_size: 5 # queue size; suggest ~1/4–1/3 of total lines
138
- ```
139
-
140
- Local file format: one sentence per line; lines starting with `#` are comments; double spaces become line breaks; empty lines are ignored.
141
-
142
- ### Post features
143
-
144
- ```yml
145
- excerpt_link: Read more... # “read more” label (use <!--more--> in posts for break)
146
- excerpt_all: false # true: home shows archive only, no body
147
-
148
- copy_btn: true # Copy button for code blocks
149
- share_enable: true # Share buttons
150
- share_china: true # China-focused social platforms
151
- share_text: Share
152
-
153
- toc: true # TOC (per-post: front-matter no_toc: true)
154
- image_viewer: true # Click to zoom images
155
- ```
156
-
157
- ### Pagination labels
158
-
159
- ```yml
160
- nav_text:
161
- page_prev: Previous page
162
- page_next: Next page
163
- post_prev: Previous post
164
- post_next: Next post
165
- ```
166
-
167
- ### Word count
168
-
169
- Install: `npm i hexo-wordcount -S`
170
-
171
- ```yml
172
- word_count:
173
- enable: true
174
- only_article_visit: true # show on post pages only (not on index)
175
- ```
176
-
177
- Per post: `no_word_count: true` to disable.
178
-
179
- ### Tips / rewards
180
-
181
- ```yml
182
- reward_type: 1 # 0: off; 1: only when reward:true in front-matter; 2: all posts
183
- reward_wording: "If this post helped you, you can buy me a tea"
184
-
185
- reward:
186
- button_text: "Tip" # empty = language pack default
187
- channels:
188
- - name: "Alipay"
189
- icon: "ri-alipay-line" # RemixIcon class
190
- color: "#1677FF" # brand color
191
- qrcode: "/images/reward/alipay.jpg"
192
- description: "Scan with Alipay"
193
-
194
- - name: "WeChat Pay"
195
- icon: "ri-wechat-pay-line"
196
- color: "#07C160"
197
- qrcode: "/images/reward/wechat.jpg"
198
- description: "Scan with WeChat"
199
-
200
- - name: "USDT" # sub-channels supported
201
- icon: "ri-coin-line"
202
- color: "#50AF95"
203
- description: "Pick a network, then scan"
204
- children:
205
- - name: "TRC-20"
206
- badge: "Recommended"
207
- qrcode: "/images/reward/USDT-TRC20.webp"
208
- description: "Tron · lowest fees"
209
- - name: "ERC-20"
210
- qrcode: "/images/reward/USDT-ERC20.webp"
211
- description: "Ethereum mainnet"
212
- ```
213
-
214
- Put QR images under `source/images/reward/`. Per post: `no_reward: true` to force off.
215
-
216
- ### Copyright notice
217
-
218
- ```yml
219
- copyright_type: 0 # 0: off; 1: only when copyright:true; 2: all posts
220
- ```
221
-
222
- ### Search
223
-
224
- Install: `npm i hexo-generator-searchdb -S`
225
-
226
- In site `_config.yml`:
227
-
228
- ```yml
229
- search:
230
- path: search.xml
231
- field: post
232
- format: html
233
- ```
234
-
235
- Then enable in the theme:
236
-
237
- ```yml
238
- search: true
239
- ```
240
-
241
- ### RSS
242
-
243
- Install: `npm i hexo-generator-feed -S`
244
-
245
- Configure feed in site `_config.yml`, then in the theme:
246
-
247
- ```yml
248
- rss: /atom.xml # empty = hide RSS in sidebar
249
- ```
250
-
251
- ### Dark mode
252
-
253
- ```yml
254
- darkmode: true # show dark-mode toggle in sidebar
255
- ```
256
-
257
- ### Visual effects
258
-
259
- ```yml
260
- canvas_bg: 0 # 0 off, 1 animated lines (follows mouse)
261
-
262
- mouse:
263
- enable: false
264
- path: /images/mouse.cur # custom cursor file
265
-
266
- click_effect: 0 # 0 off, 1 hearts, 2 burst, 3 particles
267
- ```
268
-
269
- ### Layout width
270
-
271
- ```yml
272
- layout:
273
- article_width: 80rem
274
- sidebar_width: 8rem
275
- ```
276
-
277
- ### GitHub ribbon
278
-
279
- Fork-me image on the cover top-right. Replace images under `source/images/` to customize.
280
-
281
- ```yml
282
- github:
283
- enable: false
284
- url: https://github.com/your-username/your-repo
285
- ```
286
-
287
- ### Music player
288
-
289
- NetEase Cloud Music embed.
290
-
291
- ```yml
292
- music:
293
- enable: false
294
- type: 1 # 1 small, 2 large
295
- id: 22707008 # NetEase track / playlist ID
296
- autoPlay: true
297
- ```
298
-
299
- ### Analytics
300
-
301
- ```yml
302
- busuanzi:
303
- enable: true # Busuanzi page views
304
-
305
- cnzz:
306
- enable: false
307
- url: # CNZZ script src URL
308
-
309
- google_analytics: "" # GA measurement ID
310
- baidu_analytics: "" # Baidu Tongji ID
311
- ```
312
-
313
- ### Math
314
-
315
- Choose MathJax **or** KaTeX. For KaTeX, switch renderer:
316
-
317
- ```bash
318
- npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S
319
- ```
320
-
321
- ```yml
322
- mathjax: false
323
-
324
- katex:
325
- enable: false
326
- allpost: true # false: only posts with math:true
327
- copy_tex: false
328
- ```
329
-
330
- ### Mermaid
331
-
332
- ```yml
333
- mermaid:
334
- enable: false
335
- cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js
336
- theme: forest
337
- ```
338
-
339
- ### Site info
340
-
341
- ```yml
342
- since: 2019 # founding year; if before current year shows as "2019-2026"
343
-
344
- icp:
345
- enable: false
346
- url: "https://beian.miit.gov.cn/"
347
- text: "浙ICP备88888888"
348
-
349
- gongan:
350
- enable: false
351
- img: /images/beian.png
352
- url: ""
353
- text: ""
354
- ```
355
-
356
- ### Friends links
357
-
358
- ```yml
359
- friends_link:
360
- Site name:
361
- url: https://example.com
362
- img: /images/logo.png # optional
363
- ```
364
-
365
- Put friend logos under `source/images/`.
366
-
367
- ### Comments
368
-
369
- Enable **one** of the four; keep the others `enable: false`.
370
-
371
- #### Valine
372
-
373
- Create a [LeanCloud](https://console.leancloud.app) app first.
374
-
375
- ```yml
376
- leancloud:
377
- enable: true
378
- app_id: # LeanCloud App ID
379
- app_key: # LeanCloud App Key
380
-
381
- valine:
382
- enable: true
383
- avatar: monsterid
384
- placeholder: Leave a comment~
385
- ```
386
-
387
- #### Gitalk
388
-
389
- ```yml
390
- gitalk:
391
- enable: true
392
- clientID: # GitHub OAuth App Client ID
393
- clientSecret: # Client Secret
394
- repo: # repo name storing issues
395
- owner: # GitHub username (owner)
396
- admin: # admin GitHub username(s)
397
- ```
398
-
399
- #### Twikoo
400
-
401
- ```yml
402
- twikoo:
403
- enable: true
404
- envId: # environment ID
405
- ```
406
-
407
- #### Giscus (recommended)
408
-
409
- GitHub Discussions–based; no OAuth secret. Get values from [giscus.app](https://giscus.app/).
410
-
411
- ```yml
412
- giscus:
413
- enable: true
414
- repo: owner/repo # repo with Discussions enabled
415
- repo_id: # from giscus.app
416
- category: Announcements
417
- category_id: # from giscus.app
418
- mapping: pathname
419
- reactions_enabled: 1
420
- emit_metadata: 0
421
- input_position: top
422
- lang: en
423
- ```
424
-
425
- ### Ad slots
426
-
427
- You can add `ad_2`, `ad_3`, etc. Avoid “ad” in image URLs where possible so blockers ignore them less.
428
-
429
- ```yml
430
- ads:
431
- ad_1:
432
- title: Ad title
433
- img: /images/banner.jpg
434
- url: https://example.com
435
- width: 300
436
- ```
437
-
438
- ### Password lock
439
-
440
- SweetAlert2 password gate.
441
-
442
- ```yml
443
- lock:
444
- enable: false
445
- password: 123456
446
- ```
447
-
448
- ### Custom CSS
449
-
450
- Use `source/css/custom.styl` for overrides; editing it won’t complicate theme upgrades.
451
-
452
- ## Creating pages
453
-
454
- Create these pages manually:
455
-
456
- ### Categories
457
-
458
- ```bash
459
- hexo new page categories
460
- ```
461
-
462
- Edit `source/categories/index.md`:
463
-
464
- ```md
465
- ---
466
- title: categories
467
- type: categories
468
- layout: "categories"
469
- ---
470
- ```
471
-
472
- ### Tags
473
-
474
- ```bash
475
- hexo new page tags
476
- ```
477
-
478
- Edit `source/tags/index.md`:
479
-
480
- ```md
481
- ---
482
- title: tags
483
- type: tags
484
- layout: "tags"
485
- ---
486
- ```
487
-
488
- ### Friends page
489
-
490
- ```bash
491
- hexo new page friends
492
- ```
493
-
494
- Edit `source/friends/index.md`:
495
-
496
- ```md
497
- ---
498
- title: friends
499
- type: friends
500
- layout: "friends"
501
- ---
502
- ```
503
-
504
- Then set `friends_link` in `_config.ayeria.yml`.
505
-
506
- ## Front-matter
507
-
508
- Besides built-in Hexo fields, this theme supports:
509
-
510
- | Field | Type | Description |
511
- |------|------|-------------|
512
- | `reward` | boolean | Show reward block (`reward_type: 1`) |
513
- | `no_reward` | boolean | Force reward off |
514
- | `copyright` | boolean | Show copyright (`copyright_type: 1`) |
515
- | `no_toc` | boolean | Disable TOC for this post |
516
- | `no_word_count` | boolean | Disable word count |
517
- | `math` | boolean | Enable math (KaTeX when `allpost: false`) |
518
- | `albums` | array | Gallery mode: `[["image URL", "caption"], ...]` |
519
-
520
- You can preset fields in `scaffolds/post.md`:
521
-
522
- ```md
523
- ---
524
- title: {{ title }}
525
- date: {{ date }}
526
- categories:
527
- tags:
528
- reward: false
529
- copyright: true
530
- ---
531
- ```
532
-
533
- ## Languages
534
-
535
- 14 languages under `languages/`:
536
-
537
- zh-CN, zh-TW, en, ja, ko, es, de, fr, ru, vi, nl, no, pt
538
-
539
- In site `_config.yml`:
540
-
541
- ```yml
542
- language: en
543
- ```
544
-
545
- ## Development
546
-
547
- Rollup builds CSS/JS. Source: `source-src/`, output: `source/dist/`.
548
-
549
- ```bash
550
- cd themes/ayeria
551
- npm install
552
- npm run dev # watch mode
553
- npm run build # production build
554
- ```
555
-
556
- ## License
557
-
558
- [SATA License](LICENSE) — MIT-based, plus asking users to star the original project and thank the original author.
559
-
560
- Thanks to [Eric-Shen](https://github.com/Shen-Yu) for the excellent Ayer base theme.
1
+ # hexo-theme-ayeria
2
+
3
+ [![npm version](https://img.shields.io/npm/v/hexo-theme-ayeria.svg)](https://www.npmjs.com/package/hexo-theme-ayeria)
4
+ [![npm downloads](https://img.shields.io/npm/dm/hexo-theme-ayeria.svg)](https://www.npmjs.com/package/hexo-theme-ayeria)
5
+
6
+ > **中文文档:** [README(简体中文)](README.md)
7
+
8
+ ![Ayeria theme preview](screenshots/Ayeria.png)
9
+
10
+ A clean and elegant Hexo blog theme, heavily customized from [Ayer](https://github.com/Shen-Yu/hexo-theme-ayer).
11
+
12
+ **Ayeria** — a fork maintained independently; the name comes from *Ayer* (Malay “water”, Spanish “yesterday”). Original author: [Eric-Shen](https://github.com/Shen-Yu).
13
+
14
+ ## Features
15
+
16
+ - Full-screen cover + typed.js typing animation
17
+ - One-click dark mode
18
+ - Local search (XML index + client-side full-text search)
19
+ - Four comment systems (Valine / Gitalk / Twikoo / Giscus)
20
+ - Math (MathJax / KaTeX) + Mermaid diagrams
21
+ - Tip / reward (data-driven: multiple channels, sub-channels, brand colors, icons)
22
+ - Post TOC, word count, copy code, image zoom, copyright notice
23
+ - Random quotes (local `.txt` or built-in pool, de-duplication queue)
24
+ - Broadcast bar (custom text / Hitokoto API)
25
+ - Visit analytics (Busuanzi / CNZZ / Google Analytics / Baidu)
26
+ - NetEase Cloud Music embed
27
+ - Mouse effects (custom cursor, click hearts / burst / particles)
28
+ - Canvas animated background
29
+ - Password lock screen (SweetAlert2)
30
+ - Ad slots, ICP / public security filing info
31
+ - 14 languages
32
+ - Custom CSS (`source/css/custom.styl`)
33
+ - Rollup build pipeline
34
+
35
+ ## Installation
36
+
37
+ ### Option A: npm (Hexo >= 5.0)
38
+
39
+ ```bash
40
+ npm i hexo-theme-ayeria -S
41
+ ```
42
+
43
+ ### Option B: Git
44
+
45
+ ```bash
46
+ git clone https://github.com/KaleidScoper/hexo-theme-ayeria.git themes/ayeria
47
+ ```
48
+
49
+ Enable the theme in your site root `_config.yml`:
50
+
51
+ ```yml
52
+ theme: ayeria
53
+ ```
54
+
55
+ ## Configuration
56
+
57
+ The theme ships with `themes/ayeria/_config.yml`. **Do not edit that file directly.** Instead, create `_config.ayeria.yml` in the site root and only set the options you want to override. Hexo 5+ merges it with the theme defaults automatically.
58
+
59
+ Below is a full list of configurable options.
60
+
61
+ ### Sidebar menu
62
+
63
+ ```yml
64
+ menu:
65
+ Home: /
66
+ Archives: /archives
67
+ Categories: /categories
68
+ Tags: /tags
69
+ Friends: /friends
70
+ About: /about
71
+ ```
72
+
73
+ Create pages with `hexo new page <name>` first (see [Creating pages](#creating-pages)).
74
+
75
+ ### Cover
76
+
77
+ Full-screen background cover; optional logo overlay. A sample cover is included at `source/images/cover2.webp`.
78
+
79
+ ```yml
80
+ cover:
81
+ enable: true
82
+ path: /images/cover.jpg # Background path (place under theme or site source/images/)
83
+ logo: false # Cover logo image path, or false to disable
84
+ ```
85
+
86
+ ### Typing animation
87
+
88
+ Typed text on the cover using [typed.js](https://github.com/mattboldt/typed.js).
89
+
90
+ ```yml
91
+ subtitle:
92
+ enable: true
93
+ text: First line
94
+ text2: Second line # can be empty
95
+ text3: Third line # up to three lines
96
+ startDelay: 1000
97
+ typeSpeed: 200
98
+ loop: true
99
+ backSpeed: 100
100
+ showCursor: true
101
+ ```
102
+
103
+ ### Favicon and logo
104
+
105
+ ```yml
106
+ favicon: /favicon.svg # Browser tab icon
107
+ logo: /favicon.svg # Sidebar top logo
108
+ ```
109
+
110
+ Put your favicon under the site `source/` or theme `source/` directory.
111
+
112
+ ### Progress bar
113
+
114
+ Top loading bar (Pace.js from CDN).
115
+
116
+ ```yml
117
+ progressBar: true
118
+ ```
119
+
120
+ ### Broadcast bar
121
+
122
+ ```yml
123
+ broadcast:
124
+ enable: true
125
+ type: 2 # 1: custom text; 2: Hitokoto API (hitokoto.cn)
126
+ text: Your message here # used when type is 1
127
+ ```
128
+
129
+ ### Random sentences
130
+
131
+ Footer random lines; supports a local text file (`source/data/random-sentences.txt`) or the built-in pool, with a de-duplication queue.
132
+
133
+ ```yml
134
+ random_sentences:
135
+ enable: true
136
+ use_local_file: true # true: read source/data/random-sentences.txt; false: built-in pool
137
+ queue_size: 5 # queue size; suggest ~1/4–1/3 of total lines
138
+ ```
139
+
140
+ Local file format: one sentence per line; lines starting with `#` are comments; double spaces become line breaks; empty lines are ignored.
141
+
142
+ ### Post features
143
+
144
+ ```yml
145
+ excerpt_link: Read more... # “read more” label (use <!--more--> in posts for break)
146
+ excerpt_all: false # true: home shows archive only, no body
147
+
148
+ copy_btn: true # Copy button for code blocks
149
+ share_enable: true # Share buttons
150
+ share_china: true # China-focused social platforms
151
+ share_text: Share
152
+
153
+ toc: true # TOC (per-post: front-matter no_toc: true)
154
+ image_viewer: true # Click to zoom images
155
+ ```
156
+
157
+ ### Pagination labels
158
+
159
+ ```yml
160
+ nav_text:
161
+ page_prev: Previous page
162
+ page_next: Next page
163
+ post_prev: Previous post
164
+ post_next: Next post
165
+ ```
166
+
167
+ ### Word count
168
+
169
+ Install: `npm i hexo-wordcount -S`
170
+
171
+ ```yml
172
+ word_count:
173
+ enable: true
174
+ only_article_visit: true # show on post pages only (not on index)
175
+ ```
176
+
177
+ Per post: `no_word_count: true` to disable.
178
+
179
+ ### Tips / rewards
180
+
181
+ ```yml
182
+ reward_type: 1 # 0: off; 1: only when reward:true in front-matter; 2: all posts
183
+ reward_wording: "If this post helped you, you can buy me a tea"
184
+
185
+ reward:
186
+ button_text: "Tip" # empty = language pack default
187
+ channels:
188
+ - name: "Alipay"
189
+ icon: "ri-alipay-line" # RemixIcon class
190
+ color: "#1677FF" # brand color
191
+ qrcode: "/images/reward/alipay.jpg"
192
+ description: "Scan with Alipay"
193
+
194
+ - name: "WeChat Pay"
195
+ icon: "ri-wechat-pay-line"
196
+ color: "#07C160"
197
+ qrcode: "/images/reward/wechat.jpg"
198
+ description: "Scan with WeChat"
199
+
200
+ - name: "USDT" # sub-channels supported
201
+ icon: "ri-coin-line"
202
+ color: "#50AF95"
203
+ description: "Pick a network, then scan"
204
+ children:
205
+ - name: "TRC-20"
206
+ badge: "Recommended"
207
+ qrcode: "/images/reward/USDT-TRC20.webp"
208
+ description: "Tron · lowest fees"
209
+ - name: "ERC-20"
210
+ qrcode: "/images/reward/USDT-ERC20.webp"
211
+ description: "Ethereum mainnet"
212
+ ```
213
+
214
+ Put QR images under `source/images/reward/`. Per post: `no_reward: true` to force off.
215
+
216
+ ### Copyright notice
217
+
218
+ ```yml
219
+ copyright_type: 0 # 0: off; 1: only when copyright:true; 2: all posts
220
+ ```
221
+
222
+ ### Search
223
+
224
+ Install: `npm i hexo-generator-searchdb -S`
225
+
226
+ In site `_config.yml`:
227
+
228
+ ```yml
229
+ search:
230
+ path: search.xml
231
+ field: post
232
+ format: html
233
+ ```
234
+
235
+ Then enable in the theme:
236
+
237
+ ```yml
238
+ search: true
239
+ ```
240
+
241
+ ### RSS
242
+
243
+ Install: `npm i hexo-generator-feed -S`
244
+
245
+ Configure feed in site `_config.yml`, then in the theme:
246
+
247
+ ```yml
248
+ rss: /atom.xml # empty = hide RSS in sidebar
249
+ ```
250
+
251
+ ### Dark mode
252
+
253
+ ```yml
254
+ darkmode: true # show dark-mode toggle in sidebar
255
+ ```
256
+
257
+ ### Visual effects
258
+
259
+ ```yml
260
+ canvas_bg: 0 # 0 off, 1 animated lines (follows mouse)
261
+
262
+ mouse:
263
+ enable: false
264
+ path: /images/mouse.cur # custom cursor file
265
+
266
+ click_effect: 0 # 0 off, 1 hearts, 2 burst, 3 particles
267
+ ```
268
+
269
+ ### Layout width
270
+
271
+ ```yml
272
+ layout:
273
+ article_width: 80rem
274
+ sidebar_width: 8rem
275
+ ```
276
+
277
+ ### GitHub ribbon
278
+
279
+ Fork-me image on the cover top-right. Replace images under `source/images/` to customize.
280
+
281
+ ```yml
282
+ github:
283
+ enable: false
284
+ url: https://github.com/your-username/your-repo
285
+ ```
286
+
287
+ ### Music player
288
+
289
+ NetEase Cloud Music embed.
290
+
291
+ ```yml
292
+ music:
293
+ enable: false
294
+ type: 1 # 1 small, 2 large
295
+ id: 22707008 # NetEase track / playlist ID
296
+ autoPlay: true
297
+ ```
298
+
299
+ ### Analytics
300
+
301
+ ```yml
302
+ busuanzi:
303
+ enable: true # Busuanzi page views
304
+
305
+ cnzz:
306
+ enable: false
307
+ url: # CNZZ script src URL
308
+
309
+ google_analytics: "" # GA measurement ID
310
+ baidu_analytics: "" # Baidu Tongji ID
311
+ ```
312
+
313
+ ### Math
314
+
315
+ Choose MathJax **or** KaTeX. For KaTeX, switch renderer:
316
+
317
+ ```bash
318
+ npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S
319
+ ```
320
+
321
+ ```yml
322
+ mathjax: false
323
+
324
+ katex:
325
+ enable: false
326
+ allpost: true # false: only posts with math:true
327
+ copy_tex: false
328
+ ```
329
+
330
+ ### Mermaid
331
+
332
+ ```yml
333
+ mermaid:
334
+ enable: false
335
+ cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js
336
+ theme: forest
337
+ ```
338
+
339
+ ### Site info
340
+
341
+ ```yml
342
+ since: 2019 # founding year; if before current year shows as "2019-2026"
343
+
344
+ icp:
345
+ enable: false
346
+ url: "https://beian.miit.gov.cn/"
347
+ text: "浙ICP备88888888"
348
+
349
+ gongan:
350
+ enable: false
351
+ img: /images/beian.png
352
+ url: ""
353
+ text: ""
354
+ ```
355
+
356
+ ### Friends links
357
+
358
+ ```yml
359
+ friends_link:
360
+ Site name:
361
+ url: https://example.com
362
+ img: /images/logo.png # optional
363
+ ```
364
+
365
+ Put friend logos under `source/images/`.
366
+
367
+ ### Comments
368
+
369
+ Enable **one** of the four; keep the others `enable: false`.
370
+
371
+ #### Valine
372
+
373
+ Create a [LeanCloud](https://console.leancloud.app) app first.
374
+
375
+ ```yml
376
+ leancloud:
377
+ enable: true
378
+ app_id: # LeanCloud App ID
379
+ app_key: # LeanCloud App Key
380
+
381
+ valine:
382
+ enable: true
383
+ avatar: monsterid
384
+ placeholder: Leave a comment~
385
+ ```
386
+
387
+ #### Gitalk
388
+
389
+ ```yml
390
+ gitalk:
391
+ enable: true
392
+ clientID: # GitHub OAuth App Client ID
393
+ clientSecret: # Client Secret
394
+ repo: # repo name storing issues
395
+ owner: # GitHub username (owner)
396
+ admin: # admin GitHub username(s)
397
+ ```
398
+
399
+ #### Twikoo
400
+
401
+ ```yml
402
+ twikoo:
403
+ enable: true
404
+ envId: # environment ID
405
+ ```
406
+
407
+ #### Giscus (recommended)
408
+
409
+ GitHub Discussions–based; no OAuth secret. Get values from [giscus.app](https://giscus.app/).
410
+
411
+ ```yml
412
+ giscus:
413
+ enable: true
414
+ repo: owner/repo # repo with Discussions enabled
415
+ repo_id: # from giscus.app
416
+ category: Announcements
417
+ category_id: # from giscus.app
418
+ mapping: pathname
419
+ reactions_enabled: 1
420
+ emit_metadata: 0
421
+ input_position: top
422
+ lang: en
423
+ ```
424
+
425
+ ### Ad slots
426
+
427
+ You can add `ad_2`, `ad_3`, etc. Avoid “ad” in image URLs where possible so blockers ignore them less.
428
+
429
+ ```yml
430
+ ads:
431
+ ad_1:
432
+ title: Ad title
433
+ img: /images/banner.jpg
434
+ url: https://example.com
435
+ width: 300
436
+ ```
437
+
438
+ ### Password lock
439
+
440
+ SweetAlert2 password gate.
441
+
442
+ ```yml
443
+ lock:
444
+ enable: false
445
+ password: 123456
446
+ ```
447
+
448
+ ### Custom CSS
449
+
450
+ Use `source/css/custom.styl` for overrides; editing it won’t complicate theme upgrades.
451
+
452
+ ## Creating pages
453
+
454
+ Create these pages manually:
455
+
456
+ ### Categories
457
+
458
+ ```bash
459
+ hexo new page categories
460
+ ```
461
+
462
+ Edit `source/categories/index.md`:
463
+
464
+ ```md
465
+ ---
466
+ title: categories
467
+ type: categories
468
+ layout: "categories"
469
+ ---
470
+ ```
471
+
472
+ ### Tags
473
+
474
+ ```bash
475
+ hexo new page tags
476
+ ```
477
+
478
+ Edit `source/tags/index.md`:
479
+
480
+ ```md
481
+ ---
482
+ title: tags
483
+ type: tags
484
+ layout: "tags"
485
+ ---
486
+ ```
487
+
488
+ ### Friends page
489
+
490
+ ```bash
491
+ hexo new page friends
492
+ ```
493
+
494
+ Edit `source/friends/index.md`:
495
+
496
+ ```md
497
+ ---
498
+ title: friends
499
+ type: friends
500
+ layout: "friends"
501
+ ---
502
+ ```
503
+
504
+ Then set `friends_link` in `_config.ayeria.yml`.
505
+
506
+ ## Front-matter
507
+
508
+ Besides built-in Hexo fields, this theme supports:
509
+
510
+ | Field | Type | Description |
511
+ |------|------|-------------|
512
+ | `reward` | boolean | Show reward block (`reward_type: 1`) |
513
+ | `no_reward` | boolean | Force reward off |
514
+ | `copyright` | boolean | Show copyright (`copyright_type: 1`) |
515
+ | `no_toc` | boolean | Disable TOC for this post |
516
+ | `no_word_count` | boolean | Disable word count |
517
+ | `math` | boolean | Enable math (KaTeX when `allpost: false`) |
518
+ | `albums` | array | Gallery mode: `[["image URL", "caption"], ...]` |
519
+
520
+ You can preset fields in `scaffolds/post.md`:
521
+
522
+ ```md
523
+ ---
524
+ title: {{ title }}
525
+ date: {{ date }}
526
+ categories:
527
+ tags:
528
+ reward: false
529
+ copyright: true
530
+ ---
531
+ ```
532
+
533
+ ## Languages
534
+
535
+ 14 languages under `languages/`:
536
+
537
+ zh-CN, zh-TW, en, ja, ko, es, de, fr, ru, vi, nl, no, pt
538
+
539
+ In site `_config.yml`:
540
+
541
+ ```yml
542
+ language: en
543
+ ```
544
+
545
+ ## Development
546
+
547
+ Rollup builds CSS/JS. Source: `source-src/`, output: `source/dist/`.
548
+
549
+ ```bash
550
+ cd themes/ayeria
551
+ npm install
552
+ npm run dev # watch mode
553
+ npm run build # production build
554
+ ```
555
+
556
+ ## License
557
+
558
+ [SATA License](LICENSE) — MIT-based, plus asking users to star the original project and thank the original author.
559
+
560
+ Thanks to [Eric-Shen](https://github.com/Shen-Yu) for the excellent Ayer base theme.