The blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
1.8 KiB

  1. {% from "macros.j2" import render_excerpt, render_post with context %}
  2. {% from "macros.j2" import fullurl with context %}
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <feed xmlns="http://www.w3.org/2005/Atom">
  5. <title>
  6. {% block title %}{{ resource.meta.title|default(feed_title) }}{% endblock %}
  7. </title>
  8. {% block self_url %}
  9. <link type="application/atom+xml" href="{{ fullurl(resource.url) }}" rel="self" />
  10. {% endblock %}
  11. {% block site_url %}
  12. <link rel="alternate" type="text/html" href="{{ fullur('/') }}"/>
  13. {% endblock %}
  14. {% block feed_extra %}
  15. {% endblock %}
  16. <updated>{{ time_now|xmldatetime }}</updated>
  17. <id>{{ fullurl(resource.url) }}</id>
  18. {% for res in resource.node.walk_resources_sorted_by_time() %}
  19. <entry>
  20. <title type="html">{{ res.meta.title|forceescape }}</title>
  21. <author><name>{{ res.meta.author }}</name></author>
  22. <link href="{{ content_url(res.url) }}"/>
  23. <updated>{{ res.meta.created|xmldatetime }}</updated>
  24. <published>{{ res.meta.created|xmldatetime }}</published>
  25. <id>{{ fullurl(res.url) }}</id>
  26. {% for tag in res.meta.tags %}
  27. <category scheme="{{ fullurl('search/label') }}"
  28. term="{{tag}}"
  29. label="{{ tag|title }}" />
  30. {% endfor %}
  31. <content type="html">
  32. {% refer to res.relative_path as article -%}
  33. {% filter forceescape -%}
  34. {% if resource.meta.excerpts_only -%}
  35. {{ article.image|markdown|typogrify }}
  36. {{ article.excerpt|markdown|typogrify }}
  37. {%- else %}
  38. {{ article.post|markdown|typogrify }}
  39. {%- endif %}
  40. {%- endfilter %}
  41. </content>
  42. </entry>
  43. {% endfor %}
  44. </feed>