Caveman-Skeltons
This includes skeltons for Caveman2.
Note: The base skelton (in the master branch) is copied from the original skelton in caveman2.
Instalation & Usage
- Clone this repository to a directory that can be searched by quicklisp.
- Checkout a branch that contains a skelton that you hope to use.
;; omit output
> (ql:quickload :caveman-skeltons)
> (caveman-skeltons:make-project #p"/path/to/project")
Relationship diagram of branches
About each branch
with_cl_markup
This adopts CL-Markup as a default template engine instead of Djula
If you want to add a new template...
- Add a file name (= a template name) to
<your project name>.asd
under the "templates" module. - Add a lisp file as
templates/<template name>.lisp
, then...- Make a package as the name
<your project name>.templates.<template name>
. - Make a function
render
that returns a HTML code as a string.- We suppose that you use CL-Markup to make the return value.
- Arguments of it is arbitrary.
- Make a package as the name
- Use the template in
src/web.lisp
using the<your project name>.view:render
function(render :<template name> <aruguments if needed>)
If you want to see an example, please see the templates/index.lisp
with_parenscript
This is created from the with_cl_markup
branch.
This adopts Parenscript to generate JavaScript codes.
If you want to add a new file...
- Add a file name (with no suffix) to
<your project name>.asd
under the "static/js" module. - Add a lisp file as
static/js/<name>.lisp
, then...- Make a package as the name
<your project name>.static.js.<name>
. - Make a function
js-main
that returns a JavaScript code as a string.- We suppose that you use Parenscript to generate it.
- This is a function that has no argument.
- Make a package as the name
- Use this in templates using the
<your project name>.static.js.utils:load-js
function(load-js :<name>)
- This function generates a JavaScript file as
static/js/_<name>.js
If you want to see an example, please see the static/js/index.lisp
and templates/index.lisp
Author
- eshamster (hamgoostar@gmail.com)
License
Licensed under the LLGPL License.