Add atom feed
Because RSS is _soo_ 2017
This commit is contained in:
parent
e1a4b51ede
commit
ef86710c08
4 changed files with 51 additions and 3 deletions
10
config.yml
10
config.yml
|
@ -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"
|
||||
|
|
39
layouts/_default/list.atom
Normal file
39
layouts/_default/list.atom
Normal 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>
|
1
layouts/partials/copyright.html
Normal file
1
layouts/partials/copyright.html
Normal file
|
@ -0,0 +1 @@
|
|||
© {{ now.Year }} <a href='{{ absURL "" }}'>{{ .Site.Title }}</a>.
|
|
@ -2,9 +2,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p>
|
||||
© {{ now.Year }} <a href='{{ relURL "" }}'>{{ .Site.Title }}</a>.
|
||||
</p>
|
||||
<p>{{ partial "copyright.html" . }}</p>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
|
Loading…
Reference in a new issue