Files
blog/hugo.toml
T

211 lines
7.0 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)
2024-10-05 22:58:17 +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]
[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-01-22 21:26:48 +08:00
post = "/:year:month:day"
2026-01-22 22:33:35 +08:00
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-01-31 21:27:06 +08:00
# ----------------------------------------------------------------------------
# 关于页面配置 (About Page Configuration)
# ----------------------------------------------------------------------------
[params.about]
enableheatmap = false # 开启热力图 (Enable Heatmap)
enableskills = false # 开启技能栈 (Enable Skills)
2026-01-23 22:02:11 +08:00
# ----------------------------------------------------------------------------
# 作者信息 (Author Info)
# ----------------------------------------------------------------------------
[params.author]
name = "小赵"
avatar = "/image/tx7.jpg"
description = "不以物喜,不以己悲"
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-01-31 21:27:06 +08:00
ai_badge = "捧场王" # 自定义 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]
name = "小小赵下士"
avatar = "/image/ai.jpg"
# provider = "siliconflow" # options: siliconflow, zhipu
# model = "deepseek-ai/DeepSeek-V3"
2026-01-23 22:02:11 +08:00
# ----------------------------------------------------------------------------
# 样式定制 (Style Customization)
# ----------------------------------------------------------------------------
2026-01-22 22:33:35 +08:00
[params.style]
# 自定义背景图开关
enableBackgroundImage = true
# 背景图链接 (留空则不显示背景图,enableBackgroundImage=false 时此项无效)
backgroundImageUrl = "/image/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