moved omd rendering to relevant scope

This commit is contained in:
Stavros Polymenis 2016-10-15 21:38:26 +01:00
parent 45ba46bd31
commit 8a46b99e04

View File

@ -10,12 +10,12 @@ let logarion_head ?(style="/style.css") t =
let of_ymd ?text_tpl:(tpl=None) ymd =
let ymd_title = Ymd.(ymd.meta.title) in
let ymd_body = Omd.to_html (Omd.of_string Ymd.(ymd.body)) in
html (logarion_head ymd_title)
(body [
match tpl with
| Some s -> Unsafe.data Template.(of_string s |> fold_text ymd)
| None ->
let ymd_body = Omd.to_html (Omd.of_string Ymd.(ymd.body)) in
header [
h1 [Unsafe.data ymd_title];
details