From a4d5e5baaa06245d03f1a0dccb6246287b94a7781d0a79af0a393b4197108fab Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sat, 3 Sep 2022 00:00:00 +0000 Subject: Give all pages an h1 heading based on their title --- layouts/_default/single.gmi | 1 + layouts/_default/single.html | 1 + 2 files changed, 2 insertions(+) (limited to 'layouts') diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 93501e0..c1d8bf2 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -2,6 +2,7 @@ => ./{{ replaceRE ".+?/" "../" .RelPermalink | safeURL }} 🔗 Return to homepage +# {{ .Name | safeHTML }} {{ $content := .RawContent }} {{- $content = $content | replaceRE `\n####{0,3}` "\n###" }} {{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` "\n=> $2 $1" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 83ed937..a9fc62b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,6 +3,7 @@

🔗 Return to homepage

+

{{ .Name }}

{{ .Content -}}
{{- end }} -- cgit v1.2.3