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
+1 -5
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,
@@ -61,12 +59,11 @@ Posts_Data :: struct {
year_sections: [dynamic]Year_Section,
}
build_page_context :: proc(page: Page) -> Page_Context {
build_page_context :: proc(page: Page) -> Page_Context {
return 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