refactor: weights are now wrapped in a Maybe.

This commit is contained in:
Spencer Brower
2026-07-30 09:21:58 -04:00
parent df14d76a85
commit d03e3469b3
6 changed files with 62 additions and 73 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ Page :: struct {
description: string,
date: string,
year: string,
weight: int,
weight: Maybe(int),
lastmod: string,
menus: map[string]Menu_Entry,
content: string,
@@ -254,7 +254,7 @@ load_page :: proc(
}
}
page.year = get_year(page.date)
page.weight = fm.weight if fm.weight != 0 else DEFAULT_WEIGHT
page.weight = fm.weight
page.lastmod = fm.lastmod
page.draft = fm.draft
page.starred = fm.isStarred