From c5330915eacd44283b05afe6fb6864b7398ad5a7 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Sun, 29 Sep 2024 23:09:44 -0700 Subject: [PATCH] Add option to toggle footer theme name display - Introduced `footerThemeName` parameter in `hugo.toml.example` to control the display of Hugo and Hermit-V2 theme tribute in the footer. - Updated `footer.html` to conditionally display the tribute based on the `footerThemeName` parameter. --- hugo.toml.example | 2 ++ layouts/partials/footer.html | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hugo.toml.example b/hugo.toml.example index 08a8336..31a6908 100644 --- a/hugo.toml.example +++ b/hugo.toml.example @@ -90,6 +90,8 @@ expiryDate = ["expiryDate"] #homeSubtitle = "CHANGE ME HOME SUBTITLE" footerCopyright = "CHANGE ME FOOTER COPYRIGHT" + # Whether to show a tribute to hugo and hermit-v2 theme + footerThemeName = true # bgImg = "" # gitUrl = "https://github.com/1bl4z3r/hermit-V2/tree/staging" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 84ab09e..4079a58 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,8 +2,10 @@

© {{ now.Format "2006" }} {{ .Site.Params.author.name }} · {{ .Site.Params.footerCopyright | safeHTML }} - · Made with Hugo - · Theme Hermit-V2 + {{- if .Site.Params.footerThemeName -}} + · Made with Hugo + · Theme Hermit-V2 + {{- end -}} {{- with .OutputFormats.Get "RSS" }} · {{- partial "svg.html" (dict "context" . "name" "rss") -}} {{- end -}}