Commit fc5ae7fb authored by Erik Huelsmann's avatar Erik Huelsmann

Fix ordering of context variables, preferring header-specified values over framework defaults

parent 4e020a51
......@@ -33,11 +33,14 @@
collect line))
for header = (yaml:parse (format nil "~{~A~%~}" (header-lines page-lines)))
for content = (format nil "~{~A~%~}" (content-lines page-lines))
for context = (append page
(when header
;; order in the context is very important: for any key appearing twice
;; (e.g. the 'title' key), the first will be selected; by taking the header values
;; first, the default 'title' being the content filename, can be overridden in the page's metadata
for context = (append (when header
(loop for k being each hash-key of header
using (hash-value v)
collect (cons k v))))
collect (cons k v)))
page)
for dependencies = (cdr (assoc "depends-on" context :test #'string=))
for satisfies-deps-fn = (let ((deps dependencies))
(lambda ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment