Managing Documentation Files
How to add, update, and organize markdown documentation so it appears in the VibeCodex webapp.
Managing Documentation Files in VibeCodex
This guide explains how to add, update, and organize markdown (.md
) documentation files so they automatically appear in the VibeCodex webapp sidebar and documentation system.
๐ Where to Place Documentation Files
- Project-wide docs (e.g.,
CONTRIBUTING.md
,SECURITY.md
,SUPPORT.md
,CHANGELOG.md
,CODE_OF_CONDUCT.md
,CODE_OF_MERIT.md
,LICENSE
,README.md
):- Place these in the project root (top-level of your repository).
- Feature, guide, or reference docs:
- Place these in the
docs/
directory or any subfolder (e.g.,docs/guides/
,docs/reference/
).
- Place these in the
๐ How to Add a New Doc
-
Create a new
.md
file in the project root or inside thedocs/
directory (or a subfolder). -
Add frontmatter at the top of the file for sidebar clarity:
--- title: "Your Doc Title Here" description: "(Optional) Short description for SEO and sidebar." --- # Your Doc Title Here ...
- The
title:
is required for a clean sidebar label. - The
description:
is optional but recommended for SEO and page metadata.
- The
-
Write your documentation using standard Markdown. Use triple backticks and specify the language for all code blocks:
// Good code block example function hello() { console.log("Hello, world!"); }
-
Add a navigation link at the end for consistency:
## [Back to Docs Index](/docs)
-
Save the file.
๐ How the Sidebar Works
- The sidebar is fully automatic. It scans:
- All
.md
files in the project root (exceptREADME.md
) - All
.md
files in thedocs/
directory and its subfolders
- All
- The sidebar uses the
title:
from frontmatter for display. If missing, it falls back to the filename. - The order is determined by the
order:
property in frontmatter (if present), then alphabetically.
๐๏ธ How to Remove a Doc
- Delete the
.md
file from the project root ordocs/
directory. - The sidebar and docs system will update automatically.
โ๏ธ How to Change a Sidebar Label
- Edit the
title:
in the frontmatter of the.md
file. - Save the file. The sidebar will update on the next reload.
๐ซ How to Hide a Root Doc from the Sidebar
- Add its filename to the
EXCLUDED_ROOT_DOCS
array inlib/getDocsTree.ts
. - This is only needed for root-level docs (not for files in
docs/
).
๐งน Best Practices
- Always use a
title:
in frontmatter for every doc. - Use triple backticks and specify the language for all code blocks.
- Add a "Back to Docs Index" link at the end of every doc.
- Avoid duplicate docs with the same purpose.
- Organize feature or guide docs in subfolders under
docs/
for clarity.
๐ Example: Adding a New Guide
- Create a file:
docs/guides/my-new-guide.md
- Add frontmatter:
--- title: "My New Guide" description: "How to use the new feature." --- # My New Guide ...
- Write your content and code blocks.
- Add:
## [Back to Docs Index](/docs)
- Save. Your guide will now appear in the sidebar under "guides".
Back to Docs Index
Last updated: Recently