AddThisFeature

Documentation Site

Publish structured docs with a nested sidebar, linkable headings, and selectable versions.

involved Content & Publishing

What it adds

A documentation site with a nested navigation tree, per-page heading anchors, and versioned content.

What your agent is told to do

5
  1. 1

    Define the sidebar tree explicitly as ordered content, not by inferring it from file names or page titles. An inferred tree silently drops pages when someone renames one.

  2. 2

    Generate an anchor for every heading and derive it from the heading text, but store the anchor once it has been published so renaming the heading does not break links people have already shared.

  3. 3

    Reuse the app's existing table of contents behaviour for the in-page heading list rather than writing a second scroll-spy, and reuse the existing search rather than adding a docs-only one.

  4. 4

    Make versioning a property of the whole documentation set with one current version and a small number of archived ones. Do not build per-page version branching until there is a real need for it.

  5. 5

    Do not paste examples in as screenshots. Code and configuration must be selectable text so a reader can copy it, and must carry a language label for syntax rendering.

Edge cases it handles

8
  • A page that exists in the content store but sits nowhere in the sidebar tree is unreachable by browsing. Surface those orphans to authors rather than letting them go quietly missing.
  • Renaming a heading changes its anchor and silently breaks every deep link to that section. Keep the previous anchor as an alias on the same heading.
  • A reader on an older version who follows a link to a page that only exists in the latest version must be told the page is not in their version and offered the latest, not dropped on a not-found page.
  • Long code blocks must scroll horizontally inside their own container. The page body itself must never scroll sideways on a phone.
  • Arriving from a deep link must open the sidebar to the section containing that page and scroll it into view, otherwise the reader has no idea where they are in the tree.
  • Switching versions from a page should land on the same page in the target version when it exists, and on that version's index when it does not.
  • Search results must be scoped to the selected version, or readers will keep landing on documentation for software they are not running.
  • The archived versions must carry a visible notice that they are not current, with a link to the latest.

Definition of done

9
  • The sidebar renders a nested tree with the current page and its ancestors expanded.
  • Every heading has a copyable anchor link, and previously published anchors keep working after a rename.
  • Version switching preserves the current page when it exists in the target version.
  • Code blocks scroll within their container and the page never scrolls horizontally at 320px.
  • Search results are limited to the selected version.
  • Pages absent from the navigation tree are reported to authors.
  • Archived versions display a notice pointing to the current version.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.