BaySec website source
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.
 
 
 
 

50 line
1.7 KiB

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