From 0678bc098e50694f1a782d68ab9d5e1d761fc28e Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 15 Apr 2021 00:59:27 -0700 Subject: [PATCH] fix tagger docs, if extension is blank/None, don't add an extension --- hyde/ext/plugins/meta.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hyde/ext/plugins/meta.py b/hyde/ext/plugins/meta.py index 6154735..ce7b6c7 100644 --- a/hyde/ext/plugins/meta.py +++ b/hyde/ext/plugins/meta.py @@ -295,7 +295,7 @@ class TaggerPlugin(Plugin): template: tagged_posts.j2 source: blog target: blog/tags - archive_extension: html + extension: html """ def __init__(self, site): @@ -423,7 +423,11 @@ extends: false "meta": meta_text } text = archive_text % tag_data - archive_file = File(target.child("%s.%s" % (tagname, extension))) + if extension: + fname = "%s.%s" % (tagname, extension) + else: + fname = tagname + archive_file = File(target.child(fname)) archive_file.delete() archive_file.write(text.strip()) self.site.content.add_resource(archive_file)