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
234
235
236
237
238
239
240
241
|
baseurl: https://example.com/ # 网站基础 URL,部署上线时改成你自己的域名
languageCode: en-us # 默认语言环境
theme: hugo-theme-stack # 使用的主题目录名称
title: Example Site # 网站标题
copyright: Example Person # 页脚版权信息
# Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: en # 默认语言
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false # 是否为中文/日文/韩文优化,开启可以正确统计中文字数
languages: # 多语言配置
en:
languageName: English # 英文站点显示名
title: Example Site # 英文版标题
weight: 1 # 权重(决定语言切换顺序)
params:
sidebar:
subtitle: Example description # 侧边栏描述
zh-cn:
languageName: 中文
title: 演示站点
weight: 2
params:
sidebar:
subtitle: 演示说明
ar:
languageName: عربي # 阿拉伯语
languagedirection: rtl # 文字方向:从右到左
title: موقع تجريبي
weight: 3
params:
sidebar:
subtitle: وصف تجريبي
services: # 外部服务
# Change it to your Disqus shortname before using
disqus:
shortname: "hugo-theme-stack" # Disqus 评论系统 ID
# GA Tracking ID
googleAnalytics:
id: # Google Analytics 跟踪 ID
pagination:
pagerSize: 3 # 每页文章数
permalinks: # URL 规则
post: /p/:slug/ # 文章链接形如 /p/xxx/
page: /:slug/ # 单独页面链接形如 /about/
params: # 主题参数
mainSections: # 首页显示 content/post/ 下的文章
- post
featuredImageField: image # 文章封面图字段
rssFullContent: true # RSS 全文输出
favicon: # 网站 favicon 路径
footer:
since: 2020 # 页脚起始年份
customText: # 页脚自定义文字
dateFormat: # 控制日期的显示格式(Go 的时间模板)
published: Jan 02, 2006
lastUpdated: Jan 02, 2006 15:04 MST
sidebar: # 侧边栏
emoji: 🍥 # 侧面头像旁图标
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. #副标题
avatar:
enabled: true # 启用头像
local: true # 使用本地头像
src: img/avatar.png # 头像路径
article: # 文章配置
math: false # 数学公式支持
toc: true # 目录
readingTime: true # 阅读时间
license:
enabled: true # 版权信息
default: Licensed under CC BY-NC-SA 4.0
comments: # 评论配置
enabled: true # 开启评论
provider: disqus # 评论提供商
disqusjs:
shortname:
apiUrl:
apiKey:
admin:
adminLabel:
utterances:
repo:
issueTerm: pathname
label:
beaudar:
repo:
issueTerm: pathname
label:
theme:
remark42:
host:
site:
locale:
vssue:
platform:
owner:
repo:
clientId:
clientSecret:
autoCreateIssue: false
waline:
serverURL:
lang:
pageview:
emoji:
- https://unpkg.com/@waline/emojis@1.0.1/weibo
requiredMeta:
- name
- email
- url
locale:
admin: Admin
placeholder:
twikoo:
envId:
region:
path:
lang:
cactus:
defaultHomeserverUrl: "https://matrix.cactus.chat:8448"
serverName: "cactus.chat"
siteName: "" # 唯一站点 ID
giscus:
repo:
repoID:
category:
categoryID:
mapping:
lightTheme:
darkTheme:
reactionsEnabled: 1
emitMetadata: 0
gitalk:
owner:
admin:
repo:
clientID:
clientSecret:
proxy:
cusdis:
host:
id:
widgets: # 右侧小部件配置
homepage: # 首页
- type: search # 搜索框
- type: archives # 归档
params:
limit: 5
- type: categories # 分类
params:
limit: 10
- type: tag-cloud # 标签云
params:
limit: 10
page: # 文章
- type: toc # 页面目录
opengraph: # OpenGraph(社交分享卡片)
#twitter:
site:
card: summary_large_image
defaultImage: # 默认分享图
opengraph:
enabled: false
local: false
src:
colorScheme: # 配色
toggle: true # 允许切换
default: auto # 默认自动(跟随系统)
imageProcessing: # 图片处理
cover:
enabled: true
content:
enabled: true
### Custom menu
### See https://stack.jimmycai.com/config/menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:
main: [] # 主菜单
social: # 社交菜单
- identifier: github
name: GitHub # 鼠标悬停时名称
url: https://github.com/CaiJimmy/hugo-theme-stack
params:
icon: brand-github # 图标
related: # 相关文章推荐
includeNewer: true # 是否包含比当前文章新的内容
threshold: 60 # 相似度阈值,越高要求越严格
toLower: false # 是否把内容转换为小写再比较
indices: # 参与相似度计算的字段
- name: tags # 按标签计算相似度
weight: 100 # 标签权重(影响匹配结果)
- name: categories # 按分类计算相似度
weight: 200 # 分类权重更高,优先推荐同类文章
markup: # Markdown 渲染
goldmark:
extensions:
passthrough: # 允许原样渲染特殊符号
enable: true
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
renderer:
## Set to true if you have HTML content inside Markdown
unsafe: true # 允许 HTML
tableOfContents: # 自动目录生成
endLevel: 4 # 目录生成到 h4
ordered: true # 用数字编号(有序列表)
startLevel: 2
highlight: # 代码块高亮配置
noClasses: false
codeFences: true
guessSyntax: true # 自动猜测语言
lineNoStart: 1
lineNos: true # 显示行号
lineNumbersInTable: true
tabWidth: 4
|