Prompt file imported from arkitektio/arkitektio.github.io (
.github/prompts/new-doc-page.prompt.md). Copyright stays with the author.
New Documentation Page
Create a new documentation page in this Docusaurus project following the established conventions.
Gather inputs
Determine from the user's request:
- Title — the display title for the page.
- Section — which
docs/subdirectory it belongs to (e.g.design/services,apps/plugins,introduction/first_steps). If the section doesn't exist yet, create the directory. - Page type — one of:
- Leaf page — a single
.mdxfile (default). - Category index — an
index.mdx(orindex.md) that introduces a new sub-section.
- Leaf page — a single
- Sidebar position — a number controlling sort order among siblings. If not specified, look at existing siblings and pick the next available number.
- File extension —
.mdxif the page will use React/JSX components (imports, custom components),.mdif it's plain Markdown. Default to.mdx.
If any of these are ambiguous, infer reasonable defaults from the target section's existing pages rather than asking.
Conventions to follow
- Frontmatter — every page must start with YAML frontmatter:
---
id: <kebab-case-identifier>
title: "<Title>"
sidebar_label: "<Short Label>"
sidebar_position: <number>
---
- Sidebar — this project uses
autogeneratedsidebars, so ordering is controlled entirely bysidebar_positionin frontmatter. Do NOT editsidebars.js. - Category directories — when creating a new sub-section, provide either:
- An
index.mdxwith frontmatter (preferred in this project), or - A
_category_.jsonwithlabel,position, and optionally alinkfield.
- An
- Images / assets — place media files (
.png,.webm, etc.) next to the.mdxfile that references them, not instatic/. - Imports — for ideal images use
import Image from "@theme/IdealImage";. Only add imports when the page actually needs them.
Steps
- Determine the full file path under
docs/based on the section and page type. - Check existing siblings in the target directory to pick a sensible
sidebar_position. - Create the file with proper frontmatter and a starter body containing:
- A one-line description paragraph (placeholder if none given).
- An
## Overviewheading ready for content.
- If creating a new category, also ensure the parent directory exists and create the
index.mdxfor it. - Inspect similar existing pages in the target section to understand what the current implementations are like to inform the new page.
- Summarise what was created and where, so the user knows the next step is to fill in the content.
