From 4ce0f287b64d2d55c9bdd31dee418ba405762273 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 18 Jun 2017 21:57:15 +0200 Subject: rename 'tag' view to 'term' --- src/index.js | 3 ++- src/views/tag.njk | 3 --- src/views/term.njk | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/views/tag.njk create mode 100644 src/views/term.njk (limited to 'src') diff --git a/src/index.js b/src/index.js index 52bdff0..ae277d6 100644 --- a/src/index.js +++ b/src/index.js @@ -46,7 +46,8 @@ for (let [term, items] of taxonomies) { 404, `Could not find ${term} ${value}` ) - await ctx.render('tag', { + await ctx.render('term', { + term: term, [term]: value, posts: items.get(ctx.params.value) }) diff --git a/src/views/tag.njk b/src/views/tag.njk deleted file mode 100644 index 7ff9871..0000000 --- a/src/views/tag.njk +++ /dev/null @@ -1,3 +0,0 @@ -{% for post in posts %} - {{ post.data.get('title') }} -{% endfor %} diff --git a/src/views/term.njk b/src/views/term.njk new file mode 100644 index 0000000..7ff9871 --- /dev/null +++ b/src/views/term.njk @@ -0,0 +1,3 @@ +{% for post in posts %} + {{ post.data.get('title') }} +{% endfor %} -- cgit 1.4.1