all repos — archive/homestead @ 7bf25f232569aa62edf1c88e7014a9f3c1b37014

My future indieweb platform

feat: Create feed handler for root

Alan Pearce
commit

7bf25f232569aa62edf1c88e7014a9f3c1b37014

parent

a62fb1e7584ffa53a256ff8ce4d6a451ca542f20

1 file changed, 13 insertions(+), 0 deletions(-)

changed files
M src/app.jssrc/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(