Commit graph

15 commits

Author SHA1 Message Date
Gered 80b9dd9aec move template_renderer into SiteContent, so it is refreshed as needed
since we want html template modifications to trigger content refreshes,
we need to reload the Tera renderer because it internally is caching
loaded html templates.
2023-07-01 16:30:48 -04:00
Gered 2d9ce75ec0 add separate template for the "latest post" page (the home/main page)
since it's reasonable to assume some may want to customize this a
little differently than the normal post page.
2023-07-01 16:19:22 -04:00
Gered 0ac1024c6c add more watched paths 2023-07-01 15:35:48 -04:00
Gered ee30a192c2 allow the log level to be set via environment variable 2023-07-01 14:34:18 -04:00
Gered 276c714ee8 add initial file watching support to trigger content reloading
not all of the paths that we'd probably like are being watched yet
2023-07-01 14:33:57 -04:00
Gered 35b357b1e1 add some css classes to syntax highlighted code block container tags 2023-06-30 21:13:12 -04:00
Gered 1d83b95211 add custom syntax loading support 2023-06-30 16:40:53 -04:00
Gered 4dfd946204 switch a bunch of naming from using "commonmark" to "markdown"
while we are actually using a CommonMark renderer instead of Markdown,
i think i just prefer referring to everything related to this as
"markdown" for simplicity's sake. meh.
2023-06-30 14:58:06 -04:00
Gered 913612c6e8 cleanups 2023-06-30 14:53:39 -04:00
Gered 8885a7c9d8 markdown rendering refactor and addition of code syntax highlighting
currently syntax highlighting is limited to the default syntax
definitions that syntect comes pre-loaded with (which is the same
as sublime text's out-of-the-box language support)
2023-06-30 14:53:10 -04:00
Gered 6e3eae7abd switch from json to yaml
yaml is just easier to write by hand, and since we're using it for
files which are all meant to be written/edited by hand, it seems like
a no-brainer.
2023-06-28 17:38:41 -04:00
Gered 1fbdab9c58 rename "old urls" to "alternate urls" 2023-06-28 17:12:36 -04:00
Gered 9d2af25c81 improve how posts and pages are referenced internally
since most often, we need to get posts sorted in descending order by
date, we now just store the actual posts in a Vec, pre-sorted by date.
everything else that needs to reference posts now does so by the post's
index in that Vec.

pages are also changed to be stored/referenced in a similar manner, but
it is somewhat less important for pages since we don't do any real
enumeration of pages at all anywhere. but it's nice to be consistent.
2023-06-28 16:59:10 -04:00
Gered 83d75d4885 represent post dates as a NaiveDateTime, still allowing for date-only
posts can be specified with a date only, or date and time as desired.
it is up to the site's specific template to render posts with an
appropriate date/time format string based on what the author's
preferences
2023-06-28 15:16:29 -04:00
Gered 4c3fc25e50 initial commit
basically works, but still missing things. as well as some (much?) code
being kinda janky
2023-06-27 17:15:58 -04:00