ByteOr Docs Authoring Model
ByteOr docs are Markdown-first. MDX is available because the site needs repeatable structure and a small number of high-legibility interactive surfaces, not because every page should behave like an app screen.
Central public pages explain the product story, architecture, and operator flow. Repo docs and rustdoc remain canonical when the content becomes contract-level, implementation-level, or release-specific.
Decision Rule
Use the simplest form that preserves clarity
Use plain Markdown for most pages: architecture explanations, operator procedures, API walkthroughs, and reference text that reads as prose.
- Default to
.mdxfiles but keep the content mostly Markdown syntax. - Use one H1, a short lead, and stable section hierarchy.
- Keep diagrams, lists, tables, and code fences readable without custom UI.
Directory Conventions
Underscore Directories
Use the following split only when a page really needs authoring-only helpers:
docs/_fragments/for reusable MDX snippets or shared prose sections.docs/_components/for page-local MDX helpers that should not sit in the theme layer.theme/components/for true site-wide UI and layout primitives.
If these directories are empty, remove them rather than keeping placeholder folders in the repo.
Page Template
Every public page should converge on the same skeleton.
- Frontmatter with
titleanddescription. - One H1 that matches the page purpose.
- A short lead paragraph that tells the reader what problem the page solves.
- Predictable H2 sections for architecture, workflow, reference, or operations.
- Code fences with useful metadata and minimal inline styling noise.
Markdown Pipeline
The site enables GitHub Flavored Markdown through remark-gfm. Math support is intentionally not enabled yet because there is no established public docs need for it. Add math only when a real documentation surface requires it.
Code Blocks
- Keep language tags explicit.
- Use wrapped code blocks by default.
- Fold very long blocks globally unless a page specifically needs full-height code.
Preview and Playground
The public docs app does not ship a general preview or playground right now. The current site is dominated by architecture, operator workflow, and reference content, so compile-time snippets are the default. Revisit this only when a page has a real interaction that materially improves comprehension.
- Do not add a sandbox just to render code examples that already work as static snippets.
- If a future page genuinely needs live preview, prefer an iframe-backed surface that loads the same docs theme stylesheet so Tailwind and shadcn primitives render identically to the rest of the site.
- Keep preview surfaces narrow and page-specific rather than introducing a site-wide playground mode.