diff --git a/docs/api.md b/docs/api.md index 65c331b..d555472 100644 --- a/docs/api.md +++ b/docs/api.md @@ -102,6 +102,15 @@ valid JSON (`json.loads` must succeed). `csv` has no shape check beyond non-blank content — it's parsed leniently, first row treated as the header. A mismatch returns `400`. +**Known limitation:** this check is substring-based, not a real HTML parse. +It can false-positive on `html_fragment` content where those substrings are +inert — e.g. a JS string literal inside `" +} +``` + +→ `400 {"detail":"html_fragment must be body-only HTML; do not include doctype/html/body"}` + +This content is legitimate, safe, body-only HTML (a ` + + + +``` + +**Offline caveat:** Daybook can run fully self-hosted/air-gapped. Any +artifact that links a CDN script won't render fully (or at all, for +Tailwind's in-browser compiler) without internet access. If the deployment +target is offline, don't reach for these — use `markdown`/`html_fragment` +instead, which are styled entirely server-side with no external requests. + +Only use this for `html_full` specifically — never add CDN references to +`markdown`/`html_fragment`/`deck`. Those kinds exist so Daybook, not the +poster, owns styling; injecting a default CDN habit into them would +undermine that. + ## Images Inside Content To embed an image *within* a markdown or HTML artifact (rather than posting it as its own diff --git a/skills/daybook-posting/scripts/daybook_post.py b/skills/daybook-posting/scripts/daybook_post.py index cc8c9a8..5c92249 100644 --- a/skills/daybook-posting/scripts/daybook_post.py +++ b/skills/daybook-posting/scripts/daybook_post.py @@ -92,7 +92,7 @@ def parse_args(): parser.add_argument("--content-file", help="Read text artifact content from this file.") parser.add_argument("--file", help="Upload this file as image/pdf/binary, or render as markdown with --as-markdown.") parser.add_argument("--tags", help="Comma-separated tags.") - parser.add_argument("--theme", help="Theme for markdown/html_fragment. Example: report, tasks, bootstrap.") + parser.add_argument("--theme", help="Theme for markdown/html_fragment. Example: report, tasks, base. See docs/api.md for the current list.") parser.add_argument("--meta", action="append", default=[], help="Metadata key=value. Repeatable.") parser.add_argument("--meta-json", help="Metadata JSON object. Merged with --meta values.") parser.add_argument("--source-name", help="Human-readable source name. Defaults to --source.")