fix and advertise blog RSS feeds

This commit is contained in:
2019-10-21 20:05:58 +02:00
parent e8581c3882
commit 59606141f9
3 changed files with 5 additions and 2 deletions

View File

@@ -52,7 +52,7 @@
{{ if $selection }} {{ 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> <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 }} {{ 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 }} {{ end }}
</div> </div>
</div> </div>

View File

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

View File

@@ -8,6 +8,9 @@
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }} {{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
{{ with .Site.Params.keywords }}<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 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> <title>
{{- if .IsHome -}} {{- if .IsHome -}}
{{- .Site.Title -}} {{- .Site.Title -}}