Skip to content

Quick Start

This guide will help you quickly customize this documentation template for your specific project.

Before customizing content, set up deployment:

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.

Configure these in GitLab (Settings > CI/CD > Variables):

  • CLOUDFLARE_PAGES_PROJECT - Your page project name
  • CLOUDFLARE_API_TOKEN - API token with Pages permissions
  • CLOUDFLARE_ACCOUNT_ID - Your Cloudflare account ID
  • WEBSITE_PASSWORD - Optional password protection
  1. Create a new Pages project in Cloudflare Dashboard
  2. Name it the same as your CLOUDFLARE_PAGES_PROJECT variable
  3. Push to GitLab to trigger first deployment

The main configuration is in astro.config.mjs. Update this file to configure the sidebar, pages, page title and social url’s

Update the package.json file:

{
"name": "your-project-docs",
"description": "Documentation for your project"
}

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

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
],

Create new .md or .mdx files in src/content/docs/:

---
title: Your Page Title
description: Brief description of the page content
---
# Your Page Title
Your content goes here...

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.md
Terminal window
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview
Terminal window
# Add a new dependency
pnpm add package-name
# Add a dev dependency
pnpm add -D package-name

Search is enabled by default. To customize search behavior, check the Starlight search documentation.