this lets me make the base html code cleaner and it lets me keep using a
seperate file for font-face stuff so the style.css is cleaner. this is
implemented by using the askama template engine with the same syntax
that was used in the style tag in base.html, but i render the template
to text instead of directly to a rocket responder and i hash it with the
sha2 crate. this hashing should only run once, at startup, so it
shouldn't be much of a performance hit.
i abstraced the file handling out to a global static struct called
"Files" that is only written to once, in main inside a OnceLock. i also
split out asset handling into its own module folder called assets which
has all the asset handling code.
i also have a new crate called "proc_macros" which provides a attribute macro
that adds the base_template field to each struct i decorate with it
using the syn and quote crates.
this has abstractions for getting the names.json file and reading them
and parsing them. i also moved the cli logger initialization code into
its own module.
the cli now uses a new module in the shared crate, called directories
which is a module that has functions for directory stuff, mainly, it
uses the directories crate to have a portable way to have directories
for the application like data directories and config directories.
i also added logging to the shared and cli crates, so you can see debug
stuff with the RUST_LOG environment variable.
i'm making a cli that lets you add stuff to the names.json file and read
data from it and i moved stuff that can be shared between them like the
Site struct to a shared crate thats in workspace, like the cli crate. i
also switched to using typed json parsing which works well.
this has the exact same syntax as tera (jinja style) but its compile
time which is very useful for having a portable binary that doesn't
require any files to run like a templates folder or public folder.
i added a json api called /name which lets you get the previous and next
site name. i also modified the internal url functions to return a None
value if overflow is turned off and next or previous is nothing.