template: add RSS link to head of each page
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
using the below would also add any other alternative formats. since we don't use any other alt formats, it will only output the link to RSS feed for each page. {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} ref: https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head
This commit is contained in:
parent
d23e961b70
commit
a6961ff0c3
|
@ -1,4 +1,7 @@
|
||||||
{{ define "head" }}
|
{{ define "head" }}
|
||||||
|
{{ range .AlternativeOutputFormats -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
{{ if .Site.Params.bgImg -}}
|
{{ if .Site.Params.bgImg -}}
|
||||||
<style>.bg-img {background-image: url('{{.Site.Params.bgImg}}');}</style>
|
<style>.bg-img {background-image: url('{{.Site.Params.bgImg}}');}</style>
|
||||||
{{- else if .Site.Params.images -}}
|
{{- else if .Site.Params.images -}}
|
||||||
|
|
Loading…
Reference in New Issue