From 18247a68cce5d841ead9cb9331e8c6f38437723f Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Wed, 19 Jun 2024 12:57:19 +0100 Subject: [PATCH] Add other alternates to link headers --- layouts/partials/head.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5d8da206..350c083f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,3 +1,5 @@ +{{- $title := $.Site.Title -}} +{{- if not .IsHome -}}{{ $title = printf "%s, %s" (partial "page-title.txt" .) $.Site.Title }}{{ end -}} @@ -12,7 +14,9 @@ - +{{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type (partial "noindex.gmi" .Permalink) (printf "%s (%s)" $title (partial "alternatename.txt" .Name)) | safeHTML }} +{{ end }} {{/* IndieWeb */}} {{ with getenv "HUGO_INDIEKIT_URL" }} @@ -61,17 +65,6 @@ {{ end }} - -{{ with .OutputFormats.Get "rss" -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} -{{ end -}} - - -{{ if .OutputFormats.Get "json" }} - -{{ end }} - {{- if templates.Exists "partials/extra-head.html" -}} {{ partial "extra-head.html" . }}