feat: Added 'Table of Contents' markdown extension.

This commit is contained in:
Spencer Brower
2026-08-04 11:52:51 -04:00
parent 2ac1d767cf
commit cc33447ace
6 changed files with 272 additions and 34 deletions
+2
View File
@@ -16,6 +16,7 @@ Frontmatter :: struct {
layout: string,
og: Open_Graph,
draft: bool,
toc: bool,
}
// parse_frontmatter splits raw file content into a Frontmatter struct and the
@@ -56,6 +57,7 @@ parse_frontmatter :: proc(content: string) -> (fm: Frontmatter, body: string, ok
fm.publishDate = json_get_string(obj, "publishDate")
fm.weight = json_get_int(obj, "weight")
fm.draft = json_get_bool(obj, "draft")
fm.toc = json_get_bool(obj, "toc")
if v, ok := obj["menus"]; ok {
fm.menus = v
}