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 common-lisp.net, written in CL"
:depends-on (:cl-mustache :plump :markdown.cl :closer-mop)
:depends-on (:cl-mustache :plump :markdown.cl :closer-mop :cl-yaml)
:components ((:module source
:pathname ""
......
......@@ -6,4 +6,4 @@
(format t "Generating site in ~A.~%" *output-dir*)
(process-static)
(process-styles)
(process-pages)))
(process-pages *pages*)))
......@@ -51,12 +51,12 @@
(mustache:render template-path (append page-context *GLOBAL-CONTEXT*)
output-stream)))))
(defun process-pages ()
(defun process-pages (pages)
(format t "Processing pages..~%")
(generate-news)
(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
do
(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