Fixed site to work with new HastySite.
h3rald h3rald@h3rald.com
Sat, 20 Mar 2021 10:02:52 +0100
3 files changed,
22 insertions(+),
22 deletions(-)
M
site/rules.min
→
site/rules.min
@@ -2,7 +2,7 @@ 'hastysite import
;Routing ( - (dict) expect -> =meta + (dict) expect -> :meta meta /id :id meta /ext :ext (@@ -19,56 +19,56 @@ ("$1/index" (id) => % %id)
) tap )) ) case -) :set-destination +) ^set-destination ;Processing operators ( - ('sym dict) expect -> :tpl =meta + ('sym dict) expect -> :tpl :meta "" :page "" :contents meta ( (input-fread @contents meta) (settings /title %site) (settings /version %version) - (=temp contents temp markdown @contents temp) + (:temp contents temp markdown @contents temp) (contents %contents) - (=temp tpl temp mustache @page temp) + (:temp tpl temp mustache @page temp) (page %contents) ) tap -) :process-md-with-template +) ^process-md-with-template ( - (dict) expect -> =meta + (dict) expect -> :meta meta /content-type :ct meta ct process-md-with-template -) :process-md-content +) ^process-md-content ( - (dict) expect -> =meta + (dict) expect -> :meta meta /ext :ext meta ( ((".md" ext ==) (process-md-content)) ) case -) :process-content +) ^process-content ( - (dict) expect -> =meta + (dict) expect -> :meta "" :contents meta ( (input-fread @contents meta) - (=temp contents preprocess-css @contents temp) + (:temp contents preprocess-css @contents temp) (contents %contents) ) tap output-fwrite -) :process-css-asset +) ^process-css-asset ;Main contents ( (dict) expect -> dup ( - ((/id "^_" match) ()) ;Ignore files starting with underscore. + ((/id "^_" match?) ()) ;Ignore files starting with underscore. ((true) (process-content set-destination output-fwrite)) ) case ) foreach@@ -77,7 +77,7 @@ assets (
(dict) expect -> dup ( - ((/ext ".css" match) (process-css-asset)) + ((/ext ".css" match?) (process-css-asset)) ((true) (output-cp)) ) case ) foreach
M
site/scripts/build.min
→
site/scripts/build.min
@@ -1,10 +1,10 @@
;Builds a site by processing contents and assets. 'hastysite import -"Preprocessing..." notice +"Preprocessing..." notice! preprocess -"Processing rules.." notice +"Processing rules.." notice! process-rules -"Postprocessing..." notice +"Postprocessing..." notice! postprocess -"All done." notice +"All done." notice!
M
site/scripts/clean.min
→
site/scripts/clean.min
@@ -1,8 +1,8 @@
;Deletes all temporary and output files. 'hastysite import -"Cleaning temporary folder..." notice +"Cleaning temporary folder..." noticea! clean-temp -"Cleaning output folder..." notice +"Cleaning output folder..." notice! clean-output -"All done." notice +"All done." notice!