fix: Autor auf Journal-Liste nicht verlinken (verschachtelte <a> zerstörten Layout)
Der ganze Journal-Eintrag ist bereits ein <a>; ein Autor-<a> darin = ungültiges nested-anchor → Browser bricht den Link auf, Einträge wurden höher. Autor dort wieder als <span>. Der Autor-Link bleibt auf der Artikelseite (single.html), wo es keinen umschließenden Link gibt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-7
@@ -15,9 +15,6 @@
|
|||||||
{{ $section := "" }}
|
{{ $section := "" }}
|
||||||
{{ with .Parent }}{{ $section = path.Base .RelPermalink }}{{ end }}
|
{{ with .Parent }}{{ $section = path.Base .RelPermalink }}{{ end }}
|
||||||
{{ $author := .Params.author | default site.Params.author.name }}
|
{{ $author := .Params.author | default site.Params.author.name }}
|
||||||
{{ $aslug := urlize $author }}
|
|
||||||
{{ if not .Params.author }}{{ with index site.Data.authors site.Params.author.email }}{{ with .slug }}{{ $aslug = . }}{{ end }}{{ end }}{{ end }}
|
|
||||||
{{ $authorPage := and (ne $aslug "") (site.GetPage (printf "/authors/%s" $aslug)) }}
|
|
||||||
{{ $cover := .Params.cover_image }}
|
{{ $cover := .Params.cover_image }}
|
||||||
{{/* Layout: explicit `layout:` in front matter, else derive:
|
{{/* Layout: explicit `layout:` in front matter, else derive:
|
||||||
- cover_image present → image
|
- cover_image present → image
|
||||||
@@ -45,10 +42,7 @@
|
|||||||
<p class="journal-summary">{{ . }}</p>
|
<p class="journal-summary">{{ . }}</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="journal-byline">
|
<p class="journal-byline">
|
||||||
{{- with $author -}}
|
{{- with $author -}}<span class="journal-author">{{ . }}</span>{{- end -}}
|
||||||
{{- if $authorPage -}}<a class="journal-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
|
|
||||||
{{- else -}}<span class="journal-author">{{ . }}</span>{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- if and $author .Date -}}, {{ end -}}
|
{{- if and $author .Date -}}, {{ end -}}
|
||||||
<time class="journal-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
|
<time class="journal-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user