275 lines
9.8 KiB
TOML
275 lines
9.8 KiB
TOML
# ==============================================================================
|
|
# 基础配置 (Basic Configuration)
|
|
# ==============================================================================
|
|
|
|
# 网站的基本 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
|
|
uglyURLs = true
|
|
|
|
# 分页设置:每页展示的文章数量 (Pagination)
|
|
paginate = 6
|
|
|
|
# 开启 CJK (中日韩) 语言支持,用于准确统计字数 (CJK Language Support)
|
|
hasCJKLanguage = true
|
|
|
|
# ==============================================================================
|
|
# 构建与环境配置 (Build & Environment)
|
|
# ==============================================================================
|
|
|
|
# 模块配置 (Module Configuration)
|
|
[module]
|
|
[module.hugoVersion]
|
|
extended = false
|
|
min = "0.116.0"
|
|
|
|
# 内容渲染配置 (Markup Configuration)
|
|
[markup]
|
|
[markup.goldmark]
|
|
[markup.goldmark.renderer]
|
|
unsafe = true # 允许在 Markdown 中使用 HTML 标签 (Allow raw HTML)
|
|
[markup.highlight]
|
|
style = "dracula" # 代码高亮样式 (Highlight style)
|
|
noClasses = false
|
|
|
|
# 资源压缩配置 (Minification)
|
|
[minify]
|
|
disableXML = true
|
|
[minify.tdewolff]
|
|
[minify.tdewolff.html]
|
|
keepConditionalComments = true
|
|
keepDefaultAttrVals = true
|
|
keepDocumentTags = true
|
|
keepEndTags = true
|
|
keepWhitespace = false
|
|
|
|
# ==============================================================================
|
|
# URL 与 输出格式 (URLs & Output Formats)
|
|
# ==============================================================================
|
|
|
|
# 自定义文章固定链接 (Permalinks)
|
|
# 使用日期作为文件名,例如 /20260117.html
|
|
[permalinks]
|
|
post = "/:slug"
|
|
|
|
# 确保日期优先使用 Front Matter 中的 date
|
|
[frontmatter]
|
|
date = ["date", "publishDate", "lastmod"]
|
|
lastmod = ["lastmod", ":git", "date", "publishDate"]
|
|
|
|
# 输出格式配置 (Outputs)
|
|
[outputs]
|
|
home = ["HTML", "RSS", "JSON"]
|
|
|
|
# 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" }
|
|
]
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 移动端配置 (Mobile Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.mobile]
|
|
show_social = true # 移动端是否显示社交图标
|
|
show_hitokoto = true # 移动端是否显示一言 (打字机效果)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 关于页面配置 (About Page Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.about]
|
|
enableheatmap = true # 开启热力图 (Enable Heatmap)
|
|
enableskills = false # 开启技能栈 (Enable Skills)
|
|
enablealbum = false # 开启相册 (Enable Album)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 作者信息 (Author Info)
|
|
# ----------------------------------------------------------------------------
|
|
[params.author]
|
|
name = "小赵"
|
|
avatar = "/image/avatar/tx7.jpg"
|
|
description = "不以物喜,不以己悲"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 首页搜索配置 (Home Search Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.home_search]
|
|
enable = true
|
|
# 搜索提示小人头像 (Search Mascot Avatar)
|
|
mascot = "/emotion/bqb/chijing.png"
|
|
# 搜索提示文案 (Search Hint Text)
|
|
hint = "点击随笔 开始搜索"
|
|
|
|
# 时段问候语 (Time-based Greetings)
|
|
[params.home_search.greetings]
|
|
morning = "早安!元气满满" # 6:00 - 11:00
|
|
noon = "中午好!记得干饭" # 11:00 - 14:00
|
|
afternoon = "下午好!喝杯茶吧" # 14:00 - 18:00
|
|
evening = "晚上好!放松一下" # 18:00 - 22:00
|
|
night = "早点睡对皮肤好" # 22:00 - 6:00
|
|
|
|
# 节日问候语 (Holiday Greetings) - 格式: "MM-DD" = "文案"
|
|
# 已包含 2026 年农历节日对应的公历日期
|
|
[params.home_search.holidays]
|
|
"01-01" = "元旦快乐!新年新气象"
|
|
"02-14" = "情人节快乐!愿有人陪"
|
|
"03-08" = "女神节快乐!做自己"
|
|
"04-01" = "愚人节快乐!别被骗哦"
|
|
"05-01" = "劳动节快乐!放假啦"
|
|
"05-04" = "青年节快乐!永远年轻"
|
|
"06-01" = "儿童节快乐!童心未泯"
|
|
"10-01" = "国庆节快乐!享受假期"
|
|
"12-25" = "圣诞快乐!Merry Xmas"
|
|
|
|
# 2026 农历节日 (需每年更新)
|
|
"02-16" = "除夕快乐!记得吃饺子"
|
|
"02-17" = "春节快乐!恭喜发财" # 春节
|
|
"03-03" = "元宵快乐!吃汤圆啦"
|
|
"04-05" = "清明安康"
|
|
"06-19" = "端午安康!记得吃粽子"
|
|
"08-19" = "七夕快乐!今晚月色美"
|
|
"09-25" = "中秋快乐!记得吃月饼"
|
|
"10-19" = "重阳安康!登高望远"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 留言页面友链申请示例配置 (Message Page Link Exchange Example)
|
|
# ----------------------------------------------------------------------------
|
|
[params.message_info]
|
|
name = "优世界"
|
|
description = "不以物喜,不以己悲"
|
|
url = "https://usj.cc"
|
|
icon = "https://usj.cc/favicon.ico"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 评论系统 (Artalk Comments)
|
|
# ----------------------------------------------------------------------------
|
|
[params.artalk]
|
|
server = "https://artalk.usj.cc"
|
|
site = "优世界"
|
|
ai_badge = "AI" # 自定义 AI 评论标识
|
|
emoticons = "/emotion/OwO.json"
|
|
gravatar = "https://cravatar.cn/avatar/"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 弹幕配置 (Barrage Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.barrage]
|
|
enable = true
|
|
enableHitokoto = true
|
|
hitokotoUrl = "https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=i"
|
|
# 一言弹幕头像,留空则默认使用博客头像
|
|
hitokotoAvatar = ""
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 无限加载配置 (Infinite Scroll Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.infiniteScroll]
|
|
enable = false
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# AI 评论配置 (AI Comment Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.ai]
|
|
name = ""
|
|
avatar = "/image/avatar/ai-avatar.jpg"
|
|
# provider = "siliconflow" # options: siliconflow, zhipu
|
|
# model = "deepseek-ai/DeepSeek-V3"
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 打赏配置 (Reward Configuration)
|
|
# ----------------------------------------------------------------------------
|
|
[params.reward]
|
|
enable = true
|
|
wechat = "/image/reward/new.png"
|
|
# alipay = "/image/reward/alipay.jpg"
|
|
# qq = "/image/reward/reward.png"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 样式定制 (Style Customization)
|
|
# ----------------------------------------------------------------------------
|
|
[params.style]
|
|
# 自定义背景图开关
|
|
enableBackgroundImage = true
|
|
# 背景图链接 (留空则不显示背景图,enableBackgroundImage=false 时此项无效)
|
|
backgroundImageUrl = "/image/background/deno.webp"
|
|
# 背景图显示模式: cover (全屏铺满), contain (完整显示), auto (原始大小), 或具体数值
|
|
backgroundSize = "contain"
|
|
# 背景图重复: no-repeat (不重复), repeat (重复), repeat-x, repeat-y, round (自动调整)
|
|
backgroundRepeat = "round"
|
|
# 背景图位置: center, top, bottom, left, right
|
|
backgroundPosition = "center"
|
|
# 背景图固定: fixed (固定), scroll (随页面滚动)
|
|
backgroundAttachment = "fixed"
|
|
|
|
|
|
|
|
# ==============================================================================
|
|
# 菜单配置 (Menus)
|
|
# ==============================================================================
|
|
|
|
[[menu.main]]
|
|
name = "首页"
|
|
pageRef = "/"
|
|
weight = 10
|
|
|
|
[[menu.main]]
|
|
name = "关于"
|
|
url = "/about.html"
|
|
weight = 20
|
|
|
|
[[menu.main]]
|
|
name = "友圈"
|
|
url = "/circles.html"
|
|
weight = 30
|
|
|
|
[[menu.main]]
|
|
name = "留言"
|
|
url = "/comment.html"
|
|
weight = 40
|
|
|
|
[[menu.main]]
|
|
name = "归档"
|
|
url = "/archives.html"
|
|
weight = 50
|
|
|
|
[[menu.main]]
|
|
name = "友链"
|
|
url = "/links.html"
|
|
weight = 60
|