Umstellung auf neue Hugo Version 0.139.4 - Verschieben der Author-Sektion

This commit is contained in:
marcodn 2025-01-02 19:19:27 +01:00
parent dca5adb929
commit 8662c0add2
9 changed files with 32 additions and 24 deletions

View file

@ -30,6 +30,12 @@ Als nächstes öffnen Sie `config.toml` in der Basis der Hugo-Site und stellen s
theme = "BlogAMore" 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 ## Konfiguration
### config.toml Beispiel ### config.toml Beispiel
@ -38,10 +44,11 @@ theme = "BlogAMore"
baseURL = '/' baseURL = '/'
languageCode = 'de-DE' languageCode = 'de-DE'
title = 'Blogging and more' title = 'Blogging and more'
paginate = 12
theme = "BlogAMore" theme = "BlogAMore"
[pagination]
pagerSize = 12
[author] [Params.author]
name = 'Max Mustsermann' name = 'Max Mustsermann'
email = 'email@example.com' email = 'email@example.com'
homepage = 'http://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 # Name der Datendatei mit einer Auflistung von Link, Aufbau der Datei ist im Shortcode Link zu finden
linkdata = "links" linkdata = "links"
[author.social] [Params.author.social]
# Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben) # Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben)
Email = "email@example.com" Email = "email@example.com"
Phone = "+49 (0) 1234 56789" Phone = "+49 (0) 1234 56789"
@ -241,3 +248,4 @@ Haben Sie einen Fehler gefunden oder eine Idee für ein neues Feature? Schicken
## Lizenz ## Lizenz
Diese Thema ist unter der [LGPLv3 Lizenz](https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE) freigegeben. Diese Thema ist unter der [LGPLv3 Lizenz](https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE) freigegeben.

View file

@ -12,9 +12,9 @@
{{ define "sidebar" }} {{ define "sidebar" }}
<div class="position-sticky"> <div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "About Me") -}} {{- 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/header.html" (dict "title" "Contact Me") -}}
{{- partial "widget/socials.html" . -}} {{- partial "widget/socials.html" . -}}
{{ end }} {{ end }}

View file

@ -11,9 +11,9 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
@ -24,7 +24,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | html }}</description>
</item> </item>

View file

@ -6,9 +6,9 @@
{{ define "sidebar" }} {{ define "sidebar" }}
<div class="position-sticky"> <div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "About Me") -}} {{- 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/header.html" (dict "title" "Contact Me") -}}
{{- partial "widget/socials.html" . -}} {{- partial "widget/socials.html" . -}}
{{ end -}} {{ end -}}

View file

@ -15,9 +15,9 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
@ -28,7 +28,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | html }}</description>
</item> </item>

View file

@ -6,7 +6,7 @@
<link>{{ .Site.BaseURL }}</link> <link>{{ .Site.BaseURL }}</link>
<description>{{ .Page.Params.description }}</description> <description>{{ .Page.Params.description }}</description>
<language>{{ .Site.LanguageCode }}</language> <language>{{ .Site.LanguageCode }}</language>
<copyright>{{ with .Site.Author.email }}{{.}}{{end}}</copyright> <copyright>{{ with .Site.Params.Author.email }}{{.}}{{end}}</copyright>
<pubDate>{{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ range (index .Site.Data ( .Page.Params.dataname )) }} {{ range (index .Site.Data ( .Page.Params.dataname )) }}
<item> <item>
@ -19,7 +19,7 @@
{{- (path.Join $baseDir .filename) | absURL -}} {{- (path.Join $baseDir .filename) | absURL -}}
{{ end }} {{ end }}
</link> </link>
<author>{{ with $.Site.Author.email }}{{.}}{{end}}</author> <author>{{ with $.Site.Params.Author.email }}{{.}}{{end}}</author>
<guid></guid> <guid></guid>
<pubDate>{{ (time .published).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ (time .published).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
</item> </item>

View file

@ -9,12 +9,12 @@
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
{{- partial "widget/header.html" (dict "title" "About Me") -}} {{- 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) -}}
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
{{- partial "widget/header.html" (dict "title" "Contact Me") -}} {{- partial "widget/header.html" (dict "title" "Contact Me") -}}
{{ with .Site.Author.social }} {{ with .Site.Params.Author.social }}
{{- partial "widget/socials.html" . -}} {{- partial "widget/socials.html" . -}}
{{ end }} {{ end }}
</div> </div>
@ -22,8 +22,8 @@
{{ end }} {{ end }}
{{ define "sidebar" }} {{ define "sidebar" }}
{{- if isset .Site.Author "linkdata" -}} {{- if isset .Site.Params.Author "linkdata" -}}
{{- with (index .Site.Data .Site.Author.linkdata) }} {{- with (index .Site.Data .Site.Params.Author.linkdata) }}
<div class="position-sticky"> <div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "Links") -}} {{- partial "widget/header.html" (dict "title" "Links") -}}
{{- partial "widget/links.html" . -}} {{- partial "widget/links.html" . -}}

View file

@ -9,7 +9,7 @@
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{/* compressed soll besser sein als minify bei SASS */}} {{/* compressed soll besser sein als minify bei SASS */}}
{{- $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") -}} {{- $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 -}}
<link rel="stylesheet" type="text/css" href="{{ $sassStyle.RelPermalink | relURL }}"> <link rel="stylesheet" type="text/css" href="{{ $sassStyle.RelPermalink | relURL }}">
{{- $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify -}}{{/* .Resources.GetMatch "css/**.css" */}} {{- $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify -}}{{/* .Resources.GetMatch "css/**.css" */}}

View file

@ -3,9 +3,9 @@ license = "LGPLv3"
licenselink = "https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE" licenselink = "https://gitea.marcodn.de/mdn/blogamore/src/branch/main/LICENSE"
description = "" description = ""
homepage = "https://gitea.marcodn.de/mdn/blogamore" homepage = "https://gitea.marcodn.de/mdn/blogamore"
tags = [] tags = ["blog", "responsive", "minimal", "minimalistic", "reading", "fast", "mobile"]
features = [] features = []
min_version = "0.41.0" min_version = "v0.124.0"
[author] [author]
name = "marcodn" name = "marcodn"