Skip to content
published Visibility internal Owner erik@uvilo.com Approver _ Created _ Updated _

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.

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.

FileSlug
Product/Projects/Taxonomy/Taxonomy_Spec.mdproduct/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:

---
title: "Department Name Topic"
visibility: internal
status: published
owner: "erik@uvilo.com"
approver: ""
lastUpdated: 2026-04-26
---

Allowed values:

  • visibility: internal/public
  • status draft/review/approved/published/archived
  • owner valid 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.mjs in a single git 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:

{
  label: 'New Group Name',
  collapsed: true,
  items: [
    { slug: 'path/to/first_page' },
  ],
},

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

  1. Run the generator:

    cd .internal && npm run generate
  2. Review .generated/sidebar-additions.md for new slugs that need sidebar entries in astro.config.mjs.

  3. Add any new slugs to the appropriate group in the sidebar array.

  4. Run the build to verify:

    cd .internal && pnpm run build

What the Generator Produces

CategoryOutputCommitted?
File-view pagesReadable pages for .ts, .json, .py, etc. (in .generated/)No (gitignored)
MEDIA.mdGallery pages for image foldersYes

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.