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
+5
View File
@@ -28,6 +28,7 @@ Page :: struct {
content: string,
og: Open_Graph,
draft: bool,
toc: string,
_is_index: bool `private`,
}
@@ -280,6 +281,10 @@ load_page :: proc(
page.content = md.process(body, ext, file_path, context.allocator)
}
if fm.toc {
page.toc = md.generate_toc(page.content, context.allocator)
}
ok = true
return
}