Added a blog feed
This commit is contained in:
parent
4dfbe0a50a
commit
95606bbd44
3 changed files with 24 additions and 0 deletions
|
@ -5,6 +5,7 @@ url_style = absolute
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
lektor-markdown-highlighter = 0.1
|
lektor-markdown-highlighter = 0.1
|
||||||
|
lektor-atom = 0.2
|
||||||
|
|
||||||
[servers.production]
|
[servers.production]
|
||||||
target = rsync://fmartingrcom@static-1.scaleway.fra1.ops.fmartingr.com/var/www/fmartingr.com/html
|
target = rsync://fmartingrcom@static-1.scaleway.fra1.ops.fmartingr.com/var/www/fmartingr.com/html
|
||||||
|
|
7
configs/atom.ini
Normal file
7
configs/atom.ini
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[blog]
|
||||||
|
name = Felipe Martin's Blog
|
||||||
|
source_path = /
|
||||||
|
url_path = /feed.xml
|
||||||
|
items = site.query('/blog')
|
||||||
|
item_model = blog-post
|
||||||
|
limit = 25
|
16
templates/blog/rss.html
Normal file
16
templates/blog/rss.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<rss version="2.0">
|
||||||
|
<channel>
|
||||||
|
<title>{{ config.rss_blog_title }}</title>
|
||||||
|
<description>{{ config.rss_blog_description }}</description>
|
||||||
|
<link>{{ config.base_url }}</link>
|
||||||
|
{% for item in items %}
|
||||||
|
<item>
|
||||||
|
<title><![CDATA[{{ item.title }}]]></title>
|
||||||
|
<description><![CDATA[{{ item.content|safe }}]]></description>
|
||||||
|
<link>{{ config.base_url }}{{ item.get_absolute_url() }}</link>
|
||||||
|
<pubDate>{{ item.date|dt('%a, %d %b %Y %H:%M:%S %z') }}</pubDate>
|
||||||
|
</item>
|
||||||
|
{% endfor %}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue