From b4fe04727f8373bf1b27ddbe872039b264f714cb Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Wed, 12 Aug 2026 23:22:36 -0400 Subject: [PATCH] Fix issue with deprecated class and make accent a config var --- .gitignore | 7 ++----- assets/herman.css | 2 +- hugo.toml | 2 ++ layouts/_default/baseof.html | 2 +- layouts/_default/rss.xml | 18 +++++------------- theme.toml | 2 +- 6 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index b1705b4..f389b1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -.hugo_build.lock -.DS_Store -resources/ -todo.md -exampleSite/public/ +public/* .env +.hugo_build.lock diff --git a/assets/herman.css b/assets/herman.css index d59cdf7..daba1dd 100644 --- a/assets/herman.css +++ b/assets/herman.css @@ -10,7 +10,7 @@ font-size: 75%; --color-dark: #1a1a1a; --color-light: #faf8f4; - --color-primary: #EF9F27; + --color-primary: {{ .Site.Params.accentColor }}; --size: 1rem; --spacing: calc(var(--size) * 2.4); } diff --git a/hugo.toml b/hugo.toml index 96dc156..2309541 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,3 +1,5 @@ +[params] +accentColor = "#EF9F27" [module] [[module.imports]] path = 'forge.alexselimov.com/aselimov/hugo-unified-git-activity' diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 294749a..f7c093a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 70d1193..f35b51a 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,4 +1,3 @@ -{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} {{- $authorEmail := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} @@ -6,14 +5,8 @@ {{- $authorEmail = . }} {{- end }} {{- end }} -{{- else }} - {{- with site.Author.email }} - {{- $authorEmail = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} - {{- end }} {{- end }} -{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} {{- $authorName := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} @@ -21,12 +14,7 @@ {{- $authorName = . }} {{- end }} {{- else }} - {{- $authorName = . }} - {{- end }} -{{- else }} - {{- with site.Author.name }} {{- $authorName = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} {{- end }} {{- end }} @@ -49,7 +37,11 @@ {{ .Permalink }} Recent content {{ if not .IsHome }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io - {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{ with site.Language.Lang }} + {{ . }} + {{ else }} + en + {{ end }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} diff --git a/theme.toml b/theme.toml index 7f6b154..f5c4dc3 100644 --- a/theme.toml +++ b/theme.toml @@ -11,7 +11,7 @@ https://forge.alexselimov.com/aselimov/upvoters server to handle anonymous upvot homepage = "https://forge.alexselimov.com/aselimov/hugo-bearcub" tags = ["blog", "responsive", "minimal", "personal", "dark", "multilingual"] -features = ["favicon", "seo", "no javascript", "rss", "social cards"] +features = ["favicon", "seo", "rss", "social cards"] # If the theme has a single author [author]