You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #82 (under #30) landed inline test-based worked examples: each pairs a small input corpus with a real katalyst command and its tested output, embedded into the reference / how-to / deep-dive page that owns the feature. The mechanism works and the output can't drift — but the presentation was built quickly and deserves a dedicated polish pass.
Current state
Two shortcodes: {{< katalyst-example >}} embeds output only (wrapped in <pre><code>); {{< katalyst-example-full >}} embeds the full corpus + command + output (Markdown via markdownify). Both read from docs/generated/examples/<id>.{txt,full.md}, produced by cmd/gendocs from internal/examples.
A full example renders as a narrative line, then a flat sequence of `filename` + fenced block per corpus file, then a single console fence holding $ katalyst …, stdout, stderr, and exit status N.
Generated check-type / inspector pages now carry both a static ## Example (a config snippet) and a ## Worked example.
Things to tidy
Reconcile the static ## Example with the ## Worked example on check-type pages — the worked example's Input already shows a working config, so the two overlap. Decide whether to drop/merge the static snippet where a worked example exists.
File presentation: the `path` + fence pattern is plain. Consider a filename caption / "card" treatment so the corpus reads as labeled files.
Command transcript: visually distinguish the command from its output, and present exit status N deliberately (today it's just a trailing line inside the fence).
Two-shortcode story: document when to use output-only vs full (how-tos use output-only, reference/deep-dive pages use full), or unify them.
Long corpora (e.g. inspect-collection-fields, five files) could collapse behind <details> or be trimmed.
House style for corpora: the convention established in Add worked examples registry with test gating and doc generation #82 (data files first; storage named .katalyst/storage/my_directory.yaml; inline checks where they fit, schema only where the example is about schemas) should be written down so future examples follow it.
Minor: blank-line / whitespace tightening in generated fences; language-hint consistency.
Why
These examples are a marquee feature of the docs — real, gated output that can't drift. Consistent, scannable presentation is what makes them land; the current rendering is functional but rough.
Summary
PR #82 (under #30) landed inline test-based worked examples: each pairs a small input corpus with a real
katalystcommand and its tested output, embedded into the reference / how-to / deep-dive page that owns the feature. The mechanism works and the output can't drift — but the presentation was built quickly and deserves a dedicated polish pass.Current state
{{< katalyst-example >}}embeds output only (wrapped in<pre><code>);{{< katalyst-example-full >}}embeds the full corpus + command + output (Markdown viamarkdownify). Both read fromdocs/generated/examples/<id>.{txt,full.md}, produced bycmd/gendocsfrominternal/examples.`filename`+ fenced block per corpus file, then a singleconsolefence holding$ katalyst …, stdout, stderr, andexit status N.## Example(a config snippet) and a## Worked example.Things to tidy
## Examplewith the## Worked exampleon check-type pages — the worked example's Input already shows a working config, so the two overlap. Decide whether to drop/merge the static snippet where a worked example exists.`path`+ fence pattern is plain. Consider a filename caption / "card" treatment so the corpus reads as labeled files.exit status Ndeliberately (today it's just a trailing line inside the fence).inspect-collection-fields, five files) could collapse behind<details>or be trimmed..katalyst/storage/my_directory.yaml; inline checks where they fit, schema only where the example is about schemas) should be written down so future examples follow it.Why
These examples are a marquee feature of the docs — real, gated output that can't drift. Consistent, scannable presentation is what makes them land; the current rendering is functional but rough.
Related