From f5b89fe1251fa4d51119a4830c4cb7d4ed835659 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Fri, 9 Nov 2018 19:37:56 +0000 Subject: [PATCH] Pre- and post-processing are part of rendering (no extra output) --- process.lisp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/process.lisp b/process.lisp index ce9f1e7..e94919b 100644 --- a/process.lisp +++ b/process.lisp @@ -51,21 +51,16 @@ (let* ((md-file (enough-namestring (make-path *pages-dir* context t) *pages-dir*))) (unless (string= (pathname-type md-file) "md") (return-from preprocess-md-page (call-next-hook content context))) - (let ((html-file (make-pathname :defaults md-file :type "html"))) - (format t "Transforming ~A to ~A~%" md-file html-file) - (let ((md-content (with-output-to-string - (out) - (cl-markdown:markdown content :stream out)))) - (call-next-hook md-content context))))) + (let ((md-content (with-output-to-string + (out) + (cl-markdown:markdown content :stream out)))) + (call-next-hook md-content context)))) (def-render-hook preprocess-lisp-page (content context) (let* ((lisp-file (make-path *pages-dir* context t))) (unless (string= (pathname-type lisp-file) "lisp") (return-from preprocess-lisp-page (call-next-hook content context))) - (let ((html-file (enough-namestring (make-pathname :defaults lisp-file :type "html") *pages-dir*)) - *computed-page-content*) - (format t "Loading ~a and creating fresh ~a...~%" - (file-namestring lisp-file) html-file) + (let (*computed-page-content*) ;;;###TODO not happy about loading the lisp file; it defeats the preprocessor/postprocessor purpose (load (merge-pathnames lisp-file *pages-dir*)) (let ((headers (getf *computed-page-content* :headers))) -- GitLab