Fix some things, urlencode post names
the jinja2 function urlencode is apparently not implemented :(
This commit is contained in:
parent
86987925f3
commit
c0854750d3
|
@ -1,7 +1,10 @@
|
|||
open Yocaml
|
||||
|
||||
let is_css = with_extension "css"
|
||||
let is_javascript = with_extension "js"
|
||||
let is_javascript =
|
||||
let open Preface.Predicate in
|
||||
with_extension "js" ||
|
||||
with_extension "map"
|
||||
|
||||
let is_image =
|
||||
let open Preface.Predicate in
|
||||
|
|
|
@ -45,7 +45,7 @@ module Article = struct
|
|||
make
|
||||
<$> V.(required_assoc string) "title" assoc
|
||||
<*> V.(required_assoc (Metadata.Date.from (module V))) "date" assoc
|
||||
<*> V.(required_assoc (Author.from (module V))) "author" assoc)
|
||||
<*> V.(optional_assoc_or (Author.from (module V))) "author" assoc ~default:Author.default_author)
|
||||
obj
|
||||
|
||||
let from_string (module V : Metadata.VALIDABLE) = function
|
||||
|
|
|
@ -28,7 +28,7 @@ let move_images target =
|
|||
let move_js target =
|
||||
process_files
|
||||
[ "js" ]
|
||||
(fun f -> File.is_javascript f || with_extension "map" f)
|
||||
File.is_javascript
|
||||
(Build.copy_file ~into:(js_target target))
|
||||
|
||||
let move_audio target =
|
||||
|
@ -71,7 +71,7 @@ let process_articles target =
|
|||
let articles =
|
||||
let open Build in
|
||||
collection
|
||||
(read_child_files "posts" (with_extension "md"))
|
||||
(read_child_files "posts" File.is_markdown)
|
||||
(fun path ->
|
||||
Metaformat.read_file_with_metadata (module Model.Article) path
|
||||
>>^ fun (meta, _data) ->
|
||||
|
|
Loading…
Reference in a new issue