Browse Source

Add an Atom feed.

master
Ben Kurtovic 8 years ago
parent
commit
2879adeb8f
2 changed files with 36 additions and 2 deletions
  1. +3
    -2
      _layouts/base.html
  2. +33
    -0
      atom.xml

+ 3
- 2
_layouts/base.html View File

@@ -7,7 +7,8 @@
<link rel="icon" type="image/png" href="/static/favicon.png" />
<link rel="stylesheet" href="/static/main.css" />
<link rel="stylesheet" href="/static/syntax.css" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" />
<link rel="alternate" type="application/atom+xml" href="/atom.xml" title="Atom Feed" />
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="/static/main.js"></script>
@@ -15,7 +16,7 @@
<body>
<div id="banner">
<a href="/">
<img src="/static/avatar.png" />
<img src="/static/avatar.png" title="Ben Kurtovic" alt="Earwig" />
<h1>Ben Kurtovic</h1>
</a>
</div>


+ 33
- 0
atom.xml View File

@@ -0,0 +1,33 @@
---
---
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ site.url }}</id>
<title>Ben Kurtovic</title>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<link href="{{ site.url }}/"/>
<link rel="self" type="application/atom+xml" href="/atom.xml"/>
<author>
<name>Ben Kurtovic</name>
<email>ben.kurtovic@gmail.com</email>
<uri>https://benkurtovic.com/</uri>
</author>
<icon>/static/favicon.png</icon>
<rights>© 2011–{{ site.time | date: "%Y" }} Ben Kurtovic</rights>
{% for post in site.posts %}
<entry>
<id>{{ site.url }}{{ post.id }}</id>
<title>{{ post.title | xml_escape }}</title>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<published>{{ post.date | date_to_xmlschema }}</published>
<link rel="alternate" type="text/html" href="{{ post.url }}"/>
<author>
<name>Ben Kurtovic</name>
<email>ben.kurtovic@gmail.com</email>
<uri>https://benkurtovic.com/</uri>
</author>
<summary>{{ post.description }}</summary>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
</feed>

Loading…
Cancel
Save