fix: Removed need for has_date in templates.

This commit is contained in:
Spencer Brower
2026-07-16 17:01:56 -04:00
parent f78e3811e4
commit f70205876f
2 changed files with 3 additions and 15 deletions
+2 -10
View File
@@ -3,20 +3,10 @@
- [ ] Content-hash fingerprinting for CSS and JS cache busting
- [ ] Performance
- [ ] See if we can disable bounds checks in `write_indented` and elsewhere.
- [ ] remove "has_*" keys from context.
- [x] Enable configuration to opt-out of features, particular pre/post processors.
- [ ] proper date/time/now object.
- [ ] Footer isn't centered properly.
- [ ] mustache data keys for opengraph, etc.
- [ ] Block attributes on code fences (`{ #ex-1 }`) — hello-world.md
- [x] Emoji shortcodes (`:shrug:` etc.) — 2 instances
- [x] Backslash in shrug not visible.
- [ ] include-code shortcode (`{{< include-code ... >}}`) — i-ported-fd-to-odin
- [x] Nix build integration — main flake runs thor + tailwindcss instead of Hugo
- [x] OpenGraph meta tags
- [x] copy all files from `static` to `public`.
- [ ] ensure sidenote numbers render in display order and not in declaration order.
- [x] Search up for `thor.json` files.
- [ ] OpenGraph meta tags — verify all fields match production site
- [ ] Add Opt-in deflist support.
- [ ] set opengraph tags / description automatically if unset. (Like hugo does)
@@ -40,6 +30,8 @@
- [ ] event based
- [ ] Free cmark HTML output (`body_html`) — cmark allocates via C malloc, not the arena, so it leaks per iteration in watch mode
- [ ] commands
- [ ] `build` alias of default
- [ ] `init` set up new project
- [ ] Use spall to find ways to reduce run time.
- [ ] warn/error when unknown key used in mustache.
- [ ] Review every file in thor
-4
View File
@@ -15,7 +15,6 @@ Page_Context :: struct {
permalink: string,
title: string,
starred: bool,
has_date: bool,
date_iso: string,
date_display: string,
}
@@ -43,7 +42,6 @@ Base_Data :: struct {
Page_Data :: struct {
using base: Base_Data,
page_title: string,
has_date: bool,
date_iso: string,
date_display: string,
is_post: bool,
@@ -66,7 +64,6 @@ build_page_context :: proc(page: Page) -> Page_Context {
permalink = page.permalink,
title = page.title,
starred = page.is_starred,
has_date = page.date != "",
date_iso = page.date,
date_display = format_date(page.date),
}
@@ -227,7 +224,6 @@ render_page_html :: proc(
data.title = fmt.tprintf("%s | %s", page.title, config.title)
data.page_title = page.title
data.body = page.body_html
data.has_date = page.date != ""
data.date_iso = page.date
data.date_display = format_date(page.date)
data.is_post = is_article