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 @@