Commit 591f0c66 authored by Erik Huelsmann's avatar Erik Huelsmann

Merge branch 'clean-unused-code' into 'master'

Clean unused code

See merge request !42
parents 6851aeb8 90ed9d67
Pipeline #473 passed with stage
in 3 seconds
......@@ -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 ""
......
......@@ -19,14 +19,6 @@
(list "layout_2018.css")
"A list of strings representing relative filenames.")
;; JS files - separate from static files, because they are processed differently
;; within the template.
(defparameter *SCRIPTS-DIR* (asdf:system-relative-pathname :cl-site "layout/js/")
"Pathname for location and list of scripts.")
(defparameter *SCRIPTS*
(list "scripts.js")
"A list of strings representing relative filenames.")
;; General static files - images etc
(defparameter *STATIC-DIR* (asdf:system-relative-pathname :cl-site "content/static/")
"Pathname for location of static files.")
......
......@@ -6,4 +6,4 @@
(format t "Generating site in ~A.~%" *output-dir*)
(process-static)
(process-styles)
(process-pages)))
(process-pages *pages*)))
......@@ -12,9 +12,6 @@
*STYLES*)))
(push (cons :styles styles-list) *GLOBAL-CONTEXT*)))
;; Copies/renders script files + adds to global context
(defun process-scripts () nil)
;; Copies/renders static assets (imgs, etc)
(defun process-static ()
(let ((destination-root (merge-pathnames #P"static/" *output-dir*))
......@@ -51,12 +48,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