Commit a8901f1e authored by Cheshire Yang's avatar Cheshire Yang
Browse files

Automatically detect and process all content pages

parent 7aad718f
......@@ -4,31 +4,46 @@
(defparameter *LAYOUT-DIR* (asdf:system-relative-pathname :cl-site "layout/templates/")
"Pathname for location of template files.")
(defparameter *OUTPUT-DIR* (asdf:system-relative-pathname :cl-site "output/")
"Pathname where the generated output should be written to.")
;; @TO-DO: store layout name as global, generate js/css pathnames from it.
;; (More template-related variables may go here in the future)
(defparameter *DEFAULT-PAGE-TEMPLATE* "primary.html"
(defparameter *DEFAULT-PAGE-TEMPLATE* "layout_2018.html"
"Default template to use unless another is explicitly specified.")
;; @TO-DO: replace this with better css preprocessing.
(defparameter *STYLES-DIR* (asdf:system-relative-pathname :cl-site "layout/css/")
"Pathname for location and list of styles.")
(defparameter *STYLES*
(list "main.css")
(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 "layout/static/")
"Pathname for location of static files.")
;; The only REQUIRED field is :content which must be the filename of the page content
;; The :content field will NOT be sent to the template.
;; @TO-DO: store fields within content files and parse them out.
(defparameter *PAGES-DIR* (asdf:system-relative-pathname :cl-site "content/")
"Pathname for location of page content.")
(defparameter *PRIVATE-KEYS* '(:slug :content))
(defparameter *PAGES*
'((:title . "Test Page") (:slug . "test-page") (:content . "testpage.html")))
(mapcar (lambda (p) (list (cons :content (file-namestring p))))
(directory (make-pathname :defaults *PAGES-DIR*
:name :wild
:type "html")))
"Each page is an alist containing info to be sent to the template via the context.")
;; Initialize global context (will be appended to all individual page contexts)
;; Used to store things like stylesheets, etc...
(defparameter *GLOBAL-CONTEXT* ())
(defparameter *GLOBAL-CONTEXT* ())
\ No newline at end of file
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