## Problem The style guide's template router has only the how-to guide template. Concept pages have no structure to follow, so explainers vary widely and many mix in procedures. Closes DOCS-1610 ## Solution - Add `apps/docs/style-guide/templates/explainer.md`, 88 lines. - Change the explainer row in the document-type table from _Instructions_ to _Procedures past two steps_, to match the tiny-procedure rule. - Add a heading rule to the _versus_ entry in `WORD_LIST.md`. - Add title rules to `03-page-structure.md`: name the product when the noun alone is ambiguous, and avoid placeholder words like _Fundamentals_. Add a Sidebar label section, since `sidebar_label` wasn't documented. - Add its row to the [Choose a template](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/03-page-structure.md#choose-a-template) router in `03-page-structure.md`. Key choices: - **Three required parts**: the value statement with an optional cross-reference, the only text before the first heading; a first H2 that says what the concept is; and `## Related resources`. Process, Structure, and `Limits` or `Trade-offs` are optional, because most existing concept pages, such as `platform/regions` and `storage/buckets/fundamentals`, have no Process to write. - **Tiny procedures stay inline**: a one- or two-step action that illustrates the concept can sit in the section it qualifies. A longer procedure, or one with prerequisites, moves to a how-to guide. - **Cross-references by page type**: each section says where to link, such as a how-to for a task stage and a reference for a part's details. The value statement ends with `For how to <task>, see <guide>` when a how-to applies. - **Optional Mermaid diagram**: it requires `accTitle`, `accDescr` naming the nodes and connections, and a takeaway in the prose beside it, per [Diagrams](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/02-elements.md#diagrams). - **Worked example**: a cut-down `auth/architecture.mdx` that shows every slot. Its Process section is illustrative. The skills reach templates through the router, so no skill file changes. ### Learnings from the first rework These refinements come from reworking ten explainers in #53755 and #53757: - **No concept heading.** All five pages define the concept in their opening paragraph, so a `## What <concept> is` heading would repeat it. Later reversed: see Engagement rules. - **One H2 per part.** `auth/architecture` gives each layer its own section, and other pages link to them. The template now allows a parts table followed by one H2 per part. - **Linked headings keep their text** in whichever slot they fill, such as `## Public vs private buckets` as Trade-offs. - **Principles have a home**, such as "treat the schema as read-only": in Limits or Trade-offs, or as an admonition that leads with its impact. - **Related resources can repeat the how-to link** from the value statement. Every page did, and the link-once rule contradicted the example. - **When to use.** An optional `## When to use <concept>` section answers the reader question's "when do I use it?" Two pages had one and no slot fit. - **Bigger Process and Parts.** A Process can take one H2 per stage, for `realtime/architecture`. A concept with two independent sets of parts, such as index types and distance operators, gets one section for each. ### Engagement rules These rules make explainer sections easier to skim, from a read of the reworked Auth architecture page: - **Each part leads with its job**, then says when the reader works with it. History goes last or is cut. - **A Process follows one real case** with real names, such as the endpoint a sign-in calls. - **A diagram stays on the concept**, or the prose names the path that matters. - **Only the value statement before the first heading.** The concept opener slot is gone. The page opens with what the reader can decide and an optional cross-reference to a sister page, and the first H2 says what the concept is, so the definition sits under a heading a reader can scan to. - **Comparison headings are `X vs Y`.** Most existing guide headings already use it, such as `## JSON vs JSONB`. `WORD_LIST.md` now says so under _versus_, and prose keeps _versus_. - **Tables and lists come first.** Comparisons on shared attributes go in a table and parallel facts go in a list, with prose kept for the reasoning that connects them. - **One optional everyday-life analogy**, such as a music festival for Auth. It's framed as a comparison, with _like_ or _similar to_, because no analogy is exact. It names only the one or two pieces that connect it, so the reader gets a mental model rather than a second explanation, and it comes after the literal explanation, so it doesn't conflict with [Avoid idioms and colloquialisms](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/01-voice-and-tone.md#avoid-idioms-and-colloquialisms). To read the whole stack in one diff: ```bash git diff master...docs/explainer-rework-batch-2 ``` ### Preview The style guide isn't served on the docs site, so these link to the rendered files on the branch. | File | Preview | | --- | --- | | Explainer template | [`templates/explainer.md`](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/templates/explainer.md) | | Template router | [`03-page-structure.md`](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/03-page-structure.md#choose-a-template) | ## Review instructions 1. Open `apps/docs/style-guide/templates/explainer.md` and check that it is 90 lines or fewer. 2. In `03-page-structure.md`, check that the explainer row in **Choose a template** links to the new file. 3. Pick a concept page, such as `content/guides/platform/regions.mdx`, and check that the template fits it without padding. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
Supabase documentation style guide
Welcome to the documentation style guide. This is a living document that serves as the evolving source of truth for:
- Our Supabase voice and our audience
- The structure of our technical documents
- How we consistently talk about our product
This guide is for everyone who is writing to help Supabase users. It can be used by anyone who writes for Supabase, no matter your role or whether you are an employee or open source contributor.
The style guide is also for both humans and LLMs: our SKILLS use the style guide, but the style guide is also human-readable and friendly. Much of this guide is dedicated to removing AI smells such as verbosity and overused asides.
We encourage you to contribute to the style guide so that we write the best documentation for Supabase. If something consistently bothers you, it may bother others as well. That could be an inconsistently used term or an unnecessarily verbose writing pattern. Open a style guide PR and start the discussion.
Navigation
The files in the style guide are numbered in the order of content size. It starts with
the smallest piece, at the word level, then progresses to the sentence, the element,
and the whole page. WORD_LIST is unnumbered and a master document for our word
consistency decisions.
| File | Covers |
|---|---|
WORD_LIST.md |
Terminology, spelling, capitalization |
01-voice-and-tone.md |
Person, tense, sentence length, brevity |
02-elements.md |
Admonitions, code blocks, procedures, tabs, images |
03-page-structure.md |
Document type, section grouping, chunking |
templates/ |
Page structures for the page types that have one |
Before you open a pull request
Always run WORD_LIST.md against the finished page. We removed any
linter and instead entrust you to use the word list.
You can run /review-the-docs for a local self-review, and /test-the-docs if the page
contains runnable snippets.
If you drafted with an agent
Run a critic pass. Open a subagent with a clean context, holding only the relevant guide files and the draft text, and give it this instruction:
Referencing the docs style guide, cite every rule violation in the draft. Quote the offending phrase and cite the rule it breaks as
file#anchor, for example03-page-structure.md#chunking. Derive the anchor from the heading itself, and ignore headings inside fenced code blocks, which are examples rather than rules. Then resolve.
Each citation has to resolve to a real heading in the guide. One that doesn't is an invented rule, so check the citations before you act on them.
References
- For spelling, see Merriam-Webster.com
- For accessible writing, see Google's accessibility guidance
- For gaps, see Google developer documentation style guide
- For an additional developer guide reference, see Microsoft Writing Style Guide