summary refs log tree commit diff stats
path: root/src/actions.js
diff options
context:
space:
mode:
authorAlan Pearce2017-10-03 17:28:29 +0200
committerAlan Pearce2017-10-03 17:28:29 +0200
commit529946dc5bdccc2153c97e2040953047319480f4 (patch)
tree23ab43f182514da801e6a71a215a336773e2586f /src/actions.js
parentad56116d0df26b4a6fe7f9cd04a21965d3184af5 (diff)
downloadhomestead-529946dc5bdccc2153c97e2040953047319480f4.tar.lz
homestead-529946dc5bdccc2153c97e2040953047319480f4.tar.zst
homestead-529946dc5bdccc2153c97e2040953047319480f4.zip
Add tags listing
Diffstat (limited to 'src/actions.js')
-rw-r--r--src/actions.js9
1 files changed, 9 insertions, 0 deletions
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
 };