Manage Pages
When to Use
- When folders or files need to be created, renamed, moved, or deleted
- When front matter needs updating
- When reorganizing the sidebar structure
- After modifying non-markdown files (to update file-view pages)
- After modifying image files (to regenerate MEDIA.md)
- After changing
view_folder_config.json(e.g., changing supported extensions or directories) - When the build fails due to stale generated pages
Document structure and naming
Before changing files or the sidebar, follow “Forge Document Structure” below for folder hierarchy, file naming, frontmatter titles and heading 1, sidebar labels, department order, and canonical ordering inside departments, projects, functions, and skills folders.
Sidebar Configuration
All sidebar entries are explicit { slug: '...' } references in .internal/astro.config.mjs. Starlight’s autogenerate does not work with our custom glob loader.
Slug Generation
The generateId function in .internal/src/content.config.ts takes the file path relative to the repo root, strips the .md extension, and lowercases it.
| File | Slug |
|---|---|
Product/Projects/Taxonomy/Taxonomy_Spec.md | product/projects/taxonomy/taxonomy_spec |
Product/Projects/Domain_Quiz/Scripts/life-domain-quiz-qc.ts (file-view) | product/projects/domain_quiz/scripts/life-domain-quiz-qc.ts.view |
Adding a New Page
1. Create the file
Place and name the page per Forge Document Structure. Every page requires the following frontmatter fields:
Allowed values:
visibility: internal/publicstatusdraft/review/approved/published/archivedownervalid username
2. Update the sidebar
Add { slug: '<lowercase-path-without-extension>' } to the correct group in astro.config.mjs
3. Commit changes
- Build to verify:
cd .internal && pnpm run build - Stage new/modified files and
astro.config.mjsin a singlegit add - Commit all files together
- Push to origin
These three steps are atomic. Do not commit after step 1 or 2, then commit once. If the build in step 3 fails, fix before committing.
Adding a New Sidebar Group
Add a new object to the sidebar array:
File-View Pages
Non-Markdown files (.ts, .json, .py, .sh, .csv, .html) are displayed via auto-generated file-view pages in .generated/. These are rebuilt during every Astro build and are gitignored.
Markdown files (including SKILL.md) are included directly as content pages — no wrappers needed.
Running the Generator
-
Run the generator:
-
Review
.generated/sidebar-additions.mdfor new slugs that need sidebar entries inastro.config.mjs. -
Add any new slugs to the appropriate group in the sidebar array.
-
Run the build to verify:
What the Generator Produces
| Category | Output | Committed? |
|---|---|---|
| File-view pages | Readable pages for .ts, .json, .py, etc. (in .generated/) | No (gitignored) |
| MEDIA.md | Gallery pages for image folders | Yes |
Generator Config
Config: Forge/Skills/Manage_Pages/view_folder_config.json
Script: Forge/Skills/Manage_Pages/generate_view_pages.ts
Content Inclusion
Which files appear on the site is controlled by glob patterns in .internal/src/content.config.ts. All **/*.md files are included. Non-Markdown source files appear via .generated/ file-view wrappers. See Forge Content System for details.