Commit 9bcedd90 authored by Erik Huelsmann's avatar Erik Huelsmann

Make the source of the pages traceable by passing as argument

parent 6851aeb8
......@@ -4,12 +4,12 @@
(asdf:defsystem cl-site
:name "cl-site"
:version "0.0.1"
:maintainer "C. Yang"
:author "C. Yang"
:maintainer "Common-Lisp.Net maintainers"
:author "C. Yang & Common-Lisp.Net maintainers"
:licence "TBD"
:description "Static site generator for CLnet, written in CL"
:description "Static site generator for, written in CL"
:depends-on (:cl-mustache :plump :closer-mop)
:depends-on (:cl-mustache :plump :closer-mop :cl-yaml)
:components ((:module source
:pathname ""
......@@ -6,4 +6,4 @@
(format t "Generating site in ~A.~%" *output-dir*)
(process-pages *pages*)))
......@@ -51,12 +51,12 @@
(mustache:render template-path (append page-context *GLOBAL-CONTEXT*)
(defun process-pages ()
(defun process-pages (pages)
(format t "Processing pages..~%")
(let ((template-path (pathname (merge-pathnames *LAYOUT-DIR* *DEFAULT-PAGE-TEMPLATE*))))
(ensure-directories-exist *OUTPUT-DIR*)
(loop for page in *PAGES*
(loop for page in pages
(format t "Generating ~A~%" (cdr (assoc :content page)))
(render-page page template-path))
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