create tag-index dir. fixes #1.

This commit is contained in:
chris 2014-02-16 23:20:14 +01:00
parent d33cd99c17
commit 6534d360c8
1 changed files with 4 additions and 1 deletions

View File

@ -130,9 +130,12 @@ def generate():
generate_feed(posts)
# generate tag pages
tagdir = os.path.join(config.outputdir, 'tags')
if not os.path.exists(tagdir):
os.makedirs(tagdir)
for tag in tags.values():
write_file(
os.path.join(config.outputdir, 'tags', '{}.html'.format(tag.name)),
os.path.join(tagdir, '{}.html'.format(tag.name)),
generate_index(tag.posts, pages)
)