Lilian Jónsdóttir
6fe2dcf3c8
make staticcheck happy
2024-02-09 00:25:40 -08:00
Lilian Jónsdóttir
7451953d43
reexport RegenerateTemplateCache() and have it return error instead of dying
2024-01-30 10:55:49 -08:00
Lilian Jónsdóttir
b56b6f11cb
actually print out errors
2024-01-27 17:30:31 -08:00
Lilian Jónsdóttir
f82809bfb1
un-export some functions
...
they didn't need to be exported anyway
2024-01-27 16:27:51 -08:00
Lilian Jónsdóttir
3dbd5a86e2
major refactor of render
...
- split many parts of RenderTemplate into their own functions so they can be used individually
- move web apps into their own page, add projects page, both generated by executing links.tmpl
with their own yaml data
- handle / specially, generating LinkMap from Handlers
2024-01-24 00:20:07 -08:00
Lilian Jónsdóttir
64b40c3d82
clean up models
...
move template data functions to their own package
2024-01-23 19:01:59 -08:00
Lilian Jónsdóttir
d9434f49ab
some cleanup in render.go
2024-01-23 16:17:44 -08:00
Lilian Jónsdóttir
8a2319033e
refactor how template data is handled + load template data from file
...
Generating template data is now handled by templatedata instead of handlers.
Renderer doesn't recieve any data, but now asks for data from templatedata.
Additionally, template data is loaded from file (too lazy to split that into its own commit).
Templates in ./templates/name.page.tmpl will have data loaded from ./templates/name.page.json
2024-01-23 16:10:15 -08:00
Lilian Jónsdóttir
ffe303f1c6
generate new template cache if pulling from it fails, instead of bailing out
...
extreme edge case? probably
2024-01-23 14:27:50 -08:00
Lilian Jónsdóttir
9a42079ae3
refactor RenderTemplate a bit
2024-01-23 14:08:08 -08:00
Lilian Jónsdóttir
21ccdebd7a
log time in format consistent with what is on the page
2024-01-23 13:54:25 -08:00
Lilian Jónsdóttir
cff59fe895
don't generate cache on startup if UseCache is false
2024-01-23 13:53:59 -08:00
Lilian Jónsdóttir
e17e186c1d
refactor handlers
...
- repeat less
- lay framework for adding more pages
2024-01-22 22:12:19 -08:00
Lilian Jónsdóttir
4f97975986
fix bad log formatting
2024-01-22 21:54:33 -08:00
Lilian Jónsdóttir
f3f3f4406c
update appwide template cache when new template cache is generated
...
and useCache is off
2024-01-22 21:54:19 -08:00
Lilian Jónsdóttir
7bfeb5f940
debug log when template is rendered
2024-01-22 21:52:42 -08:00
Lilian Jónsdóttir
a7f6bb35e7
it works!
...
initial build that basically replicates my old HTML site
2024-01-22 20:10:14 -08:00