generate html from lisp
Go to file
2024-09-29 09:18:08 -07:00
src update site-info.html 2024-09-29 09:18:08 -07:00
templates abuse footnote feature on old pages, general updates 2024-09-14 04:37:07 -07:00
.gitignore add most importtant pages 2024-09-01 14:29:08 -07:00
exec.lisp add most importtant pages 2024-09-01 14:29:08 -07:00
gen.lisp abuse footnote feature on old pages, general updates 2024-09-14 04:37:07 -07:00
html.lisp initial 2024-08-26 21:40:45 -07:00
readme.md fix readme 2024-08-26 21:47:28 -07:00
utils.lisp abuse footnote feature on old pages, general updates 2024-09-14 04:37:07 -07:00

htmlgen

tool for generating html from lisp code.
used for natalieee.net.
built around https://gist.github.com/markasoftware/ab357f1b967b3f656d026e33fec3bc0e

useage

templates/: used for templates
src/: documents in lisp
out/: where html will be written

to compile, run {clisp,sbcl} gen.lisp

example

templates/page.lisp for natalieee.net

(load "./templates/header.lsp")
(load "./templates/footer.lsp")

(defun page (title html)
    `(html (:lang "en") 
           (head ()
                 (meta (:http-equiv "content-type" :content "text/html; charset=utf-8"))
                 (meta (:name "viewport" :content "width=device-width, initial-scale=1"))
                 (link (:rel "stylesheet" :href "/style.css"))
                 (title () ,title))
           (body () 
                 ,(header)
                 (main () 
                       ,html)
                 ,(footer))))

example page:

; this would have a path of src/example.lisp or similar
(defun html ()
    (page "example" '(h1 () "example")))