0
0
zero-blog/templates/posts/index.html.slim
Gibheer d8fe8a97bc compile markdown for each request
The problem here is, that the markdown code can't be compiled and
therefore does not get executed when the page is rendered. So this
change directly calls Kramdown to compile the code.
It should be replaced later by a mechanism which compiles the markdown
when the post is loaded.
2013-10-26 23:01:22 +02:00

20 lines
497 B
Plaintext

doctype 5
html
head
title zero-knowledge
body
header
h1 zero-knowledge
h2 noch ohne blub
#content
- for post in fetch(:posts)
article
header
h1
a href="/post/#{post[:post_id]}"= post[:title]
footer
.author=post[:username]
.date= post[:written].strftime('%Y-%m-%d')
.time= post[:written].strftime('%H-%M')
section==Kramdown::Document.new(post[:content]).to_html