Render blog posts

This commit is contained in:
Anders Rune Jensen
2018-04-25 15:57:30 +02:00
parent 1eb1be440d
commit e525414d1f
2 changed files with 32 additions and 2 deletions
+14
View File
@@ -504,6 +504,20 @@ function render(opts, id, c) {
h('a',
{ href: base + 'channel/' + c.channel },
'#' + c.channel))
else if (c.type == "blog") {
//%RTXvyZ2fZWwTyWdlk0lYGk5sKw5Irj+Wk4QwxyOVG5g=.sha256
var channel = c.channel
? h('div.top-right',
h('a',
{ href: base + 'channel/' + c.channel },
'#' + c.channel))
: "";
var s = h('section');
s.innerHTML = marked(String(c.blogContent), opts.marked)
return [channel, h('h2', c.title), s];
}
else return renderDefault(c);
}