Commit 53fa46ef authored by Erik Huelsmann's avatar Erik Huelsmann

Make 'render-page' return the rendered page

In order for the pre-/post-processor 'around-like' methods to work,
they need access to the rendered page. Make sure they do by returning
the content of the rendered page from the inner-most 'method'
(=render-page).
parent 250594c5
......@@ -9,7 +9,6 @@ auto-save-list
output/
system-index.txt
content/newsbox.html
content/about.html
content/news.html
*.dx64fsl
*.fasl
......@@ -51,12 +51,14 @@
(with-open-file (output-stream output-path
:direction :output
:if-exists :supersede)
(render-template template-path
(append (acons :page-content (render-template* content)
(acons :rel-path (enough-namestring (cdr (assoc :content context)) *pages-dir*)
context))
*GLOBAL-CONTEXT*)
output-stream))))
(with-output-to-string (string-stream)
(let ((stream (make-broadcast-stream output-stream string-stream)))
(render-template template-path
(append (acons :page-content (render-template* content)
(acons :rel-path (enough-namestring (cdr (assoc :content context)) *pages-dir*)
context))
*GLOBAL-CONTEXT*)
stream))))))
(defun preprocess-md-page (content context next-processors)
(let* ((md-file (make-path *pages-dir* context t)))
......
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