Documentation Style Guide
TankSafe documentation should be approachable, accurate, and actionable. This style guide defines the standards for writing, structuring, and maintaining content across the site.
Guiding principlesβ
- Task-first: Lead with the outcome readers care about, then provide necessary context.
- Accurate and current: Cross-reference source code, Supabase policies, and product screenshots before publishing.
- Inclusive language: Avoid jargon where plain language works; explain industry terms in the Glossary.
- Scannable layout: Keep sections short, use descriptive headings, bullets, tables, and admonitions for emphasis.
- Source controlled: Treat documentation changes like codeβbranch, PR, review, merge.
Page anatomyβ
Every page should follow this blueprint where practical:
- Frontmatter metadata
- Required:
title,slug,sidebar_position - Optional:
tags,description,keywords
- Required:
- Executive summary
- A 1β2 sentence overview of the page's purpose.
- Prerequisites
- List tools, roles, permissions, feature flags.
- Execution steps
- Numbered flow for task guides or subheadings for conceptual docs.
- Embed callouts for warnings/tips using Docusaurus admonitions.
- Reserve explicit placeholders for visuals:
<!-- TODO: Add screenshot of [screen/context] -->
- Validation & next steps
- How to confirm success, where to go next, related links.
- Support
- Point to escalation channel or runbook.
Tone & voiceβ
- Write in second person ("You") for task guides; use neutral third person for architecture references.
- Prefer present tense.
- Keep sentences under 25 words when possible.
- Avoid metaphor, idiom, or humour that may confuse non-native speakers.
Formatting standardsβ
| Element | Guidance |
|---|---|
| Headings | Sentence case (## Configure email notifications) |
| Code | Use fenced blocks with language hint; prefer snippets from repository files |
| Tables | Add headers, keep column count β€ 4 for readability |
| Links | Relative links inside docs, absolute for external references |
| Screenshots | Insert as MDX image when available; always include alt text |
| Admonitions | :::tip, :::caution, :::danger, etc. |
Screenshot workflowβ
- Capture: Use a 1440px wide browser window in light theme unless the feature mandates dark mode.
- Annotate: Highlight with brand-colour rectangles if needed; avoid large text overlays.
- Optimise: Export as WebP under
static/img/docs/...with descriptive names. - Placeholder: Add a TODO comment until the screenshot is committed.
- Example:
<!-- TODO: Add screenshot of Admin > Users table with MFA badges -->
- Example:
- Update: Replace comment with
<img alt="..." src="/img/docs/..." />once asset is available.
Tooling & lintingβ
- Run
npm run lint:mdbefore submitting a PR (add script if missing). - Use Prettier with the repository configuration (see
package.json). - Validate links locally with
npx docusaurus swizzle -- --help(or future link-check script). - Enable the VS Code "Markdown All in One" and "Vale" extensions for consistent grammar.
Review checklistβ
- Frontmatter present and accurate
- Headings follow hierarchy (no skipped levels)
- Screenshots or TODO comments in place
- Links resolve
- Steps tested against latest build (
developmentbranch) - Stakeholder SME reviewed technical accuracy
Documentation contributions processβ
- Create an issue or note in the docs backlog describing the change.
- Branch from
development, naming the branchdocs/<topic>-<initials>. - Make changes, running lint and build locally.
- Submit a PR with context, screenshots, and checklist confirmations.
- Request review from the docs owner and relevant SMEs.
- Merge once approvals are complete and the build passes.
- Monitor analytics/feedback after publish to gauge adoption.