krz/orgo

Lightning fast org-mode static site generator.

clone: git clone https://gitbay.org/krz/orgo.git

9b799fe1f4dfb59b00bcae959418d0c4398db25b

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2026-08-12T02:53:56Z

Teach audit about orgo's own keywords

`KNOWN_KEYWORDS` listed org's standard export keywords but none of the
three orgo reads itself, so `audit` filed them under `???` — "a name the
implementation does not recognize at all". On a real corpus that reported
`SLUG`, the most-used keyword in the site I write with, as a blind spot.

All three are read by name from a document's keywords:

- `SLUG` names the output file (`util::output_path`)
- `DRAFT` decides whether the page publishes (`util::is_draft`)
- `TEMPLATE` picks the template (`config::page_template`)

`TEMPLATE` had the same bug; no corpus I ran happened to use it.
 src/audit.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/audit.rs b/src/audit.rs
index 330eb02..b5e1486 100644
--- a/src/audit.rs
+++ b/src/audit.rs
@@ -77,6 +77,11 @@ const KNOWN_KEYWORDS: &[&str] = &[
     "TITLE", "AUTHOR", "DATE", "EMAIL", "LANGUAGE", "OPTIONS", "FILETAGS", "DESCRIPTION",
     "KEYWORDS", "CAPTION", "NAME", "ATTR_HTML", "RESULTS", "TBLFM", "INCLUDE", "TODO",
     "STARTUP", "SUBTITLE", "SETUPFILE", "MACRO", "PROPERTY", "HTML_HEAD", "EXCLUDE_TAGS",
+    // orgo's own keywords, each read by name: `SLUG` names the output file
+    // (`util::output_path`), `DRAFT` decides whether the page publishes at all
+    // (`util::is_draft`), and `TEMPLATE` picks the template (`config::page_template`).
+    // Leaving them out reported the corpus's most-used keyword as unrecognized.
+    "SLUG", "DRAFT", "TEMPLATE",
 ];
 /// Blocks with dedicated handling. Any *other* name renders as a special block — a div
 /// with that name holding parsed org — so an unlisted block is a note about what a corpus