From 8662c0add22ba6361c8e5e02563d1b8fb2a900cc Mon Sep 17 00:00:00 2001 From: marcodn Date: Thu, 2 Jan 2025 19:19:27 +0100 Subject: [PATCH] Umstellung auf neue Hugo Version 0.139.4 - Verschieben der Author-Sektion --- README.md | 14 +++++++++++--- layouts/_default/list.html | 4 ++-- layouts/_default/rss.xml | 8 ++++---- layouts/_default/single.html | 4 ++-- layouts/blog/rss.xml | 8 ++++---- layouts/feed/rss.xml | 4 ++-- layouts/index.html | 8 ++++---- layouts/partials/head.html | 2 +- theme.toml | 4 ++-- 9 files changed, 32 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d7580ff..7b7505b 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ Als nächstes öffnen Sie `config.toml` in der Basis der Hugo-Site und stellen s theme = "BlogAMore" ``` +## Breaking Changes + +### Author umgestellt + +Aufgrund der Depract-Meldungen ab der Version 0.124 wurde die _author_ und _author.social_-Sektion als Untersektion zur Params-Sektion verschoben. + ## Konfiguration ### config.toml Beispiel @@ -38,10 +44,11 @@ theme = "BlogAMore" baseURL = '/' languageCode = 'de-DE' title = 'Blogging and more' -paginate = 12 theme = "BlogAMore" +[pagination] + pagerSize = 12 -[author] +[Params.author] name = 'Max Mustsermann' email = 'email@example.com' homepage = 'http://example.com' @@ -51,7 +58,7 @@ theme = "BlogAMore" # Name der Datendatei mit einer Auflistung von Link, Aufbau der Datei ist im Shortcode Link zu finden linkdata = "links" -[author.social] +[Params.author.social] # Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben) Email = "email@example.com" Phone = "+49 (0) 1234 56789" @@ -241,3 +248,4 @@ Haben Sie einen Fehler gefunden oder eine Idee für ein neues Feature? Schicken ## Lizenz Diese Thema ist unter der [LGPLv3 Lizenz](https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE) freigegeben. + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ba5e27f..2e73c8e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,9 +12,9 @@ {{ define "sidebar" }}
{{- partial "widget/header.html" (dict "title" "About Me") -}} - {{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}} + {{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Author.avatar "description" .Site.Params.Author.description) -}} - {{ with .Site.Author.social }} + {{ with .Site.Params.Author.social }} {{- partial "widget/header.html" (dict "title" "Contact Me") -}} {{- partial "widget/socials.html" . -}} {{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 1cca277..f6adca7 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -11,9 +11,9 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -24,7 +24,7 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Summary | html }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 56981bc..b33bada 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,9 +6,9 @@ {{ define "sidebar" }}
{{- partial "widget/header.html" (dict "title" "About Me") -}} - {{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}} + {{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Author.avatar "description" .Site.Params.Author.description) -}} - {{- with .Site.Author.social }} + {{- with .Site.Params.Author.social }} {{- partial "widget/header.html" (dict "title" "Contact Me") -}} {{- partial "widget/socials.html" . -}} {{ end -}} diff --git a/layouts/blog/rss.xml b/layouts/blog/rss.xml index fc65600..291c1fb 100644 --- a/layouts/blog/rss.xml +++ b/layouts/blog/rss.xml @@ -15,9 +15,9 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -28,7 +28,7 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Summary | html }} diff --git a/layouts/feed/rss.xml b/layouts/feed/rss.xml index a56cd0a..7af35de 100644 --- a/layouts/feed/rss.xml +++ b/layouts/feed/rss.xml @@ -6,7 +6,7 @@ {{ .Site.BaseURL }} {{ .Page.Params.description }} {{ .Site.LanguageCode }} - {{ with .Site.Author.email }}{{.}}{{end}} + {{ with .Site.Params.Author.email }}{{.}}{{end}} {{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ range (index .Site.Data ( .Page.Params.dataname )) }} @@ -19,7 +19,7 @@ {{- (path.Join $baseDir .filename) | absURL -}} {{ end }} - {{ with $.Site.Author.email }}{{.}}{{end}} + {{ with $.Site.Params.Author.email }}{{.}}{{end}} {{ (time .published).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} diff --git a/layouts/index.html b/layouts/index.html index 03b59de..a862cbc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,12 +9,12 @@
{{- partial "widget/header.html" (dict "title" "About Me") -}} - {{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}} + {{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Author.avatar "description" .Site.Params.Author.description) -}}
{{- partial "widget/header.html" (dict "title" "Contact Me") -}} - {{ with .Site.Author.social }} + {{ with .Site.Params.Author.social }} {{- partial "widget/socials.html" . -}} {{ end }}
@@ -22,8 +22,8 @@ {{ end }} {{ define "sidebar" }} - {{- if isset .Site.Author "linkdata" -}} - {{- with (index .Site.Data .Site.Author.linkdata) }} + {{- if isset .Site.Params.Author "linkdata" -}} + {{- with (index .Site.Data .Site.Params.Author.linkdata) }}
{{- partial "widget/header.html" (dict "title" "Links") -}} {{- partial "widget/links.html" . -}} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b723b91..52180e6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -9,7 +9,7 @@ {{/* compressed soll besser sein als minify bei SASS */}} {{- $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") -}} - {{- $sassStyle := resources.Get "_own/sass/main.scss" | resources.ToCSS $sassOptions | minify -}} + {{- $sassStyle := resources.Get "_own/sass/main.scss" | toCSS $sassOptions | minify -}} {{- $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify -}}{{/* .Resources.GetMatch "css/**.css" */}} diff --git a/theme.toml b/theme.toml index 440823b..7ed2381 100644 --- a/theme.toml +++ b/theme.toml @@ -3,9 +3,9 @@ license = "LGPLv3" licenselink = "https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE" description = "" homepage = "https://gitea.marcodn.de/mdn/blogamore" -tags = [] +tags = ["blog", "responsive", "minimal", "minimalistic", "reading", "fast", "mobile"] features = [] -min_version = "0.41.0" +min_version = "v0.124.0" [author] name = "marcodn"