add static site generator
This commit is contained in:
30
www/src/templates/page.hy
Normal file
30
www/src/templates/page.hy
Normal 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))))
|
Reference in New Issue
Block a user