fix: .Site.Author deprecation
All checks were successful
Build Blog Docker Image / build docker (push) Successful in 1m16s

This commit is contained in:
d3vyce 2024-11-11 18:10:03 +01:00
parent 8ad53f40ff
commit 29a6bd78ff
2 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
<article class="flex flex-col items-center justify-center text-center">
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
{{ with .Site.Params.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
@ -12,13 +12,13 @@
class="mb-2 rounded-full h-36 w-36"
width="144"
height="144"
alt="{{ $.Site.Author.name | default "Author" }}"
alt="{{ $.Site.Params.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
{{ .Site.Params.Author.name | default .Site.Title }}
</h1>
<div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }}

View File

@ -1,7 +1,7 @@
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
<article class="flex flex-col items-center justify-center text-center">
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
{{ with .Site.Params.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
@ -11,15 +11,15 @@
class="mb-2 rounded-full h-36 w-36"
width="144"
height="144"
alt="{{ $.Site.Author.name | default "Author" }}"
alt="{{ $.Site.Params.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
{{ .Site.Params.Author.name | default .Site.Title }}
</h1>
{{ with .Site.Author.headline }}
{{ with .Site.Params.Author.headline }}
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
{{ . | markdownify | emojify }}
</h2>