date parsing
This commit is contained in:
parent
6b65794087
commit
e6b1b304ab
2
src/dune
2
src/dune
|
@ -1,3 +1,3 @@
|
||||||
(executable
|
(executable
|
||||||
(name webcc)
|
(name webcc)
|
||||||
(libraries omd))
|
(libraries omd ISO8601))
|
||||||
|
|
|
@ -77,10 +77,11 @@ let process ic oc =
|
||||||
| None -> "-"
|
| None -> "-"
|
||||||
in
|
in
|
||||||
let md = Omd.of_channel ic in
|
let md = Omd.of_channel ic in
|
||||||
|
let date = ISO8601.Permissive.date (lookup_metadata "date") in
|
||||||
let html = format_post
|
let html = format_post
|
||||||
~title:(lookup_metadata "title")
|
~title:(lookup_metadata "title")
|
||||||
~tags:(lookup_metadata "tags")
|
~tags:(lookup_metadata "tags")
|
||||||
~date:(lookup_metadata "date")
|
~date:(ISO8601.Permissive.string_of_date date)
|
||||||
~contents:(Omd.to_html md)
|
~contents:(Omd.to_html md)
|
||||||
in
|
in
|
||||||
output_string oc html
|
output_string oc html
|
||||||
|
|
Loading…
Reference in New Issue