Autor-Seiten: /authors/<slug>/ (rundes Bild, Name, Bio, zentriert) + Byline-Link

- layouts/authors/single.html rendert die Autor-Seite zentriert
- Byline in single.html + index.html verlinkt den Autornamen zu /authors/<urlize name>/
  (nur wenn die Seite existiert)
- CMS-Profil-Speichern schreibt content/authors/<slug>.md (aus Name/Bio/Avatar)
  + data/authors.json und baut public neu → Seite & Links sofort live
- Autor-Seiten aus dem Inhalts-Editor ausgeblendet (über „Profil" verwaltet)
- custom.css: .author-page / -photo / -name / -bio + Byline-Link-Stil

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 13:07:26 +02:00
parent 2b682f5149
commit 6a3b1b5b5e
6 changed files with 78 additions and 7 deletions
+5 -1
View File
@@ -16,9 +16,13 @@
<p class="single-summary">{{ . }}</p>
{{ end }}
{{ $author := .Params.author | default site.Params.author.name }}
{{ $authorPage := cond (ne $author "") (site.GetPage (printf "/authors/%s" (urlize $author))) false }}
{{ if or $author .Date }}
<p class="single-byline">
{{- with $author -}}<span class="byline-author">{{ . }}</span>{{- end -}}
{{- with $author -}}
{{- if $authorPage -}}<a class="byline-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
{{- else -}}<span class="byline-author">{{ . }}</span>{{- end -}}
{{- end -}}
{{- if and $author .Date -}}, {{ end -}}
{{- if .Date -}}<time class="byline-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>{{- end -}}
</p>
+9
View File
@@ -0,0 +1,9 @@
{{ define "main" }}
<article class="author-page">
{{ with .Params.avatar }}
<img class="author-photo" src="{{ . }}" alt="{{ $.Title }}" loading="eager" />
{{ end }}
<h1 class="author-name">{{ .Title }}</h1>
{{ with .Content }}<div class="author-bio">{{ . }}</div>{{ end }}
</article>
{{ end }}
+5 -1
View File
@@ -15,6 +15,7 @@
{{ $section := "" }}
{{ with .Parent }}{{ $section = path.Base .RelPermalink }}{{ end }}
{{ $author := .Params.author | default site.Params.author.name }}
{{ $authorPage := cond (ne $author "") (site.GetPage (printf "/authors/%s" (urlize $author))) false }}
{{ $cover := .Params.cover_image }}
{{/* Layout: explicit `layout:` in front matter, else derive:
- cover_image present → image
@@ -42,7 +43,10 @@
<p class="journal-summary">{{ . }}</p>
{{ end }}
<p class="journal-byline">
{{- with $author -}}<span class="journal-author">{{ . }}</span>{{- end -}}
{{- with $author -}}
{{- if $authorPage -}}<a class="journal-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
{{- else -}}<span class="journal-author">{{ . }}</span>{{- end -}}
{{- end -}}
{{- if and $author .Date -}}, {{ end -}}
<time class="journal-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
</p>