Switch to non-strict commonmark
This commit is contained in:
parent
0550bb1227
commit
a50fa0aceb
|
@ -26,16 +26,18 @@ depends: [
|
||||||
"yocaml"
|
"yocaml"
|
||||||
"yocaml_unix"
|
"yocaml_unix"
|
||||||
"yocaml_yaml"
|
"yocaml_yaml"
|
||||||
"yocaml_markdown"
|
#"yocaml_markdown"
|
||||||
"yocaml_git"
|
"yocaml_git"
|
||||||
"yocaml_jingoo"
|
"yocaml_jingoo"
|
||||||
|
"yocaml_cmark"
|
||||||
]
|
]
|
||||||
|
|
||||||
pin-depends: [
|
pin-depends: [
|
||||||
["yocaml.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
["yocaml.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
["yocaml_unix.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
["yocaml_unix.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
["yocaml_yaml.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
["yocaml_yaml.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
["yocaml_markdown.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
#["yocaml_markdown.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
["yocaml_jingoo.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
["yocaml_jingoo.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
["yocaml_git.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
["yocaml_git.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
|
["yocaml_cmark.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
|
||||||
]
|
]
|
||||||
|
|
2
src/dune
2
src/dune
|
@ -14,7 +14,7 @@
|
||||||
git-unix
|
git-unix
|
||||||
yocaml
|
yocaml
|
||||||
yocaml_yaml
|
yocaml_yaml
|
||||||
yocaml_markdown
|
yocaml_cmark
|
||||||
yocaml_unix
|
yocaml_unix
|
||||||
yocaml_git
|
yocaml_git
|
||||||
yocaml_jingoo))
|
yocaml_jingoo))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
open Yocaml
|
open Yocaml
|
||||||
module Metaformat = Yocaml_yaml
|
module Metaformat = Yocaml_yaml
|
||||||
module Markup = Yocaml_markdown
|
module Markup = Yocaml_cmark
|
||||||
module Template = Yocaml_jingoo
|
module Template = Yocaml_jingoo
|
||||||
|
|
||||||
let css_target target = "css" |> into target
|
let css_target target = "css" |> into target
|
||||||
|
@ -53,7 +53,7 @@ let with_layout (type a) (module M : Metadata.INJECTABLE with type t = a)
|
||||||
>>^ (fun (({ Model.Page.title; head_extra }, content), v) ->
|
>>^ (fun (({ Model.Page.title; head_extra }, content), v) ->
|
||||||
M.merge ~title ~head_extra v, content)
|
M.merge ~title ~head_extra v, content)
|
||||||
>>^ apply_template_from_string
|
>>^ apply_template_from_string
|
||||||
>>> Markup.content_to_html ()
|
>>> Markup.content_to_html ~strict:false ()
|
||||||
>>> Template.apply_as_template (module M) "templates/layout.html"
|
>>> Template.apply_as_template (module M) "templates/layout.html"
|
||||||
>>^ Stdlib.snd)
|
>>^ Stdlib.snd)
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ let process_articles target =
|
||||||
process_files [ "posts" ] File.is_markdown (fun article_file ->
|
process_files [ "posts" ] File.is_markdown (fun article_file ->
|
||||||
create_file (article_target article_file target)
|
create_file (article_target article_file target)
|
||||||
(Metaformat.read_file_with_metadata (module Model.Article) article_file
|
(Metaformat.read_file_with_metadata (module Model.Article) article_file
|
||||||
>>> Markup.content_to_html ()
|
>>> Markup.content_to_html ~strict:false ()
|
||||||
>>> Template.apply_as_template (module Model.Article) "templates/article.html"
|
>>> Template.apply_as_template (module Model.Article) "templates/article.html"
|
||||||
>>> Template.apply_as_template (module Model.Article) "templates/layout.html"
|
>>> Template.apply_as_template (module Model.Article) "templates/layout.html"
|
||||||
>>^ Stdlib.snd))
|
>>^ Stdlib.snd))
|
||||||
|
@ -87,7 +87,7 @@ let page page_file target =
|
||||||
create_file target
|
create_file target
|
||||||
(watch Sys.argv.(0)
|
(watch Sys.argv.(0)
|
||||||
>>> Metaformat.read_file_with_metadata (module Model.Page) page_file
|
>>> Metaformat.read_file_with_metadata (module Model.Page) page_file
|
||||||
>>> Markup.content_to_html ()
|
>>> Markup.content_to_html ~strict:false ()
|
||||||
>>> Template.apply_as_template (module Model.Page) "templates/layout.html"
|
>>> Template.apply_as_template (module Model.Page) "templates/layout.html"
|
||||||
>>^ Stdlib.snd)
|
>>^ Stdlib.snd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue