hexo-theme-ayeria 1.9.7-0 → 1.9.9
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.
- package/CLAUDE.md +44 -0
- package/LICENSE +37 -37
- package/README.en.md +560 -0
- package/README.md +560 -553
- package/_config.yml +271 -271
- package/_scaffolds/post.md +8 -8
- package/index.js +1 -1
- package/languages/de.yml +39 -39
- package/languages/default.yml +39 -39
- package/languages/en.yml +39 -39
- package/languages/es.yml +39 -39
- package/languages/fr.yml +39 -39
- package/languages/ja.yml +39 -39
- package/languages/ko.yml +39 -39
- package/languages/nl.yml +39 -39
- package/languages/no.yml +39 -39
- package/languages/pt.yml +39 -39
- package/languages/ru.yml +39 -39
- package/languages/vi.yml +39 -39
- package/languages/zh-CN.yml +39 -39
- package/languages/zh-TW.yml +39 -39
- package/layout/_partial/ads.ejs +8 -8
- package/layout/_partial/after-footer.ejs +84 -84
- package/layout/_partial/archive-post.ejs +13 -13
- package/layout/_partial/archive.ejs +61 -61
- package/layout/_partial/article.ejs +94 -94
- package/layout/_partial/ayeria.ejs +53 -53
- package/layout/_partial/baidu-analytics.ejs +11 -11
- package/layout/_partial/broadcast.ejs +19 -19
- package/layout/_partial/float-btns.ejs +7 -7
- package/layout/_partial/footer.ejs +61 -61
- package/layout/_partial/google-analytics.ejs +10 -10
- package/layout/_partial/head.ejs +68 -67
- package/layout/_partial/katex.ejs +21 -21
- package/layout/_partial/lock.ejs +37 -37
- package/layout/_partial/mathjax.ejs +18 -18
- package/layout/_partial/modal.ejs +75 -76
- package/layout/_partial/music.ejs +15 -15
- package/layout/_partial/post/albums.ejs +16 -16
- package/layout/_partial/post/author.ejs +7 -7
- package/layout/_partial/post/busuanzi.ejs +4 -4
- package/layout/_partial/post/category.ejs +9 -9
- package/layout/_partial/post/clipboard.ejs +54 -54
- package/layout/_partial/post/date.ejs +2 -2
- package/layout/_partial/post/gallery.ejs +15 -15
- package/layout/_partial/post/giscus.ejs +40 -40
- package/layout/_partial/post/gitalk.ejs +12 -12
- package/layout/_partial/post/justifiedGallery.ejs +8 -8
- package/layout/_partial/post/nav.ejs +22 -22
- package/layout/_partial/post/search.ejs +3 -3
- package/layout/_partial/post/share.ejs +53 -51
- package/layout/_partial/post/tag.ejs +5 -5
- package/layout/_partial/post/title.ejs +16 -16
- package/layout/_partial/post/tocbot.ejs +6 -6
- package/layout/_partial/post/topping.ejs +2 -2
- package/layout/_partial/post/twikoo.ejs +7 -7
- package/layout/_partial/post/valine.ejs +48 -48
- package/layout/_partial/post/word.ejs +19 -19
- package/layout/_partial/sidebar.ejs +33 -33
- package/layout/_partial/viewer.ejs +105 -105
- package/layout/categories.ejs +8 -8
- package/layout/friends.ejs +19 -19
- package/layout/index.ejs +4 -4
- package/layout/layout.ejs +30 -30
- package/layout/page.ejs +2 -2
- package/layout/plain-page.ejs +4 -4
- package/layout/post.ejs +2 -2
- package/layout/tags.ejs +88 -88
- package/package.json +39 -38
- package/scripts/default_config.js +6 -6
- package/scripts/events/index.js +11 -11
- package/scripts/events/lib/hello.js +38 -45
- package/scripts/events/lib/merge-configs.js +28 -28
- package/scripts/filters/index.js +13 -13
- package/scripts/filters/meta_generator.js +17 -17
- package/scripts/helpers/ayeria-plus-vendors.js +9 -9
- package/scripts/helpers/category-tree.js +90 -90
- package/scripts/helpers/wordcount.js +39 -39
- package/scripts/lib/core.js +25 -25
- package/scripts/utils/join-path.js +12 -12
- package/scripts/utils/object.js +31 -31
- package/source/404.html +187 -187
- package/source/css/ayeria-layout.styl +46 -0
- package/source/css/clipboard.styl +37 -37
- package/source/css/custom.styl +13 -967
- package/source/css/fonts/remixicon.css +1816 -1816
- package/source/css/fonts/remixicon.svg +5329 -5329
- package/source/data/random-sentences.txt +141 -136
- package/source/dist/main.css +1 -1
- package/source/dist/main.js +1 -1
- package/source/js/clickBoom1.js +152 -152
- package/source/js/clickBoom2.js +180 -180
- package/source/js/jquery-3.6.0.min.js +2 -2
- package/source/js/lazyload.min.js +7 -7
- package/source/js/random-sentences.js +166 -166
- package/source/js/search.js +126 -126
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# hexo-theme-ayeria
|
|
2
|
+
|
|
3
|
+
Hexo 博客主题,基于 hexo-theme-ayer 深度定制的独立维护衍生版本,已发布至 npm。
|
|
4
|
+
|
|
5
|
+
## 技术栈
|
|
6
|
+
|
|
7
|
+
- **构建**:Rollup 2(`rollup.config.js`)
|
|
8
|
+
- **样式**:Stylus(`source-src/css/`)
|
|
9
|
+
- **模板**:EJS(`layout/`)
|
|
10
|
+
- **语言**:14 种,配置在 `languages/`
|
|
11
|
+
- **入口**:`source-src/main.js` → 编译输出到 `source/`
|
|
12
|
+
|
|
13
|
+
## 常用命令
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# 安装依赖
|
|
17
|
+
npm install
|
|
18
|
+
|
|
19
|
+
# 开发模式(监听文件变化,自动重编译)
|
|
20
|
+
npm run dev
|
|
21
|
+
|
|
22
|
+
# 生产构建
|
|
23
|
+
npm run build
|
|
24
|
+
|
|
25
|
+
# Stylus 代码检查
|
|
26
|
+
npm test
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 目录约定
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
source-src/ 源代码(JS + Stylus)
|
|
33
|
+
source/ 编译输出
|
|
34
|
+
layout/ EJS 模板
|
|
35
|
+
languages/ i18n 翻译文件
|
|
36
|
+
scripts/ Hexo 辅助脚本(tag/filter/helper)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 配置约定
|
|
40
|
+
|
|
41
|
+
- 主题默认配置在 `_config.yml`,定义所有可用配置项及默认值
|
|
42
|
+
- 用户在 Hexo 站点根目录创建 `_config.ayeria.yml` 覆盖配置项;**`_config.yml` 不直接修改**
|
|
43
|
+
- 自定义 CSS 放 `source/css/custom.styl`
|
|
44
|
+
- `_config.ayeria.yml` 只能覆盖配置项,功能或外观改动需修改主题源码
|
package/LICENSE
CHANGED
|
@@ -1,38 +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
|
|
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
38
|
THE SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
# hexo-theme-ayeria
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/hexo-theme-ayeria)
|
|
4
|
+
[](https://www.npmjs.com/package/hexo-theme-ayeria)
|
|
5
|
+
|
|
6
|
+
> **中文文档:** [README(简体中文)](README.md)
|
|
7
|
+
|
|
8
|
+

|
|
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.
|