Update Hugo configuration and add footer partial for improved site presentation

This commit is contained in:
2025-03-28 21:19:42 +08:00
parent bdbf80f564
commit e3ceb1bb10
2 changed files with 24 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
# 网站基本信息 # 网站基本信息
baseURL = "https://blog.7wate.com/" # 请替换为你的实际域名 baseURL = "https://blog.7wate.com/"
languageCode = "zh-cn" languageCode = "zh-cn"
title = "向阳而生" title = "向阳而生"
theme = "typo" theme = "typo"
@@ -25,35 +25,31 @@ timeout = "300s"
[[params.menu]] [[params.menu]]
name = "首页" name = "首页"
url = "/" url = "/"
weight = 1
[[params.menu]] [[params.menu]]
name = "文辑" name = "文辑"
url = "/posts/" url = "/posts/"
weight = 2
[[params.menu]] [[params.menu]]
name = "片语" name = "片语"
url = "https://memos.7wate.com/explore" url = "https://memos.7wate.com/explore"
newTab = true newTab = true
weight = 3
[[params.menu]] [[params.menu]]
name = "关于" name = "关于"
url = "/about/" url = "/about/"
newTab = true newTab = true
weight = 4
# Typo 主题参数 # Typo 主题参数
[params] [params]
description = "愿我们都能:执着于热爱,纯粹于当下。" description = "愿我们都能:执着于热爱,纯粹于当下。"
theme = "auto" theme = "auto"
colorPalette = "base16-default" colorPalette = "base16-default"
# default; # 可选颜色:default, catpuccin, gruvebox, eink, base16-default, base16-eighties, base16-ocean, base16-mocha, base16-cupcake.
# catpuccin;
# gruvebox;
# eink;
# base16-default;
# base16-eighties;
# base16-ocean;
# base16-mocha;
# base16-cupcake.
# 首页设置 # 首页设置
homeIntroTitle = "👋👋👋" homeIntroTitle = "👋👋👋"
@@ -73,10 +69,6 @@ listSummaries = false
listDateFormat = "2006 Jan" listDateFormat = "2006 Jan"
homeDateFormat = "2 Jan" homeDateFormat = "2 Jan"
# 页脚设置
showFooter = true
footerContent = "© 2025 向阳而生"
# 面包屑导航 # 面包屑导航
[params.breadcrumbs] [params.breadcrumbs]
enabled = true enabled = true
@@ -94,7 +86,7 @@ url = "mailto:zhouzhongping@7wate.com"
[[params.social]] [[params.social]]
name = "rss" name = "rss"
url = "https://blog.7wate.com/feed.xml" url = "https://blog.7wate.com/index.xml"
# Markdown 与高亮设置 # Markdown 与高亮设置
[markup] [markup]
@@ -114,6 +106,11 @@ url = "https://blog.7wate.com/feed.xml"
priority = 0.5 priority = 0.5
filename = "sitemap.xml" filename = "sitemap.xml"
# RSS 订阅
[services]
[services.rss]
limit = 7
# 网站分析 # 网站分析
[params.umami] [params.umami]
enable = true enable = true
@@ -130,4 +127,5 @@ jsLocation = "https://umami.7wate.com/script.js"
# 构建压缩设置 # 构建压缩设置
[minify] [minify]
minifyOutput = true disableXML = true
minifyOutput = true

View File

@@ -0,0 +1,10 @@
{{ $showFooter := default true .Site.Params.showFooter }}
{{ if $showFooter }}
{{ if not .Site.Params.footerContent }}
<p>© {{ now.Format "2006" }} {{ .Site.Title }}. All rights reserved.</p>
{{ end }}
{{ with .Site.Params.footerContent }}
<p>{{ . | markdownify }}</p>
{{ end }}
{{ end }}