-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
476 lines (413 loc) · 11.5 KB
/
config.yaml
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
baseURL: https://dtcoding.vercel.app/
languageCode: zh-cn
defaultContentLanguage: zh-cn
title: "DT Blog"
enableRobotsTXT: true
enableEmoji: true
theme: hugo-theme-luna
timeout: 600000
timeZone: Asia/Shanghai
# 可根据 Git 中的提交生成最近更新记录。
# use git commit log to generate lastmod record
enableGitInfo: true
# 如果你的博客包含中日韩语,请启用此选项
# enable CJK language support
hasCJKLanguage: false
# 每页显示文章数量
# pagination size
paginate: 10
# 启用谷歌统计
# google analytics tracking code
# googleAnalytics: UA-98634098-1
# 版权信息,默认为 author.name ↓
# default: author.name ↓
# copyright: ""
permalinks:
# 文章链接的格式
# Format of posts links
posts: /posts/:slug # 2019/01/01/hello-world.html
author:
name: DT
frontmatter:
lastmod:
- :git
- lastmod
- :fileModTime
- date
- publishDate
- :default
taxonomies:
tag: "tags"
category: "categories"
summaryLength: 70
canonifyURLs: false
relativeURLs: false
# 图像处理
# see https://gohugo.io/content-management/image-processing/#imaging-configuration
imaging:
resampleFilter: CatmullRom
quality: 95
anchor: smart
# caches:
# getresource:
# dir: :resourceDir/_gen
# maxAge: 24h
# 隐私政策,请查看 https://gohugo.io/about/hugo-and-gdpr/
# See https://gohugo.io/about/hugo-and-gdpr/
privacy:
googleAnalytics:
anonymizeIP: true
youtube:
privacyEnhanced: true
sitemap:
changefreq: weekly
priority: 0.5
filename: sitemap.xml
# 所有支持的页面
# all supported pages
$manuMain:
- &mainMenuHome
name: Home
weight: 10
identifier: home
params:
icon: eva eva-home
url: /
- &mainMenuAbout
name: About
weight: 20
identifier: about
params:
icon: eva eva-heart
url: /about/
# - &mainMenuLinks
# name: Links
# weight: 30
# identifier: links
# params:
# icon: eva eva-people
# url: /links/
- &mainMenuArchives
name: Archives
weight: 40
identifier: archives
params:
icon: eva eva-bar-chart
url: /archives/
- &mainMenuTags
name: Tags
weight: 50
identifier: tags
params:
icon: eva eva-hash
url: /tags/
- &mainMenuCategories
name: Categories
weight: 60
identifier: categories
params:
icon: eva eva-folder
url: /categories/
# - &mainMenuGitHub
# name: GitHub
# weight: 80
# identifier: github
# params:
# icon: eva eva-github
# url: /github/
- &mainMenuSearch
name: Search
weight: 999
identifier: search
params:
icon: eva eva-search
url: /search/
# 如果你不想要导航栏,你可以删除这一段
# If you don't want the navbar, you can delete this paragraph
menu:
main:
- *mainMenuHome
- *mainMenuAbout
# - *mainMenuLinks
- *mainMenuArchives
# - *mainMenuGitHub
- *mainMenuSearch
- *mainMenuCategories
# 副导航 / sub-navigation
# sub:
# - name: Categories
# weight: 20
# identifier: categories
# params:
# icon: eva eva-folder
# url: /categories/
# - name: Tags
# weight: 30
# identifier: tags
# params:
# icon: eva eva-pricetags
# url: /tags/
markup:
highlight:
style: dracula
guessSyntax: true
tabWidth: 4
lineNumbersInTable: true
lineNos: true
codeFences: true
goldmark:
renderer:
unsafe: true # enable html in markdown
# .Site.Params
params:
# CDN 地址
# CDN URL
publicCDN: "" # e.g. https://cdn.jsdelivr.net/gh/{{user}}/{{repo}}@latest/
# 在网站顶部显示标题和摘要,使用 .Site.Title 和 .Site.Params.Description
# Display title and description at the top of the page, use .Site.Title and .Site.Params.Description
topTitle: false
# 在首页顶部创建一个通知部分
# Create a Announcement section at the top of the home page
announcement:
enabled: true
file: "README.md" # assets/README.md
# 评论系统
# Comment system
comments:
enabled: true
provider: "giscus" # custom | giscus
giscus: &giscus
repo: "lackboard/dtcoding"
repoID: "R_kgDONMoKpQ"
category: "Announcements"
categoryID: "DIC_kwDONMoKpc4CkIw0"
mapping: "title"
reactionsEnabled: 1
emitMetadata: 0
lazy: false
lang: "zh-CN"
# Rss 配置
# RSS configuration
rss:
# 如果为 false,你必须设置 Output Formats,请查看:https://gohugo.io/templates/output-formats#customizing-output-formats
# If false, you must set Output Formats, see: https://gohugo.io/templates/output-formats#customizing-output-formats
enabled: true
# 是否输出全文
# Output full text
fullText: true
# 如果为 false,你必须设置 Output Formats,请查看:https://gohugo.io/templates/output-formats#customizing-output-formats
# If false, you must set Output Formats, see: https://gohugo.io/templates/output-formats#customizing-output-formats
sitemap: true
# 网站主题颜色
# Site theme colors
themeColor: "#dd6065"
# 设置网站为黑白模式,通常用于哀悼活动
# Set website to black and white, usually for mourning events
blackAndWhite: false
# 输出一个漂亮的控制台日志
# Output a nice console log
console:
enabled: true
leftColor: "#dd6065"
leftText: "Hugo Theme Luna"
rightColor: "#feb462"
rightText: "Powered by Hugo ❤ Luna"
# 标题计数器
# Title counter
headlineCounter: false
# 固定导航栏
# Fixed navigation bar
fixedNav: false
# 网站字体
# Site font
# font: '"Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
font: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif'
# 自定义脚本
# ts/custom.ts
customScript:
enabled: false
pjax: true # Auto-reload in pjax mode
# 网站底部显示运行时间
# Show site runtime
runTime:
enabled: true
# 网站创建时间
# Site creation time
creatTime: 2024/11/9
# 网站创建年份
# Site creation year
since: "2024"
# 显示文章过时提醒
# show warning when outdated info detected
outdatedInfoWarning:
enabled: true
# 超过该天数将显示过时提醒
# A timeout reminder will be displayed if the last modification time exceeds that number of days
day: 90
# 自动切换夜间模式(使用设备设置)
# Automatic switching of night mode (using device settings)
autoDarkMode: false
# 文章分享功能
share:
twitter: true
facebook: true
weibo: true
copyLinkText: true
qrcode: true
qrcodeAPI: "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="
# 文章许可设置
# license
license:
enabled: true
name: "CC BY-NC-ND 4.0"
icon: "Cc-by-nc-nd.svg" # in assets folder
url: "https://creativecommons.org/licenses/by-nc-nd/4.0"
# 显示右上角 i18n 切换按钮
# Display i18n toggle button
i18nlist: true
# GitHub 页面设置
# github page
github:
id: "torvalds" # or ["torvalds", "gvanrossum"]
minStars: 5 # 最小 star 项目 / min stars
# 开启图片放大功能
# Image Zoom Plugin
# see https://github.com/francoischalifour/medium-zoom
imageZoom: true
# 图片懒加载
# lazyload image
lazyload: true
# 更快速的阅读英文内容, 参考:https://bionic-reading.com/
# Read English content faster, see https://bionic-reading.com/
bionicReading:
enabled: true
autoBionic: false # 自动启用 Bionic Reading / auto enable Bionic Reading
skipLinks: false # 跳过链接 / skip links
excludeWords: [] # 忽略的单词 / ignored words
excludeNodeNames: [] # 忽略的节点名称 / ignored node names
excludeClasses: ['github'] # 忽略的类名 / ignored classes
# 启用谷歌翻译插件
# enable google translate in footer
googleTranslate: false
# 优化中文排版,请参考:https://github.com/vinta/pangu.js
# Optimize Chinese typography, see: https://github.com/vinta/pangu.js
pangu: true
# 开启本地搜索插件
# enable local search plugin
search: true
# 文章页显示最后修改时间
# For outdated reminders
lastmod: true
# 显示阅读时间
# show reading time
readingTime: true
# 显示文章字数
# show word count
wordCount: false
# 开启文章内目录,可以在页面内单独设置
# Show table of contents, You can enable it separately in the page
toc:
enabled: true
# 超过这个字数后将显示目录
# When the article word count is greater than this value, the TOC will be displayed
wordCount: 400
# 加密功能
# encryption articles
HugoEncrypt:
# 默认密码
# default password
Password: "123456"
# 密码缓存选项 "session" or "local"
# or "local"
Storage: "session"
# 开启 Pjax 无刷新加载
# Enable pjax with swup.js
pjax: true
# 开启 PWA
# use service worker
pwa: true
# 开启数学公式
# katex
katex: true
# 开启返回顶部按钮
# backtop button
backtop: true
# 文章封面图片纵横比
# article image aspect ratio
featuredImageHeight: "42%" #42% | false
# 默认文章封面图片,不会显示在内容页面
# Default post card featured image, not displayed on content pages
defaultFeaturedImage: false # false | featured.png in assets folder | https://unsplash.it/1920/1080/?random={{timestamp}}
# 自动调整图片大小并兼容 Webp 格式
# Optimize your images and SEO
imageProcessing:
cover: true
content: true
autoResize:
- 1080
- 1440
webp: true
# 设置推特卡片样式
opengraph:
twitter: # see https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started
cardType: summary_large_image # summary | summary_large_image
site: "@Ice_Hazymoon"
image: "featured.png" # in assets folder | false
author: DT
keywords:
- Hugo
- dtcoding
description: "dt 的博客"
build:
noJSConfigInAssets: true
languages:
zh-cn:
contentDir: content/zh-hans
languageName: 中文
params:
languageIcon: "images/i18n/zh-cn.svg" # in assets folder
font: "Times New Roman,Times,Heti Song,serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol"
github:
id: "Ice-Hazymoon"
minStars: 10
license:
enabled: true
name: "署名 - 非商业性使用 - 禁止演绎 4.0"
icon: "Cc-by-nc-nd.svg" # in assets folder
url: "https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh"
announcement:
enabled: true
file: "README.zh.md"
comments:
enabled: true
provider: "giscus"
giscus:
<<: *giscus
lang: "zh-CN"
# en-us:
# contentDir: content/en-us
# languageName: English
# params:
# languageIcon: "images/i18n/en-us.svg" # in assets folder
# ja:
# contentDir: content/ja
# languageName: 日本語
# params:
# languageIcon: "images/i18n/ja.svg"
# font: "'-apple-system', BlinkMacSystemFont, 'Yu Gothic', '游ゴシック', YuGothic, '游ゴシック体', 'Noto Sans Japanese', 'ヒラギノ角ゴ Pro W3', 'メイリオ', 'Hiragino Kaku Gothic ProN', 'MS PGothic', Osaka, 'sans-serif'"
# announcement:
# enabled: true
# file: "README.ja.md"
# comments:
# enabled: true
# provider: "giscus"
# giscus:
# <<: *giscus
# lang: "ja"
menu:
main:
- *mainMenuHome
- *mainMenuArchives
- *mainMenuSearch
staticDir:
- static