optional Title in md Head (#442)

Co-authored-by: RT Filefabrik <rt@filefabriik.com>
This commit is contained in:
Filefabrik 2024-09-14 15:28:30 +02:00 committed by GitHub
parent 086af4d173
commit d1c3c40a95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 16 deletions

View File

@ -5,7 +5,7 @@
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
<div class="content">
<h1>{{ .Title }}</h1>
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ .Content }}
</div>
<div class="hx-mt-16"></div>
@ -14,4 +14,4 @@
</main>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -5,7 +5,7 @@
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
<br class="hx-mt-1.5 hx-text-sm" />
<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>
{{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }}
<div class="hx-mb-16"></div>
<div class="content">
{{ .Content }}
@ -15,4 +15,4 @@
</main>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -3,10 +3,10 @@
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" false) }}
<article class="hx-w-full hx-break-words hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-pt-4 hx-pb-8 hx-pl-[max(env(safe-area-inset-left),1.5rem)] hx-pr-[max(env(safe-area-inset-left),1.5rem)]">
<br class="hx-mt-1.5 hx-text-sm" />
<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>
{{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }}
<div class="content">
{{ .Content }}
</div>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -5,7 +5,7 @@
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
<br class="hx-mt-1.5 hx-text-sm" />
<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>
{{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }}
<div class="content">{{ .Content }}</div>
{{- $pages := partial "utils/sort-pages" (dict "page" . "by" site.Params.blog.list.sortBy "order" site.Params.blog.list.sortOrder) -}}
{{- range $pages }}
@ -31,4 +31,4 @@
</article>
<div class="max-xl:hx-hidden hx-h-0 hx-w-64 hx-shrink-0"></div>
</div>
{{- end -}}
{{- end -}}

View File

@ -5,7 +5,7 @@
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
{{ partial "breadcrumb.html" . }}
<h1 class="hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>
{{ if .Title }}<h1 class="hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }}
<div class="hx-mt-4 hx-mb-16 hx-text-gray-500 hx-text-sm hx-flex hx-items-center hx-flex-wrap hx-gap-y-2">
{{- with $date := .Date }}<span class="hx-mr-1">{{ partial "utils/format-date" $date }}</span>{{ end -}}
{{- $lazyLoading := site.Params.enableImageLazyLoading | default true -}}
@ -45,4 +45,4 @@
</main>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -6,7 +6,7 @@
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
{{ partial "breadcrumb.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ .Content }}
</div>
{{ partial "components/last-updated.html" . }}
@ -15,4 +15,4 @@
</main>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -6,7 +6,7 @@
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
{{ partial "breadcrumb.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ .Content }}
</div>
{{ partial "components/last-updated.html" . }}
@ -15,4 +15,4 @@
</main>
</article>
</div>
{{ end }}
{{ end }}

View File

@ -4,11 +4,11 @@
{{ partial "toc.html" . }}
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12">
<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>
{{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }}
<div class="content">
{{ .Content }}
</div>
</main>
</article>
</div>
{{ end }}
{{ end }}