add static site generator

This commit is contained in:
2025-05-07 17:14:45 -07:00
parent ae66d51f22
commit 1faa6dad4f
9 changed files with 168 additions and 0 deletions

30
www/src/templates/page.hy Normal file
View File

@ -0,0 +1,30 @@
(import templates.header [header])
(import templates.footer [footer])
(import utils [run hy-env])
(import random [randint])
(defn page [html
[title "natalieee.net"]
[author "natalie roentgen connolly"]
[description ""]
[extra-head None]]
(run "echo > /tmp/footnote_count")
`(html (:lang "en")
(head ()
(link (:rel "stylesheet" :href "/assets/style.css" :type "text/css"))
(link (:rel preload :href "/assets/style.css"))
(meta (:http-equiv "content-type" :content "text/html; charset=utf-8"))
(meta (:name "viewport" :content "width=device-width, initial-scale=1"))
(meta (:name "author" :content ~author))
(meta (:name "fediverse:creator" :content "@0x6e6174@catgirl.cloud"))
~(when description `(meta (:name "description" :content ~description)))
~(when description `(meta (:name "og:description" :content ~description)))
(link (:rel "me" :href "https://mastodon.catgirl.cloud/@0x6e6174"))
~(when extra-head extra-head)
(title ~title))
(body ()
~(header)
(main ()
~html)
~(footer))))