From 529946dc5bdccc2153c97e2040953047319480f4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 3 Oct 2017 17:28:29 +0200 Subject: Add tags listing --- src/actions.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/actions.js') diff --git a/src/actions.js b/src/actions.js index 61f4fd8..50b8079 100644 --- a/src/actions.js +++ b/src/actions.js @@ -50,6 +50,14 @@ function post(config, responder, posts) { }; } +function tags(config, responder, tags) { + return async function(ctx, next) { + responder(ctx, config, { + tags: tags.keys() + }); + }; +} + function tag(config, responder, items) { return async function(ctx, next) { const tag = ctx.params.name; @@ -77,6 +85,7 @@ module.exports = { posts, highlightTheme, post, + tags, tag, serveFiles }; -- cgit 1.4.1