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