Browse Source

fix and advertise blog RSS feeds

new-gallery
max.mehl 2 years ago
parent
commit
59606141f9
Signed by: mxmehl GPG Key ID: 2704E4AB371E2E92
  1. 2
      themes/hugo-sustain/layouts/_default/list.html
  2. 2
      themes/hugo-sustain/layouts/_default/rss.xml
  3. 3
      themes/hugo-sustain/layouts/partials/head.html

2
themes/hugo-sustain/layouts/_default/list.html

@ -52,7 +52,7 @@
{{ if $selection }}
<span class="article-rss"><a class="label label-rss" href="/{{ .Data.Plural }}/{{lower .Title}}/index.xml" title="RSS Feed"><i class="fa fa-rss" aria-hidden="true"></i> Subscribe to »{{.Title}}«</a></span>
{{ else }}
<span class="article-rss"><a class="label label-rss" href="/index.xml" title="RSS Feed"><i class="fa fa-rss" aria-hidden="true"></i> Subscribe to all posts</a></span>
<span class="article-rss"><a class="label label-rss" href="/blog/index.xml" title="RSS Feed"><i class="fa fa-rss" aria-hidden="true"></i> Subscribe to all posts</a></span>
{{ end }}
</div>
</div>

2
themes/hugo-sustain/layouts/_default/rss.xml

@ -1,7 +1,7 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ with .Title }} ({{.|humanize}}){{ end }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}

3
themes/hugo-sustain/layouts/partials/head.html

@ -8,6 +8,9 @@
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
{{ with .Site.Params.keywords }}<meta name="description" content="{{ . }}" />{{ end }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}img/favicon.ico" />
<link href="/blog/index.xml" rel="alternate" type="application/rss+xml" title="Max Mehl - blog feed">
<link href="/categories/english/index.xml" rel="alternate" type="application/rss+xml" title="Max Mehl - blog feed (EN)">
<link href="/categories/deutsch/index.xml" rel="alternate" type="application/rss+xml" title="Max Mehl - blog feed (DE)">
<title>
{{- if .IsHome -}}
{{- .Site.Title -}}

Loading…
Cancel
Save