all repos — archive/homestead @ 33171a749162685e42650f82041cd2af0136718d

My future indieweb platform

feat(posts): render posts as markdown

Alan Pearce
commit

33171a749162685e42650f82041cd2af0136718d

parent

1a36d4dc311a86246fe854da888af01f8195368e

1 file changed, 3 insertions(+), 1 deletion(-)

changed files
M src/index.jssrc/index.js
@@ -24,8 +24,10 @@ })
router.get('/post/:filename', async function (ctx) { ctx.assert(posts.has(ctx.params.filename), 404, 'Post not found') + const post = posts.get(ctx.params.filename) + post.body = Posts.render(post) await ctx.render('post', { - post: posts.get(ctx.params.filename) + post: post }) })