Authoring Guide
Adding a New Page
- Create a
.mdfile in the appropriatecontent/{project}/{subproject}/directory - Add YAML frontmatter with at least
titleandsummary - Write markdown content
- The page is immediately available in dev mode (no build step)
Adding a New Subproject
- Create the directory under
content/{project}/ - Add
_subproject.yamlwith id, name, description, and schema_coverage - Add at least one
.mdfile - The subproject appears in navigation and manifests automatically
Adding a New Project
- Create the directory under
content/ - Add
_project.yamlwith id, name, and description - Add at least one subproject with one page
- The project appears on the hub landing page and in the master manifest
Markdown Features
DocHub uses markdown-it with these capabilities:
- Standard CommonMark markdown
- Tables (GitHub-flavored)
- Fenced code blocks with syntax highlighting (specify language after triple backticks)
- Auto-linked URLs
- Smart quotes and typographic replacements
- Raw HTML passthrough
- Heading anchor links (click heading to get permalink)
Supported Code Languages
Any language supported by highlight.js works in fenced code blocks:
```typescript
const x: number = 42;
```
```json
{ "key": "value" }
```
```bash
npm run build
```
```yaml
name: example
```
Cross-References
Use the references frontmatter field to declare dependencies between subprojects:
references:
- target: dochub/api # project/subproject format
type: depends_on
- target: dochub/deployment
type: consumed_by
Reference types are freeform strings. The daily agent validates that referenced subprojects actually exist and flags broken references.
Page Ordering
Pages in the sidebar are sorted by the order frontmatter field (ascending), then alphabetically by slug. Use increments of 1 for normal ordering:
order: 1 # First page
order: 2 # Second page
order: 3 # Third page
Pages without an order field default to 999 and appear last.
Adding an Overview Page (Tier 1)
Overview pages are self-contained HTML files in content/_overviews/ with embedded CSS. To add one:
- Create
content/_overviews/{id}.html— a complete HTML document with all styles inline - Edit
src/routes/overview.tsand add the page to theoverviewPagesarray with id, title, subtitle, and icon - Recompile TypeScript (
npx tsc) since the route file changed - The page is immediately available at
/overview/{id}
Design Guidelines
Follow the existing overview style:
system-uifont,#1e293btext,#ffffffbackground- Blue accent (
#2563eb) for section headers with left bar indicator - Numbered flow steps: blue circles with white numbers
- Tables with uppercase gray headers
- Color-coded badges (Critical=red, Important=yellow, Optional=blue)
- Cards with subtle borders and 12px border-radius
- Sections with
#f8fafcbackground, padded, rounded - “Drill Down” links at the bottom linking to relevant Tier 2 docs
- Navigation breadcrumb at the top linking back to
/overview/
Dev Workflow
In development, content is rendered on-the-fly from the filesystem. There is no build step — save a .md file and reload the browser. The nav tree, manifests, and search all read directly from content/.
Overview HTML files are also served directly from the filesystem. Save the .html file and reload.
In production, the build-site.ts script can pre-render manifests and raw files to build/, but the HTML rendering still happens at request time.