summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-02 00:21:40 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-02 00:21:40 +0200
commited7bea6694f23c740b63a9fc779f8c92b8a9720d (patch)
treeffb3dc1952d02330b54cc58d08bf77e02fb14026 /layouts
parentbc6526e7b332138502daeeaefa1a835d6ab44b8a (diff)
downloadgohugo-theme-ed-ed7bea6694f23c740b63a9fc779f8c92b8a9720d.tar.gz
Rework rss support
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/custom-head.html5
-rw-r--r--layouts/partials/head.html18
2 files changed, 15 insertions, 8 deletions
diff --git a/layouts/partials/custom-head.html b/layouts/partials/custom-head.html
new file mode 100644
index 0000000..5883332
--- /dev/null
+++ b/layouts/partials/custom-head.html
@@ -0,0 +1,5 @@
+{{- /* Head custom content area start */ -}}
+{{- /* A partial to be overwritten by the user. */ -}}
+{{- /* Simply place a custom-head.html into your local /layouts/partials-directory. */ -}}
+{{- /* Its content will appear before the closing </head>. */ -}}
+{{- /* Head custom content area end */ -}}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index f2ef3ba..34a9a08 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -16,18 +16,20 @@
<meta name="author" content="{{ (partial "author.html" . ) }}">
{{ hugo.Generator }}
- {{- /* Misc */}}
- {{ template "partials/templates/doublinecore.html" . }}
- {{ template "partials/templates/opengraph.html" . }}
-
{{ partial "styles.html" . -}}
{{ partial "scripts.html" . -}}
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="{{ "apple-touch-icon-precomposed.png" | relURL }}">
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}">
- <!-- RSS -->
- {{- with .OutputFormats.Get "rss" }}
- {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
- {{- end }}
+ {{- /* RSS */}}
+ {{ range .AlternativeOutputFormats -}}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" title="{{ $.Site.Title }}" href="{{ .Permalink | safeURL }}">
+ {{ end -}}
+
+ {{- partial "custom-head.html" . -}}
+
+ {{- /* Misc */}}
+ {{ template "partials/templates/doublinecore.html" . }}
+ {{ template "partials/templates/opengraph.html" . }}
</head>