mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0708fbf556 |
docs: add the quickstart template to the style guide (#54496)
Closes DOCS-1609 ## Problem Quickstart pages have no template in the style guide. ## Solution - **Template:** add `templates/quickstart.md`. Its outline gives each numbered step a fixed heading ID, such as `[#query-data]`. - **Router:** add the quickstart row to Choose a template in `03-page-structure.md`. - **Old contract:** delete `quickstarts/_template.mdx`. ## Preview links The style guide isn't served on the docs site, so these link to the files on the branch. | File | Preview | | --- | --- | | Quickstart template | [`templates/quickstart.md`](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/templates/quickstart.md) | | Template router | [`03-page-structure.md`](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/03-page-structure.md#choose-a-template) | ## Review category (docs PRs only) <!-- If this PR changes docs and you're on the Supabase team, select one category. PRs from forks are always reviewed as Low, so you can skip this section. --> - [ ] Critical: needs a review as soon as possible - [ ] Urgent: the feature ships soon, or it's blocking something else - [ ] Moderate: good to have soon, not urgent - [ ] Low: get to it when you can ## Review instructions 1. Open the quickstart template preview and read it. 2. Compare its outline with [Use Supabase with React](https://supabase.com/docs/guides/getting-started/quickstarts/reactjs). The headings match, except for the IDs. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] 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) |
||
|
|
6649b95e87 |
docs: add the explainer template to the style guide (#53751)
## 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) |
||
|
|
81d5e239e2 |
docs(style-guide): add how-to guide template (#53648)
Closes DOCS-1608 ## Problem We do not have a template for the most common and important type of content we have: the procedure. ## Solution This PR introduces our first template: the how-to. This also includes the scaffolding needed for all other templates, including a template-selection table and wiring into our docs-writing skills. ## Preview links The style guide isn't served by the docs site, so the table links the changed files on `master` and on this branch instead. | Site | Live | Preview | Search for | | ---- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | Docs | [03-page-structure.md](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/03-page-structure.md) | [03-page-structure.md](https://github.com/supabase/supabase/blob/docs/how-to-template/apps/docs/style-guide/03-page-structure.md) | `Choose a template` | | Docs | Not on `master` | [templates/how-to-guide.md](https://github.com/supabase/supabase/blob/docs/how-to-template/apps/docs/style-guide/templates/how-to-guide.md) | `How-to guide template` | ## Review instructions 1. Open `templates/how-to-guide.md` from the preview link and confirm it's 80 lines or fewer and makes sense without other files. 2. Follow the new links in `03-page-structure.md`, the style-guide README, and the three skills, and confirm each resolves. 3. Run `pnpm test:prettier` and confirm it passes. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] 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) |