ZDDC/zddc/cmd/zddc-server
ZDDC 85e0061d6c feat(editor): hint recognized front-matter fields via server placeholder
The markdown editor's YAML front-matter pane was a bare textarea, so authors
had no way to discover the keys the converter honours — notably `doctype:`
(report|letter|specification) and `numbering:`, which have no other source.

Add a single server-side source of truth, convert.RecognizedFrontMatter() +
convert.FrontMatterPlaceholder(), and expose it as JSON at GET /.api/frontmatter
(handler.ServeFrontMatterTemplate; read-only, no auth — leaks only documented
field names). The browse editor fetches it once (server mode) and sets the
front-matter textarea's placeholder to the greyed hint, so an empty pane shows
the recognized keys with one-line hints. It's placeholder-only: it inserts
nothing, vanishes on the first keystroke, and arbitrary keys remain free —
front matter is still passed through to pandoc untouched. file:// mode shows no
placeholder (conversion is server-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 08:23:25 -05:00
..
main.go feat(editor): hint recognized front-matter fields via server placeholder 2026-06-05 08:23:25 -05:00
main_test.go feat(server): elevated admins can browse the .zddc.zip config bundle 2026-06-04 10:39:57 -05:00