Hexo博客站点配置

_config.yml

此配置为个人使用,仅供参考。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 非名榭
subtitle: 墨问非名的Hexo博客
description: 墨问非名的Hexo博客
keywords: 墨问非名
author: 墨问非名
language: zh-CN
timezone: America/New_York

# URL #链接格式
#网址
url: https://mowenfeiming.github.io
root: / #根目录
permalink: post/:category/:title/ #文章的链接格式,默认为:year/:month/:day/:title/, :category/:title/
permalink_defaults:

# Directory #目录
source_dir: source #源文件目录
public_dir: public #生成的网页文件目录
tag_dir: tags #标签目录
archive_dir: archives #存档目录
category_dir: categories #分类目录
code_dir: downloads/code #Include code 文件夹
i18n_dir: :lang #国际化(i18n)文件夹
skip_render: #跳过指定文件的渲染,您可使用 glob 表达式来匹配路径。

# 文章Writing
new_post_name: :title.md #新文章的文件名称
default_layout: post #默认的模板,包括 post、page、photo、draft(文章、页面、照片、草稿)
titlecase: false #标题转换成大写
external_link: true #在新选项卡中打开连接
filename_case: 1 #0,把文件名称转换为 (1) 小写或 (2) 大写
render_drafts: false #显示草稿
post_asset_folder: false #启动 Asset 文件夹
relative_link: false #把链接改为与根目录的相对位址
future: true #显示未来的文章
highlight: #语法高亮
enable: true #是否启用
line_number: true #显示行号
auto_detect: false
tab_replace:

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date

archive_generator:
per_page: 1000
yearly: true
monthly: true

tag_generator:
per_page: 20

# Category & Tag #分类和标签
default_category: uncategorized #默认分类
# category_map:
# Linux操作系统: Linux-OS
# 中文分类: 英文分类
# tag_map:
# 中文标签: 英文标签
category_map: #分类别名
# 教程: tutorial
# 同人: fanfic
# 应用推荐: app-essentials
# 笔记: notes
# 美漫: comic
# 文档: document
tag_map: #标签别名
# 炮火佳丽: bombshells
# 不义联盟: injustice
# 2号地球:会社: earth-2-society
# 访谈: interview
# 喋血萝莉: tomboy
# Archives
# 2: 开启分页
# 1: 禁用分页
# 0: 全部禁用

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 1000
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
#RSS订阅
plugin:
- hexo-generator-feed
#Feed Atom
feed:
type: atom
path: atom.xml
limit: 20

## Themes: https://hexo.io/themes/
theme: hexo-theme-fext

# Security
##
encrypt:
enable: true

symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true

search:
path: search.xml
field: all #post, page
format: html
limit: 10000

filter_optimize:
enable: false
# remove static resource query string
# - like `?v=1.0.0`
remove_query_string: true
# remove the surrounding comments in each of the bundled files
remove_comments: false
css:
enable: true
# bundle loaded css file into the one
bundle: true
# use a script block to load css elements dynamically
delivery: true
# make specific css content inline into the html page
# - only support the full path
# - default is ['css/main.css']
inlines:
excludes:
js:
# bundle loaded js file into the one
bundle: true
excludes:
# set the priority of this plugin,
# lower means it will be executed first, default is 10
priority: 12

# Generate categories from directory-tree
# Dependencies: https://github.com/xu-song/hexo-auto-category
# depth: the depth of directory-tree you want to generate, should > 0
auto_category:
enable: false
depth:

sitemap:
path: sitemap.xml

pwa:
manifest:
path: /manifest.json
body:
name: hexo
short_name: hexo
icons:
- src: /images/android-chrome-192x192.png
sizes: 192x192
type: image/png
serviceWorker:
path: /sw.js
preload:
urls:
- /
posts: 5
opts:
networkTimeoutSeconds: 5
routes:
- pattern: !!js/regexp /hm.baidu.com/
strategy: networkOnly
- pattern: !!js/regexp /.*\.(js|css|jpg|jpeg|png|gif)$/
strategy: cacheFirst
- pattern: !!js/regexp /\//
strategy: networkFirst
priority: 5

#math:
# engine: 'mathjax' # or 'katex'
# mathjax:
# src: custom_mathjax_source
# config:
# # MathJax config
# katex:
# css: custom_css_source
# js: custom_js_source # not used
# config:
# # KaTeX config

sequence:
# webfont: # optional, the source url of webfontloader.js
# snap: # optional, the source url of snap.svg.js
# underscore: # optional, the source url of underscore.js
# sequence: # optional, the source url of sequence-diagram.js
# css: # optional, the url for css, such as hand drawn theme
options:
theme:
css_class:

flowchart:
# raphael: # optional, the source url of raphael.js
# flowchart: # optional, the source url of flowchart.js
options: # options used for `drawSVG`

# 开启字数统计
word_count: true

# 关闭字数统计
# word_count: false

# Deployment #部署
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo:
github: https://github.com/mowenfeiming/mowenfeiming.github.io.git,master
墨问非名 wechat
订阅我的公众号
听说,你想请我喝杯咖啡?☕️
0%