Skip to content

Commit

Permalink
optional Title in md Head (#442)
Browse files Browse the repository at this point in the history
Co-authored-by: RT Filefabrik <rt@filefabriik.com>
  • Loading branch information
Filefabrik and RT Filefabrik authored Sep 14, 2024
1 parent 086af4d commit d1c3c40
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -14,4 +14,4 @@ <h1>{{ .Title }}</h1>
</main>
</article>
</div>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -15,4 +15,4 @@ <h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-
</main>
</article>
</div>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/_default/wide.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -31,4 +31,4 @@ <h3><a style="color: inherit; text-decoration: none;" class="hx-block hx-font-se
</article>
<div class="max-xl:hx-hidden hx-h-0 hx-w-64 hx-shrink-0"></div>
</div>
{{- end -}}
{{- end -}}
4 changes: 2 additions & 2 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down Expand Up @@ -45,4 +45,4 @@ <h1 class="hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900
</main>
</article>
</div>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand All @@ -15,4 +15,4 @@ <h1>{{ .Title }}</h1>
</main>
</article>
</div>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/docs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand All @@ -15,4 +15,4 @@ <h1>{{ .Title }}</h1>
</main>
</article>
</div>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit d1c3c40

Please sign in to comment.