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