Getting Started
Step-by-step guide to setting up and running the Forge 42 documentation template.
Prerequisites
- Node.js 18+ and pnpm installed
- Git for version control
- A repository where you want to add documentation
Installation
Monorepo Structure (Recommended)
If you're using a monorepo, place the docs-template under a /docs folder:
your-monorepo/ packages/ your-package/ docs/ Unzip template here app/ content/ package.json package.jsonSingle Repository Structure
For a single repository, unzip the template into a /docs folder:
your-repo/ src/ docs/ Unzip template here app/ content/ package.json package.jsonSetup Steps
1. Install Dependencies
From your repository root:
pnpm install2. Configure Environment Variables
Copy .env.example to .env:
cd docscp .env.example .envEdit .env and add your repository details.
These variables enable "Edit this page" and "Report an issue" links.
3. Start Development Server
pnpm run devYour documentation will be available at http://localhost:4280
4. Test with Sample Content
The template comes with sample content. Browse through it to understand the structure, then replace it with your own documentation.
Development Workflow
During development, the template uses the .content-collections folder (auto-generated) for live reloading. You can edit MDX files and see changes instantly without restarting the server.
Key Commands
# Start dev serverpnpm run dev# Build for productionpnpm run build# Generate versioned docs (production)pnpm run generate:docs# Generate versioned docs with specific versionspnpm run generate:docs -- --versions# Rebuild content collectionspnpm run content-collections:buildNext Steps
- Review the sample content in the
content/folder - Understand the project structure to know where everything lives
- Learn content organization to structure your documentation properly
- Set up deployment when ready to go live
Now you're ready to start writing documentation!