Commit 7aad718f authored by Cherie Yang's avatar Cherie Yang

Merge branch 'evenson-20170425a' into 'master'

Evenson 20170425a

See merge request !2
parents 8171819d 5a7ed0f3
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(in-package :cl-user)
(defpackage #:cl-site
(:use :cl :asdf))
(in-package :cl-site)
(defsystem "cl-site"
(asdf:defsystem cl-site
:name "cl-site"
:version "0.0.1"
:maintainer "C. Yang"
......@@ -12,11 +9,28 @@
:licence "TBD"
:description "Static site generator for CLnet, written in CL"
:depends-on (:asdf :cl-mustache)
:depends-on (:cl-mustache)
:components ((:module source
:pathname ""
:serial t
:depends-on (package)
:components ((:file "globals")
(:file "helpers")
(:file "process")
(:file "main")))
(:module package
:pathname ""
:components ((:file "package"))))
:in-order-to ((asdf:test-op (asdf:test-op cl-site/t))))
(asdf:defsystem cl-site/t
:defsystem-depends-on (prove-asdf)
:depends-on (cl-site prove)
:components ((:module site
:pathname "t/"
:components ((:test-file "site"))))
:perform (asdf:test-op (op c)
(uiop:symbol-call :prove-asdf 'run-test-system c)))
:serial t
:components ((:file "globals")
(:file "helpers")
(:file "process")
(:file "main"))
)
\ No newline at end of file
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(in-package :cl-site)
;; Location of template files
(defparameter *LAYOUT-DIR* (asdf:system-relative-pathname :cl-site "layout/templates/"))
(defparameter *LAYOUT-DIR* (asdf:system-relative-pathname :cl-site "layout/templates/")
"Pathname for location of template files.")
;; Where generated output should be written to
(defparameter *OUTPUT-DIR* (asdf:system-relative-pathname :cl-site "output/"))
;; Default template to use unless another is explicitly specified.
(defparameter *OUTPUT-DIR* (asdf:system-relative-pathname :cl-site "output/")
"Pathname where the generated output should be written to.")
;; (More template-related variables may go here in the future)
(defparameter *DEFAULT-PAGE-TEMPLATE* "primary.html")
(defparameter *DEFAULT-PAGE-TEMPLATE* "primary.html"
"Default template to use unless another is explicitly specified.")
;; Location and list of styles
;; *STYLES* should be list of strings representing relative filenames.
;; @TO-DO: replace this with better css preprocessing.
(defparameter *STYLES-DIR* (asdf:system-relative-pathname :cl-site "layout/css/"))
(defparameter *STYLES-DIR* (asdf:system-relative-pathname :cl-site "layout/css/")
"Pathname for location and list of styles.")
(defparameter *STYLES*
(list "main.css"))
(list "main.css")
"A list of strings representing relative filenames.")
;; Location & list of pages
;; Each page is an alist containing info to be sent to the template via the context.
;; 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.
(defparameter *PAGES-DIR* (asdf:system-relative-pathname :cl-site "content/"))
(defparameter *PAGES-DIR* (asdf:system-relative-pathname :cl-site "content/")
"Pathname for location of page content.")
(defparameter *PRIVATE-KEYS* '(:slug :content))
(defparameter *PAGES*
(list
'((:title . "Test Page") (:slug . "test-page") (:content . "testpage.html"))))
'((:title . "Test Page") (:slug . "test-page") (:content . "testpage.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* ())
\ No newline at end of file
(defparameter *GLOBAL-CONTEXT* ())
(defpackage #:cl-site
(:use :cl)
(:export
#:make-site))
(prove:plan 1)
(prove:ok
(cl-site:make-site))
(prove:finalize)
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