Browse Source

Use subscript syntax in tag archive generation

Using dot caused jinja to fail if the tag contained
characters such as '-' or spaces.
main
Idan Kamara 13 years ago
parent
commit
ec7cb8adc2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      hyde/ext/plugins/tagger.py

+ 2
- 2
hyde/ext/plugins/tagger.py View File

@@ -198,7 +198,7 @@ extends: false


{%% set tag = site.tagger.tags['%(tag)s'] %%} {%% set tag = site.tagger.tags['%(tag)s'] %%}
{%% set source = site.content.node_from_relative_path('%(node)s') %%} {%% set source = site.content.node_from_relative_path('%(node)s') %%}
{%% set walker = source.walk_resources_tagged_with_%(tag)s %%}
{%% set walker = source['walk_resources_tagged_with_%(tag)s'] %%}
{%% extends "%(template)s" %%} {%% extends "%(template)s" %%}
""" """
for tagname, tag in self.site.tagger.tags.to_dict().iteritems(): for tagname, tag in self.site.tagger.tags.to_dict().iteritems():
@@ -212,4 +212,4 @@ extends: false
archive_file = File(target.child("%s.%s" % (tagname, extension))) archive_file = File(target.child("%s.%s" % (tagname, extension)))
archive_file.delete() archive_file.delete()
archive_file.write(text.strip()) archive_file.write(text.strip())
self.site.content.add_resource(archive_file)
self.site.content.add_resource(archive_file)

Loading…
Cancel
Save