diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-13 11:35:28 +0100 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-02-22 15:04:52 -0600 |
commit | 251db013fda4a61dae7d8a8ef6f53d48f1a54f89 (patch) | |
tree | 8b7105865ebf3e959098d17a27f0d349973b297e | |
parent | b624ca0f8befe7315c9079402b1f598e3f07dd21 (diff) | |
download | mediagoblin-251db013fda4a61dae7d8a8ef6f53d48f1a54f89.tar.lz mediagoblin-251db013fda4a61dae7d8a8ef6f53d48f1a54f89.tar.xz mediagoblin-251db013fda4a61dae7d8a8ef6f53d48f1a54f89.zip |
Integrate all atom feed in template
Embed the atom feed link in the root template (most recent media
page) for easier discovery. Delete the (listings/all.html) template
as contributed in commit 195e79098b5 as it was unused and the feed
is essentially showing the most recent media anyway.
-rw-r--r-- | mediagoblin/templates/mediagoblin/root.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 5c6eb52f..529d89ef 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -19,6 +19,13 @@ {% from "mediagoblin/utils/object_gallery.html" import object_gallery %} +{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %} + +{% block mediagoblin_head -%} + {% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') -%} + <link rel="alternate" type="application/atom+xml" href="{{ feed_url }}"> +{%- endblock mediagoblin_head %} + {% block mediagoblin_content %} {% if request.user %} <h1>{% trans %}Explore{% endtrans %}</h1> @@ -39,4 +46,8 @@ {% endif %} <h2>{% trans %}Most recent media{% endtrans %}</h2> {{ object_gallery(request, media_entries, pagination) }} + + {#- Need to set feed_url within this block so template can use it. -#} + {%- set feed_url = feed_url -%} + {%- include "mediagoblin/utils/feed_link.html" -%} {% endblock %} |