Add feed links on all pages

This commit is contained in:
Jan-Lukas Else 2020-11-15 17:26:46 +01:00
parent 7c6102b9db
commit 68f972db2c
2 changed files with 7 additions and 8 deletions

View File

@ -8,6 +8,9 @@
{{ with user.Picture }}<link rel="shortcut icon" href="{{ . }}">{{ end }}
{{ with .Canonical }}<link rel="canonical" href="{{ . }}">{{ end }}
{{ template "title" . }}
<link rel="alternate" type="application/rss+xml" title="RSS ({{ .Blog.Title }})" href="{{ .Blog.Path }}.rss"/>
<link rel="alternate" type="application/atom+xml" title="Atom ({{ .Blog.Title }})" href="{{ .Blog.Path }}.atom"/>
<link rel="alternate" type="application/feed+json" title="JSON Feed ({{ .Blog.Title }})" href="{{ .Blog.Path }}.json"/>
<link rel="webmention" href="/webmention" />
<link rel="micropub" href="/micropub" />
<link rel="authorization_endpoint" href="/indieauth" />

View File

@ -1,12 +1,8 @@
{{ define "title" }}
{{ if .Data.Title }}
<title>{{ .Data.Title }} - {{ .Blog.Title }}</title>
{{ else }}
<title>{{ .Blog.Title }}</title>
{{ end }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ .Data.First }}.rss"/>
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ .Data.First }}.atom"/>
<link rel="alternate" type="application/feed+json" title="JSON Feed" href="{{ .Data.First }}.json"/>
<title>{{ with .Data.Title }}{{ . }} - {{ end }}{{ .Blog.Title }}</title>
<link rel="alternate" type="application/rss+xml" title="RSS{{ with .Data.Title }} ({{ . }}){{ end }}" href="{{ .Data.First }}.rss"/>
<link rel="alternate" type="application/atom+xml" title="Atom{{ with .Data.Title }} ({{ . }}){{ end }}" href="{{ .Data.First }}.atom"/>
<link rel="alternate" type="application/feed+json" title="JSON Feed{{ with .Data.Title }} ({{ . }}){{ end }}" href="{{ .Data.First }}.json"/>
{{ end }}
{{ define "main" }}