
* src/cli.lisp: utility functions for CLI processing. * cli/launch/build.lisp: Builds the blog/site * cli/launch/clean.lisp: Deletes the staging and deploy dir * cli/launch/rebuild.lisp: Same as clean and build. * cli/launch/serve.lisp: Doesn't work. * src/config.lisp: load-config now takes the path to the config file as an argument instead of trying to discover it itself.
18 lines
811 B
Common Lisp
Executable file
18 lines
811 B
Common Lisp
Executable file
#!/usr/bin/cl -Q -s hunchentoot -sp coleslaw --entry serve
|
|
|
|
(defun serve (argv)
|
|
(let* ((parameters (coleslaw-cli:process-parameters argv))
|
|
(current-dir (uiop/os:getcwd))
|
|
(repo-dir (or (cdr (assoc :repo-dir parameters))
|
|
current-dir))
|
|
(config-file (or (cdr (assoc :config parameters))
|
|
(discover-config-path current-dir))))
|
|
(load-config config-file repo-dir)
|
|
#+nil(compile-blog (staging-dir *config*)) ; Should the blog be compiled?
|
|
|
|
(hunchentoot:start
|
|
(make-instance 'hunchentoot:easy-acceptor
|
|
:port 4242 ))
|
|
(push (hunchentoot:create-folder-dispatcher-and-handler "/"
|
|
(staging-dir *config*))
|
|
hunchentoot:*dispatch-table*)))
|