krz/orgo

Lightning fast org-mode static site generator. fast go org-mode static-site-generator

Commit 9b799fe1f4

9b799fe1f4dfb59b00bcae959418d0c4398db25b

parent: 0ac7aceeba

Unsigned

cmc <hello@cleberg.net> · 2026-08-12 02:53 UTC

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.

Layout: unified · split

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