An Astro-based documentation site for swiftDialog, built with Starlight theme and optimized for Cloudflare Pages deployment.
# Install dependencies
pnpm install
# Start development server
pnpm run dev
# Build for production
pnpm run build
# Preview production build
pnpm run preview- Push this repository to GitHub
- Go to Cloudflare Dashboard > Pages
- Click "Create a project" > "Connect to Git"
- Select your repository
- Configure build settings:
- Build command:
npm run build - Build output directory:
dist - Environment variables:
NODE_VERSION = 20
- Build command:
- Click "Save and Deploy"
# Build the site
npm run build
# Deploy to Cloudflare Pages (requires wrangler CLI)
npx wrangler pages deploy dist --project-name=swiftdialog-docsEdit astro.config.mjs to update:
- Site title and description
- Navigation structure
- Social links
- Custom theme settings
The site uses a lightly customized version of Starlight's default theme.
Edit src/styles/dialog-theme.css to modify:
- Colors (light and dark mode)
- Typography
- Spacing
- Component styles
All documentation content is in src/content/docs/:
- Markdown files with frontmatter
- Organized by category folders
- Supports MDX for interactive components
astro-dialog/
├── public/ # Static assets
├── src/
│ ├── assets/ # Images processed by Astro
│ ├── content/
│ │ └── docs/ # Documentation markdown files
│ └── styles/
│ └── dialog-theme.css # Custom theme
├── astro.config.mjs # Astro configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── wrangler.toml # Cloudflare Pages configuration
MIT License
Note: This documentation conten is part of the swiftDialog project.