From 9a35fa2051d34fc047e9071bb3eda60ab7bda0ef Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Tue, 28 Jul 2026 11:45:21 -0400 Subject: [PATCH] fix: Removed `content` from Template_Context. now accessible only through page.content. --- render.odin | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/render.odin b/render.odin index 0acbeb8..38a2d89 100644 --- a/render.odin +++ b/render.odin @@ -13,7 +13,6 @@ import "core:time/datetime" Template_Context :: struct { params: json.Value, now: string, - content: string, title: string, description: string, og: Open_Graph, @@ -154,6 +153,7 @@ render_site :: proc(site: ^Site) { break } } + ctx.page = home // Collect sections sections := make(map[string]bool) @@ -248,7 +248,6 @@ render_page_html :: proc( ctx := ctx ctx.title = fmt.tprintf("%s | %s", page.title, site.title) ctx.page = page - ctx.content = page.content ctx.og = og_for_page(site.og, page) return render_template(content_tpl, ctx, partials) } @@ -270,7 +269,6 @@ render_home_html :: proc( ctx := ctx ctx.title = site.title - ctx.content = home.content ctx.pages = list_pages ctx.og = og_for_page(site.og, home) @@ -296,7 +294,6 @@ render_section :: proc( ctx := ctx if has_index { - ctx.content = section_index.content ctx.page = section_index ctx.title = fmt.tprintf("%s | %s", section_index.title, site.title) ctx.og = og_for_page(site.og, section_index)