feat: Create feed handler for root
1 file changed, 13 insertions(+), 0 deletions(-)
changed files
M src/app.js → src/app.js
@@ -13,6 +13,13 @@ const Router = require("koa-router"); const router = new Router(); +const makeTagURI = (authority, startDate) => specific => + `tag:${authority},${startDate}:${specific}`; + +app.context.makeTagURI = makeTagURI( + config.feed.originalDomainName, + config.feed.domainStartDate +); app.context.getURL = router.url.bind(router); module.exports = async function() {@@ -32,6 +39,12 @@ router.get( "highlight-theme", "/css/code.css", actions.highlightTheme(config) + ); + + router.get( + "feed", + "/index.xml", + actions.posts(config, responders.feed, Posts.posts) ); router.get(