Rename and Restructure Categories
Adjust category labels, slugs, and grouping in Compass without losing track of how routes are generated.
One of the first real customization steps in Compass is replacing the sample category structure with the one your team actually needs.
Where category structure lives
The source of truth for docs organization is src/data/docs.ts.
That file defines:
- parent groupings such as
Getting Started - sub-categories such as
Start Here - slugs used for routes
- descriptions shown in cards and section pages
- icons used on the homepage
Rename a category label
If you only want to change how a category is displayed, update the name field.
For example, you might rename:
name: 'Start Here'
to:
name: 'Quickstart'
That changes the UI label without changing the underlying slug.
Change a category slug
If you change a slug, you should also update the matching content folder and any links that point to those articles.
For example, changing:
slug: 'start-here'
means you should also rename:
src/content/docs/start-here
to the new slug-based folder name.
Move content between parent groups
Each category also has a parent field. Updating that value changes which top-level homepage section and parent route the category belongs to.
That means you can:
- move a category from
getting-startedtointegrations - split a broad category into smaller sections
- create a more product-specific docs model
Keep routes and content aligned
When restructuring categories, confirm all three of these still agree:
- The category slug in
src/data/docs.ts - The folder name inside
src/content/docs - The
categoryvalue in each article’s frontmatter
If one of them falls out of sync, the article may stop appearing where you expect.
Safe restructuring workflow
Use a small sequence of edits:
- Update the category definition in
src/data/docs.ts - Rename the matching folder in
src/content/docs - Update the
categoryfrontmatter in affected articles - Run
npm run check - Preview the affected routes locally
This keeps the change easy to review and easier to debug if a route moves unexpectedly.