feat: Improved opengraph defaults.

This commit is contained in:
Spencer Brower
2026-07-20 14:27:27 -04:00
parent 1cb13a6a55
commit 566d6f0768
7 changed files with 285 additions and 66 deletions
+4
View File
@@ -17,8 +17,10 @@ Page :: struct {
title: string,
description: string,
date: string,
lastmod: string,
menu: string,
body_html: string,
og: Open_Graph,
draft: bool,
is_starred: bool,
_is_index: bool `private`,
@@ -132,10 +134,12 @@ load_page :: proc(
page.title = fm.title
page.description = fm.description
page.date = fm.date
page.lastmod = fm.lastmod
page.draft = fm.draft
page.is_starred = fm.isStarred
page.menu = fm.menu
page.layout = fm.layout if fm.layout != "" else infer_layout(section, is_index)
page.og = fm.og
if strings.has_suffix(file_path, ".html") {
page.body_html = strings.clone(body)