1
Fork 0

Add atom feed

Because RSS is _soo_ 2017
This commit is contained in:
Jake Howard 2018-05-10 13:49:32 +01:00
parent e1a4b51ede
commit ef86710c08
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 51 additions and 3 deletions

View file

@ -11,19 +11,29 @@ params:
summaryLength: 40
mediaTypes:
"application/atom":
suffix: atom
outputFormats:
markdown:
name: "txt"
mediaType: "text/plain"
isPlainText: true
atom:
name: "atom"
mediaType: "application/atom"
isPlainText: false
outputs:
home:
- "html"
- "rss"
- "atom"
- "json"
section:
- "html"
- "rss"
- "atom"
- "txt"
page:
- "html"

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<subtitle>A subtitle.</subtitle>
<link href="{{ .Permalink }}" rel="self" />
<link href="{{ absURL "/" }}" />
<id>{{ .Permalink }}</id>
<updated>{{ now.Format .Site.Params.iso8601 }}</updated>
<icon>{{ absURL "/img/logo-transparent.png" }}</icon>
<logo>{{ absURL "/img/logo-transparent.png" }}</icon>
<author>
<name>{{ .Site.Params.author }}</name>
<uri>{{ absURL "/" }}</uri>
</author>
<rights type="html">
{{ partial "copyright.html" . | html }}
</rights>
{{ range .Data.Pages }}
<entry>
<title>{{ .Title }}</title>
<link href="{{ .Permalink }}" />
<id>{{ .Permalink }}</id>
<updated>{{ .Date.Format .Site.Params.iso8601 }}</updated>
<published>{{ .Date.Format .Site.Params.iso8601 }}</published>
<rights type="html">
{{ partial "copyright.html" . | html }}
</rights>
<summary>{{ .Summary }}</summary>
<content type="html">
{{ .Content | html }}
</content>
<author>
<name>{{ .Site.Params.author }}</name>
<uri>{{ absURL "/" }}</uri>
</author>
</entry>
{{ end }}
</feed>

View file

@ -0,0 +1 @@
&copy; {{ now.Year }} <a href='{{ absURL "" }}'>{{ .Site.Title }}</a>.

View file

@ -2,9 +2,7 @@
<div class="container">
<div class="row">
<div class="col-sm-6">
<p>
&copy; {{ now.Year }} <a href='{{ relURL "" }}'>{{ .Site.Title }}</a>.
</p>
<p>{{ partial "copyright.html" . }}</p>
<p></p>
</div>
<div class="col-sm-6">