View on GitHub

Caveman-skeltons

Skeltons for Caveman2

Download this project as a .zip file Download this project as a tar.gz file

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

  1. Clone this repository to a directory that can be searched by quicklisp.
  2. 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

Alt text

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...

  1. Add a file name (= a template name) to <your project name>.asd under the "templates" module.
  2. Add a lisp file as templates/<template name>.lisp, then...
    1. Make a package as the name <your project name>.templates.<template name>.
    2. 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.
  3. 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...

  1. Add a file name (with no suffix) to <your project name>.asd under the "static/js" module.
  2. Add a lisp file as static/js/<name>.lisp, then...
    1. Make a package as the name <your project name>.static.js.<name>.
    2. 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.
  3. 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

License

Licensed under the LLGPL License.