From 7de975fcd2d22872c7c20ddf313b06ad0d53208d Mon Sep 17 00:00:00 2001 From: Vaica <94612053+zqlit@users.noreply.github.com> Date: Mon, 19 Jan 2026 00:15:15 +0800 Subject: [PATCH] =?UTF-8?q?fixed=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hugo.toml | 11 +++++++++-- themes/Ying/hugo.toml | 10 +++++----- themes/Ying/layouts/partials/header.html | 10 +++++----- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hugo.toml b/hugo.toml index 923a041f..ee9416d2 100644 --- a/hugo.toml +++ b/hugo.toml @@ -2,14 +2,21 @@ baseURL = "https://usj.cc" languageCode = 'zh-cn' title = '优世界' theme = 'Ying' + +# 文章与页面使用 .html 结尾(ugly URLs 模式) +uglyURLs = true + # 分页展示文章数 每页展示文章的数量 paginate = 6 + #计算文章总字数 HasCJKLanguage = true + #hugo代码高亮显示 [markup] [markup.highlight] style = 'tango' -# 去掉post + +# 自定义文章固定链接:使用 slug 作为文件名(如 /20260117.html) [permalinks] - post = "/:slug/" + post = "/:slug" diff --git a/themes/Ying/hugo.toml b/themes/Ying/hugo.toml index 629cee70..43bbc3ac 100644 --- a/themes/Ying/hugo.toml +++ b/themes/Ying/hugo.toml @@ -36,27 +36,27 @@ weight = 10 [[menu.main]] name = "about" weight = 20 -url = "/about" +url = "/about.html" [[menu.main]] name = "ly" weight = 20 -url = "/ly" +url = "/ly.html" [[menu.main]] name = "links" weight = 20 -url = "/links" +url = "/links.html" [[menu.main]] name = "circles" weight = 30 -url = "/circles" +url = "/circles.html" [[menu.main]] name = "archives" weight = 20 -url = "/archives" +url = "/archives.html" # 模块配置 [module] diff --git a/themes/Ying/layouts/partials/header.html b/themes/Ying/layouts/partials/header.html index aecef046..fcf10b24 100644 --- a/themes/Ying/layouts/partials/header.html +++ b/themes/Ying/layouts/partials/header.html @@ -25,11 +25,11 @@