Set up the workspace

Start by keeping the docs shell consistent across every page. Reuse the same header, footer, search overlay, and docs layout so the sidebar can move between pages without any conditional markup.

Each docs page only needs one extra signal: a data-docs-page identifier on the body so the shared sidebar knows which entry is active.

Page metadata

  • Add a stable page key to the body element.
  • Keep the sidebar and TOC containers present on every docs page.
  • Let the shared script handle active links and heading anchors.

Write the content

The left sidebar now represents documentation structure, not just a scan of the current page headings. That means page titles and group labels stay consistent while the article body stays free to evolve.

Content guidelines

  1. Use clear H2 sections for major ideas.
  2. Use H3 headings for subtopics that deserve anchor links.
  3. Keep titles short so the sidebar remains readable.

Publish check

Before publishing, open the page once on mobile and once on desktop. Confirm the left sidebar highlights the current page, the nested section links follow scroll position, and the right TOC only appears on larger screens.