Skip to content
Browse files

added feed settings

  • Loading branch information...
1 parent 9ab9e4e commit 779456a3aab977c75d6c840bd9d1fcfd1e3a007e Eugen committed Sep 10, 2010
Showing with 10 additions and 9 deletions.
  1. +1 −4 TODO
  2. +4 −0 simblin/default_settings.py
  3. +5 −5 simblin/templates/atom.xml
View
5 TODO
@@ -1,8 +1,5 @@
-* feeds
- * pyRSS2Gen
- * feedburner?
-* make feed settings customizable (put in settings.py instead of directly into atom.xml)
* add rfc3339.py to used libraries in redme http://henry.precheur.org/projects/rfc3339
+ * add feed support to readme as features
* rename in setup.py to v0.4
* Refactor(pyflakes/epydoc)/Tests/Document/Readme/Changelog
View
4 simblin/default_settings.py
@@ -9,3 +9,7 @@
DEBUG = True
PORT = 5000
DISQUS_SHORTNAME = ''
+
+# For Feed
+AUTHOR = "Batman"
+BLOG_URL = "http://blog.batcave.net"
View
10 simblin/templates/atom.xml
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
- <name>Eugen Kiss</name>
+ <name>{{ config['AUTHOR'] }}</name>
</author>
<title>{{ config['BLOG_TITLE'] }}</title>
- <link href="http://blog.eugenkiss.com/atom" rel="self" />
- <link href="http://blog.eugenkiss.com/" />
+ <link href="{{ config ['BLOG_URL'] }}/atom" rel="self" />
+ <link href="{{ config ['BLOG_URL'] }}/" />
<id>http://blog.eugenkiss.com/</id>
<updated>{{ rfc3339(updated) }}</updated>
{% for post in posts %}
<entry>
- <id>http://blog.eugenkiss.com{{ url_for('main.show_post', slug=post.slug) }}</id>
+ <id>{{ config ['BLOG_URL'] }}{{ url_for('main.show_post', slug=post.slug) }}</id>
<updated>{{ rfc3339(post.datetime) }}</updated>
<title>{{ post.title }}</title>
- <link href="{{ url_for('main.show_post', slug=post.slug) }}"/>
+ <link href="{{ config ['BLOG_URL'] }}{{ url_for('main.show_post', slug=post.slug) }}"/>
<summary>{{ post.html|striptags|truncate }}</summary>
<content type="html">{{ post.html }}</content>
</entry>

0 comments on commit 779456a

Please sign in to comment.
Something went wrong with that request. Please try again.