Switch to non-strict commonmark

This commit is contained in:
Reynir Björnsson 2023-11-14 12:55:53 +01:00
parent 0550bb1227
commit a50fa0aceb
3 changed files with 9 additions and 7 deletions

View file

@ -26,16 +26,18 @@ depends: [
"yocaml"
"yocaml_unix"
"yocaml_yaml"
"yocaml_markdown"
#"yocaml_markdown"
"yocaml_git"
"yocaml_jingoo"
"yocaml_cmark"
]
pin-depends: [
["yocaml.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_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_git.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
["yocaml_cmark.dev" "git+https://github.com/xhtmlboi/yocaml.git"]
]

View file

@ -14,7 +14,7 @@
git-unix
yocaml
yocaml_yaml
yocaml_markdown
yocaml_cmark
yocaml_unix
yocaml_git
yocaml_jingoo))

View file

@ -1,6 +1,6 @@
open Yocaml
module Metaformat = Yocaml_yaml
module Markup = Yocaml_markdown
module Markup = Yocaml_cmark
module Template = Yocaml_jingoo
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) ->
M.merge ~title ~head_extra v, content)
>>^ apply_template_from_string
>>> Markup.content_to_html ()
>>> Markup.content_to_html ~strict:false ()
>>> Template.apply_as_template (module M) "templates/layout.html"
>>^ Stdlib.snd)
@ -62,7 +62,7 @@ let process_articles target =
process_files [ "posts" ] File.is_markdown (fun article_file ->
create_file (article_target article_file target)
(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/layout.html"
>>^ Stdlib.snd))
@ -87,7 +87,7 @@ let page page_file target =
create_file target
(watch Sys.argv.(0)
>>> 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"
>>^ Stdlib.snd)