Commit bb4a7a72 authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

Build feed contents using templates

This fixes the issue where imported posts had no contents in the feeds.

There's some annoying repetition in here obviously, but we could fix
this by adjusting our fork of lektor-atom to take a `[default]` config
section into account. Currently the defaults are hard-coded in the
plugin.
parent 1641b00d
Pipeline #15400 passed with stages
in 6 minutes and 21 seconds
......@@ -3,6 +3,7 @@ name = Tor Project blog
url_path = /feed.xml
items = site.query('/blog')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[events]
name = Tor Project events
......@@ -10,63 +11,74 @@ source_path = /event
url_path = /events.xml
limit = 10
item_date_field = start_date
item_body = {{ this.body or this._html_body }}
[alsmith]
name = Posts by alsmith | Tor Project blog
url_path = /author/alsmith/feed.xml
items = site.query('/blog').filter(F.author == 'alsmith')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[anarcat]
name = Posts by anarcat | Tor Project blog
url_path = /author/anarcat/feed.xml
items = site.query('/blog').filter(F.author == 'anarcat')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[ggus]
name = Posts by ggus | Tor Project blog
url_path = /author/ggus/feed.xml
items = site.query('/blog').filter(F.author == 'ggus')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[isabela]
name = Posts by isabela | Tor Project blog
url_path = /author/isabela/feed.xml
items = site.query('/blog').filter(F.author == 'isabela')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[matthiasmark]
name = Posts by matthiasmark | Tor Project blog
url_path = /author/matthiasmark/feed.xml
items = site.query('/blog').filter(F.author == 'matthiasmark')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[micah]
name = Posts by micah | Tor Project blog
url_path = /author/micah/feed.xml
items = site.query('/blog').filter(F.author == 'micah')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[mingkui]
name = Posts by mingkui | Tor Project blog
url_path = /author/mingkui/feed.xml
items = site.query('/blog').filter(F.author == 'mingkui')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[nickm]
name = Posts by nickm | Tor Project blog
url_path = /author/nickm/feed.xml
items = site.query('/blog').filter(F.author == 'nickm')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[root]
name = Posts by root | Tor Project blog
url_path = /author/root/feed.xml
items = site.query('/blog').filter(F.author == 'root')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
[sysrqb]
name = Posts by sysrqb | Tor Project blog
url_path = /author/sysrqb/feed.xml
items = site.query('/blog').filter(F.author == 'sysrqb')
limit = 10
item_body = <p><img src="{{ url_to(this.image|default('/static/images/blog-image.png'), external=True) }}"><p>{{ this.body or this._html_body }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment