Commit 4413bedd authored by Dave Cooper's avatar Dave Cooper

Added default toplevel test-serve.lisp. Touched up README.md.

parent c4a83be7
......@@ -10,7 +10,8 @@ clean:
rm -rf output
mkdir output
serve: paserve # May be swapped to others from time to time.
serve: static
sbcl --load test-serve.lisp
paserve: static
sbcl --load servers/paserve/serve.lisp
......
......@@ -2,9 +2,7 @@
## Directory structure
The source code for the site generator is located in the
root of the repository. The `t/` directory contains tests
for the site generator.
### Content
The site content is divided over the directories `content/`
and `layout`.
......@@ -36,6 +34,21 @@ If a file by the same name is stored in both
`layout/static/` and `content/static/`, then the one
in `layout/static/` takes precedence.
### Generator Source Code
The source code for the site generator is located in the
root of the repository. The `t/` directory contains tests
for the site generator.
### Server Setup Code (optional)
The `servers/` directory contains code for running various CL HTTP
servers to be able to serve the generated content locally (e.g. while
authoring/editing). It has [its own
README](https://gitlab.common-lisp.net/dcooper/cl-site/blob/master/servers/README.md).
## Dependencies
* CL-MUSTACHE for HTML templating
......@@ -57,7 +70,7 @@ The Makefile contains various useful commands.
Among them:
* `make` - to generate the site.
* `make serve` - to generate the site and start up a test server.
* `make serve` - to generate the site and start up a default test server.
* `make clean` - to remove the generated files from output directory
......@@ -76,13 +89,12 @@ Among them:
(load ".../cl-site/test-serve.lisp") ;; replace with your actual path to cl-site/
This will start serving the site on port 8008 (or subsequent port
numbers, if 8008 is busy).
This will start serving the site. The toplevel URL should be printed to the console.
### Known Problems
The test server crashes on load with `invalid number of arguments` on
certain 1.3.1 releases of SBCL (apparently a problem with the
`ironclad` library from quicklisp with this sbcl version). If you get
this error, try upgrading your SBCL or use CCL.
At least one of the test servers crashes on load with `invalid number
of arguments` on certain 1.3.1 releases of SBCL (apparently a problem
with the `ironclad` library from quicklisp with this sbcl
version). If you get this error, try upgrading your SBCL or use CCL.
......@@ -45,7 +45,7 @@ and it's not listed here, please feel free to add it.
Use `make` followed by the desired server name. Currently existing
make targets are (note that many of these are still placeholders):
make serve # starts a default server which is expected to work.
make serve # starts a default server (from list below) which is expected to work.
make clack # Aims to provide a server-agnostic veneer on top of any actual webserver.
make cl-http # The world's first HTTP1.1 server; powered whitehouse.gov under President Clinton.
make htoot # Hunchentoot (the "800lb Gorilla" of CL webservers).
......@@ -59,9 +59,9 @@ make targets are (note that many of these are still placeholders):
Load the following files to get the corresponding servers running from
within Lisp (note: if you try to do more than one at a time, your
mileage may vary. It'd be interesting though. Who can get them all
running at the same time (on distinct ports, of course, as defined
below) (substitute the path to your `cl-site/` direcotry for the
`...`):
running at the same time in the same running CL session? (on distinct
ports, of course, as defined below) (substitute the path to your
`cl-site/` direcotry for the `...`):
(load ".../cl-site/servers/clack/serve")
(load ".../cl-site/servers/cl-http/serve")
......@@ -98,8 +98,8 @@ Each subdirectory should contain the following:
user how to visit the locally served site in their browser.
Finally, for each server there should be a corresponding distinct
default starting port number defined as a global parameter in
Also, for each server there should be a corresponding distinct default
starting port number defined as a global parameter in
`cl-site/globals.lisp` with its symbol exported in
`cl-site/package.lisp` -- see existing one(s) for the expected
nomenclature.
......
(in-package :cl-user)
(uiop:with-current-directory (*load-truename*)
;;
;; May be swapped with others in servers/ from time to time.
;;
(load "servers/paserve/serve"))
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