From 2028f4e2e999c2fa3155ddabc1942bb7ff20f02f Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 22 Mar 2019 21:06:42 +0000 Subject: Add atom feed generation --- generate.py | 1 + templates/blog.atom.xml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 templates/blog.atom.xml diff --git a/generate.py b/generate.py index 3c7f1f3..b18e1c2 100755 --- a/generate.py +++ b/generate.py @@ -134,6 +134,7 @@ def main(argv=['generate.py']): 'posts': posts, } output('blog.html', env.get_template('blog.html').render(page=page)) + output('blog.atom.xml', env.get_template('blog.atom.xml').render(page=page)) projects = glob(os.path.join(CONTENT, 'projects', '*')) projects = [p for p in projects if not os.path.split(p)[1].startswith('_')] diff --git a/templates/blog.atom.xml b/templates/blog.atom.xml new file mode 100644 index 0000000..c506670 --- /dev/null +++ b/templates/blog.atom.xml @@ -0,0 +1,21 @@ + + + https://the-tk.com/blog.html + the-tk.com - Blog + {{ page.posts[0].date|datefmt }}T00:00:00Z + + Tomasz Kramkowski + tk@the-tk.com + https://the-tk.com/ + + + + {% for post in page.posts %} + {{ post.title }} + + {{ site.baseurl }}/{{ post.location }} + {{ post.date|datefmt }}T00:00:00Z + {{ post.pre }} + + {% endfor %} + -- cgit v1.2.3-54-g00ecf