Files
blog/hugo.toml
T

278 lines
10 KiB
TOML
Raw Normal View History

2026-01-23 22:02:11 +08:00
# ==============================================================================
# 基础配置 (Basic Configuration)
# ==============================================================================
2026-01-19 00:15:15 +08:00
2026-01-23 22:02:11 +08:00
# 网站的基本 URL (Base URL)
baseURL = "https://usj.cc"
# 网站的语言代码 (Language Code)
languageCode = "zh-cn"
# 网站标题 (Site Title)
title = "优世界"
# 使用的主题名称 (Theme Name)
theme = "Ying"
# ==============================================================================
# 核心行为配置 (Core Behavior)
# ==============================================================================
# 文章与页面使用 .html 结尾 (Ugly URLs)
# true: 生成 /post/hello.html, false: 生成 /post/hello/index.html
2026-01-19 00:15:15 +08:00
uglyURLs = true
2026-01-23 22:02:11 +08:00
# 分页设置:每页展示的文章数量 (Pagination)
2026-02-02 12:51:52 +08:00
paginate = 6
2026-01-19 00:15:15 +08:00
2026-01-23 22:02:11 +08:00
# 开启 CJK (中日韩) 语言支持,用于准确统计字数 (CJK Language Support)
hasCJKLanguage = true
2026-01-19 00:15:15 +08:00
2026-01-23 22:02:11 +08:00
# ==============================================================================
# 构建与环境配置 (Build & Environment)
# ==============================================================================
# 模块配置 (Module Configuration)
[module]
[module.hugoVersion]
extended = false
min = "0.116.0"
# 内容渲染配置 (Markup Configuration)
2024-08-09 09:07:26 +08:00
[markup]
2026-01-22 21:26:48 +08:00
[markup.goldmark]
[markup.goldmark.renderer]
2026-01-23 22:02:11 +08:00
unsafe = true # 允许在 Markdown 中使用 HTML 标签 (Allow raw HTML)
2024-08-09 09:07:26 +08:00
[markup.highlight]
2026-01-23 22:02:11 +08:00
style = "dracula" # 代码高亮样式 (Highlight style)
2026-01-22 19:41:47 +08:00
noClasses = false
2026-01-19 00:15:15 +08:00
2026-01-23 22:02:11 +08:00
# 资源压缩配置 (Minification)
2026-01-22 21:39:19 +08:00
[minify]
disableXML = true
[minify.tdewolff]
2026-05-25 13:06:26 +08:00
[minify.tdewolff.css]
keepCSS2 = false
[minify.tdewolff.js]
keepVarNames = false
2026-01-22 21:39:19 +08:00
[minify.tdewolff.html]
keepConditionalComments = true
keepDefaultAttrVals = true
keepDocumentTags = true
keepEndTags = true
keepWhitespace = false
2026-01-23 22:02:11 +08:00
# ==============================================================================
# URL 与 输出格式 (URLs & Output Formats)
# ==============================================================================
# 自定义文章固定链接 (Permalinks)
# 使用日期作为文件名,例如 /20260117.html
2024-10-20 13:46:44 +08:00
[permalinks]
2026-06-02 15:49:17 +08:00
posts = "/:slug"
2026-01-22 22:33:35 +08:00
2026-03-01 10:51:12 +08:00
# 确保日期优先使用 Front Matter 中的 date
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = ["lastmod", ":git", "date", "publishDate"]
2026-01-23 22:02:11 +08:00
# 输出格式配置 (Outputs)
[outputs]
2026-01-28 23:20:39 +08:00
home = ["HTML", "RSS", "JSON"]
2026-01-23 13:19:05 +08:00
2026-01-23 22:02:11 +08:00
# RSS 媒体类型定义 (RSS Media Type)
[mediaTypes."application/rss+xml"]
suffixes = ["xml"]
# RSS 输出格式详情 (RSS Output Format)
[outputFormats.RSS]
mediaType = "application/rss+xml"
baseName = "rss"
isPlainText = false
noUgly = true
permalinkable = true
# ==============================================================================
# 站点参数配置 (Site Parameters)
# ==============================================================================
[params]
# ----------------------------------------------------------------------------
# 社交链接 (Social Links)
# ----------------------------------------------------------------------------
social = [
{ title = "GitHub", url = "https://github.com/zqlit", icon = "ri-github-fill" },
{ title = "我的主页", url = "#", icon = "ri-at-line" },
{ title = "Rss订阅", url = "/rss.xml", icon = "ri-rss-fill" }
]
2026-02-01 18:22:19 +08:00
# ----------------------------------------------------------------------------
# 移动端配置 (Mobile Configuration)
# ----------------------------------------------------------------------------
[params.mobile]
2026-02-02 12:51:52 +08:00
show_social = true # 移动端是否显示社交图标
show_hitokoto = true # 移动端是否显示一言 (打字机效果)
2026-02-01 18:22:19 +08:00
2026-01-31 21:27:06 +08:00
# ----------------------------------------------------------------------------
# 关于页面配置 (About Page Configuration)
# ----------------------------------------------------------------------------
[params.about]
2026-01-31 23:05:19 +08:00
enableheatmap = true # 开启热力图 (Enable Heatmap)
2026-01-31 21:27:06 +08:00
enableskills = false # 开启技能栈 (Enable Skills)
2026-01-31 23:05:19 +08:00
enablealbum = false # 开启相册 (Enable Album)
2026-01-31 21:27:06 +08:00
2026-01-23 22:02:11 +08:00
# ----------------------------------------------------------------------------
# 作者信息 (Author Info)
# ----------------------------------------------------------------------------
[params.author]
name = "小赵"
2026-01-31 23:42:49 +08:00
avatar = "/image/avatar/tx7.jpg"
2026-01-23 22:02:11 +08:00
description = "不以物喜,不以己悲"
2026-02-01 17:00:25 +08:00
# ----------------------------------------------------------------------------
# 首页搜索配置 (Home Search Configuration)
# ----------------------------------------------------------------------------
[params.home_search]
enable = true
# 搜索提示小人头像 (Search Mascot Avatar)
mascot = "/emotion/bqb/chijing.png"
# 搜索提示文案 (Search Hint Text)
hint = "点击随笔 开始搜索"
2026-06-02 14:34:23 +08:00
# 时段问候语 (Time-based Greetings) - 数组格式,每次随机显示一条
2026-02-01 17:00:25 +08:00
[params.home_search.greetings]
2026-06-02 14:34:23 +08:00
morning = ["早安!元气满满", "新的一天,加油", "早起的鸟儿有虫吃"]
noon = ["中午好!记得干饭", "午饭吃好了吗,来读篇博客", "午后适合摸鱼"]
afternoon = ["下午好!喝杯茶吧", "下午茶时间到了", "下午适合发呆"]
evening = ["晚上好!放松一下", "今晚月色不错", "夜深了,读篇好文"]
night = ["早点睡对皮肤好", "夜猫子你好", "明天再看吧"]
2026-02-01 17:00:25 +08:00
# 节日问候语 (Holiday Greetings) - 格式: "MM-DD" = "文案"
# 已包含 2026 年农历节日对应的公历日期
[params.home_search.holidays]
2026-02-01 17:42:15 +08:00
"01-01" = "元旦快乐!新年新气象"
"02-14" = "情人节快乐!愿有人陪"
"03-08" = "女神节快乐!做自己"
"04-01" = "愚人节快乐!别被骗哦"
"05-01" = "劳动节快乐!放假啦"
"05-04" = "青年节快乐!永远年轻"
"06-01" = "儿童节快乐!童心未泯"
"10-01" = "国庆节快乐!享受假期"
"12-25" = "圣诞快乐!Merry Xmas"
2026-02-01 17:00:25 +08:00
# 2026 农历节日 (需每年更新)
2026-02-01 17:42:15 +08:00
"02-16" = "除夕快乐!记得吃饺子"
"02-17" = "春节快乐!恭喜发财" # 春节
"03-03" = "元宵快乐!吃汤圆啦"
"04-05" = "清明安康"
"06-19" = "端午安康!记得吃粽子"
"08-19" = "七夕快乐!今晚月色美"
"09-25" = "中秋快乐!记得吃月饼"
"10-19" = "重阳安康!登高望远"
2026-02-01 17:00:25 +08:00
2026-01-23 23:24:46 +08:00
# ----------------------------------------------------------------------------
# 留言页面友链申请示例配置 (Message Page Link Exchange Example)
# ----------------------------------------------------------------------------
[params.message_info]
name = "优世界"
description = "不以物喜,不以己悲"
url = "https://usj.cc"
icon = "https://usj.cc/favicon.ico"
2026-01-23 22:02:11 +08:00
# ----------------------------------------------------------------------------
# 评论系统 (Artalk Comments)
# ----------------------------------------------------------------------------
[params.artalk]
server = "https://artalk.usj.cc"
site = "优世界"
2026-05-24 16:00:53 +08:00
ai_badge = "AI" # 自定义 AI 评论标识
2026-01-23 22:02:11 +08:00
emoticons = "/emotion/OwO.json"
gravatar = "https://cravatar.cn/avatar/"
# ----------------------------------------------------------------------------
# 弹幕配置 (Barrage Configuration)
# ----------------------------------------------------------------------------
[params.barrage]
2026-01-26 23:09:57 +08:00
enable = true
2026-01-23 22:02:11 +08:00
enableHitokoto = true
hitokotoUrl = "https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=i"
2026-01-30 19:52:13 +08:00
# 一言弹幕头像,留空则默认使用博客头像
hitokotoAvatar = ""
2026-01-23 22:02:11 +08:00
2026-01-31 22:52:19 +08:00
# ----------------------------------------------------------------------------
# 无限加载配置 (Infinite Scroll Configuration)
# ----------------------------------------------------------------------------
[params.infiniteScroll]
enable = false
2026-01-30 21:11:05 +08:00
# ----------------------------------------------------------------------------
# AI 评论配置 (AI Comment Configuration)
# ----------------------------------------------------------------------------
[params.ai]
2026-05-24 16:00:53 +08:00
name = ""
avatar = "/image/avatar/ai-avatar.jpg"
2026-01-30 21:11:05 +08:00
# provider = "siliconflow" # options: siliconflow, zhipu
# model = "deepseek-ai/DeepSeek-V3"
2026-01-23 22:02:11 +08:00
2026-02-02 21:36:53 +08:00
# ----------------------------------------------------------------------------
# 打赏配置 (Reward Configuration)
# ----------------------------------------------------------------------------
[params.reward]
2026-06-02 11:43:58 +08:00
enable = false
2026-02-05 21:38:00 +08:00
wechat = "/image/reward/new.png"
# alipay = "/image/reward/alipay.jpg"
# qq = "/image/reward/reward.png"
2026-02-02 21:36:53 +08:00
2026-01-23 22:02:11 +08:00
# ----------------------------------------------------------------------------
# 样式定制 (Style Customization)
# ----------------------------------------------------------------------------
2026-01-22 22:33:35 +08:00
[params.style]
# 自定义背景图开关
enableBackgroundImage = true
# 背景图链接 (留空则不显示背景图,enableBackgroundImage=false 时此项无效)
2026-01-31 23:42:49 +08:00
backgroundImageUrl = "/image/background/deno.webp"
2026-01-23 22:02:11 +08:00
# 背景图显示模式: cover (全屏铺满), contain (完整显示), auto (原始大小), 或具体数值
2026-01-22 22:33:35 +08:00
backgroundSize = "contain"
# 背景图重复: no-repeat (不重复), repeat (重复), repeat-x, repeat-y, round (自动调整)
backgroundRepeat = "round"
# 背景图位置: center, top, bottom, left, right
backgroundPosition = "center"
# 背景图固定: fixed (固定), scroll (随页面滚动)
backgroundAttachment = "fixed"
2026-01-23 22:02:11 +08:00
# ==============================================================================
# 菜单配置 (Menus)
# ==============================================================================
[[menu.main]]
2026-01-29 22:08:47 +08:00
name = "首页"
2026-01-23 22:02:11 +08:00
pageRef = "/"
weight = 10
[[menu.main]]
2026-01-29 22:08:47 +08:00
name = "关于"
2026-01-23 22:02:11 +08:00
url = "/about.html"
weight = 20
[[menu.main]]
2026-01-29 22:08:47 +08:00
name = "友圈"
2026-01-23 22:02:11 +08:00
url = "/circles.html"
weight = 30
[[menu.main]]
2026-01-29 22:08:47 +08:00
name = "留言"
url = "/comment.html"
weight = 40
[[menu.main]]
name = "归档"
2026-01-23 22:02:11 +08:00
url = "/archives.html"
2026-01-29 22:08:47 +08:00
weight = 50
[[menu.main]]
name = "友链"
url = "/links.html"
weight = 60