Quick Start
This guide will help you quickly customize this documentation template for your specific project.
Step 1: CI/CD Setup
Section titled “Step 1: CI/CD Setup”Before customizing content, set up deployment:
GitLab CI/CD
Section titled “GitLab CI/CD”This template includes a GitLab CI/CD configuration that automatically deploys your documentation to Cloudflare Pages. When you push changes to your repository, the pipeline builds and deploys your site.
For more detailed information about deployment options and advanced configurations, see the deployment guide.
Environment Variables
Section titled “Environment Variables”Configure these in GitLab (Settings > CI/CD > Variables):
CLOUDFLARE_PAGES_PROJECT- Your page project nameCLOUDFLARE_API_TOKEN- API token with Pages permissionsCLOUDFLARE_ACCOUNT_ID- Your Cloudflare account IDWEBSITE_PASSWORD- Optional password protection
Cloudflare Pages
Section titled “Cloudflare Pages”- Create a new Pages project in Cloudflare Dashboard
- Name it the same as your
CLOUDFLARE_PAGES_PROJECTvariable - Push to GitLab to trigger first deployment
Step 2: Update Site Configuration
Section titled “Step 2: Update Site Configuration”The main configuration is in astro.config.mjs. Update this file to configure the sidebar, pages, page title and social url’s
Step 3: Update Package Information
Section titled “Step 3: Update Package Information”Update the package.json file:
{ "name": "your-project-docs", "description": "Documentation for your project"}Step 4: Update Content
Section titled “Step 4: Update Content”Home Page
Section titled “Home Page”Edit src/content/docs/index.mdx to reflect your project:
- Update the title and tagline
- Replace the image if wanted
- Update the action buttons
- Customize the feature cards
Navigation
Section titled “Navigation”Update the sidebar in astro.config.mjs:
sidebar: [ { label: 'Getting Started', items: [ { label: 'Introduction', slug: 'getting-started/introduction' }, { label: 'Installation', slug: 'getting-started/installation' }, ], }, { label: 'User Guide', autogenerate: { directory: 'user-guide' }, }, // Add more sections as needed],Step 4: Create Your Content
Section titled “Step 4: Create Your Content”Adding Pages
Section titled “Adding Pages”Create new .md or .mdx files in src/content/docs/:
---title: Your Page Titledescription: Brief description of the page content---
# Your Page Title
Your content goes here...Organizing Content
Section titled “Organizing Content”Organize your content in folders:
src/content/docs/├── getting-started/│ ├── introduction.md│ └── installation.md├── user-guide/│ ├── basic-usage.md│ └── advanced-features.md└── api/ ├── authentication.md └── endpoints.mdStep 5: Development Workflow
Section titled “Step 5: Development Workflow”Local Development
Section titled “Local Development”# Install dependenciespnpm install
# Start development serverpnpm dev
# Build for productionpnpm build
# Preview production buildpnpm previewAdding Dependencies
Section titled “Adding Dependencies”# Add a new dependencypnpm add package-name
# Add a dev dependencypnpm add -D package-nameAdding Search
Section titled “Adding Search”Search is enabled by default. To customize search behavior, check the Starlight search documentation.
Need Help?
Section titled “Need Help?”- Check the template’s README for more details
- Refer to Starlight documentation