Add other alternates to link headers

This commit is contained in:
JP Hastings-Spital 2024-06-19 12:57:19 +01:00
parent 8a0d47d985
commit 18247a68cc

View file

@ -1,3 +1,5 @@
{{- $title := $.Site.Title -}}
{{- if not .IsHome -}}{{ $title = printf "%s, %s" (partial "page-title.txt" .) $.Site.Title }}{{ end -}}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
@ -12,7 +14,9 @@
<link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{ .Site.Title }}"/>
<link rel="search" type="application/pagefind" href="/search" title="{{ .Site.Title }}"/>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type (partial "noindex.gmi" .Permalink) (printf "%s (%s)" $title (partial "alternatename.txt" .Name)) | safeHTML }}
{{ end }}
{{/* IndieWeb */}}
<link rel="webmention" href="https://webmention.io/www.byjp.me/webmention">
{{ with getenv "HUGO_INDIEKIT_URL" }}
@ -61,17 +65,6 @@
<meta property="article:published_time" content="{{ time .Date }}" />
{{ end }}
<!-- RSS -->
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- JSON Feed -->
{{ if .OutputFormats.Get "json" }}
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate"
type="application/json" title="{{ .Site.Title }}" />
{{ end }}
<!-- Custom head tags -->
{{- if templates.Exists "partials/extra-head.html" -}}
{{ partial "extra-head.html" . }}