This file provides guidance for AI coding agents working with the Velopack documentation repository.
This repository contains the official documentation website for Velopack, an installer and auto-update framework for cross-platform desktop applications. The site is built using Docusaurus 3, a modern static site generator.
Live Site: https://docs.velopack.io/
velopack.docs/
├── docs/ # Main documentation content (MDX files)
│ ├── index.mdx # Landing page
│ ├── getting-started/ # Quick-start guides for different languages
│ ├── integrating/ # SDK integration guides
│ ├── packaging/ # Building releases with vpk
│ ├── distributing/ # Deployment guides
│ ├── migrating/ # Migration guides from other frameworks
│ ├── reference/ # API reference (auto-generated)
│ └── troubleshooting/ # FAQ and debugging guides
├── blog/ # Blog posts
├── src/ # Custom React components and CSS
│ ├── components/ # Reusable React components
│ ├── css/ # Custom stylesheets
│ └── theme/ # Docusaurus theme customizations
├── static/ # Static assets (images, logos, favicons)
├── generator/ # C# project for generating API reference docs
├── scripts/ # Build and deployment scripts
├── docusaurus.config.ts # Main Docusaurus configuration
├── sidebars.ts # Sidebar navigation structure
└── package.json # Node.js dependencies and scripts
- Framework: Docusaurus 3.8.1
- Runtime: Node.js 18+
- Language: TypeScript/JavaScript (site), MDX (documentation)
- Package Manager: npm or yarn
- Reference Generator: C# (.NET) for auto-generating API documentation
# Install dependencies
npm install
# Start development server (http://localhost:3000)
npm run start
# Build for production
npm run build
# Serve production build locally
npm run servenpm run start- Start Docusaurus dev server with hot reloadnpm run build- Build static site tobuild/directorynpm run serve- Serve production build locallynpm run clear- Clear Docusaurus cachenpm run typecheck- Run TypeScript type checking
The repository includes preconfigured VS Code tasks:
- Start Docusaurus Dev Server - Install dependencies and start dev server
- Install dependencies - Run npm install
Documentation is written in MDX (Markdown with JSX support), allowing you to:
- Use standard Markdown syntax
- Import and use React components
- Add interactive examples and demos
- Tutorials/Guides: Place in appropriate subdirectory under
docs/ - Blog Posts: Add to
blog/with YYYY-MM-DD format or subdirectories - API Reference: Auto-generated; don't edit directly (see Reference Generation below)
Add metadata to docs using frontmatter:
---
title: Page Title
sidebar_label: Short Label
sidebar_position: 1
disable_comments: true
---The site includes custom React components in src/components/. Notable examples:
<FancyStep>- Styled step-by-step instructions- Standard Docusaurus components like
<DocCardList>
API reference documentation is auto-generated from source code in the main Velopack repository.
- Location:
generator/directory - Language: C# (.NET)
- Purpose: Extracts API documentation and generates MDX files
The following reference docs are auto-generated:
- C# API Reference:
docs/reference/cs/ - CLI Reference:
docs/reference/cli/ - C++ Reference:
docs/reference/cpp/ - JavaScript Reference:
docs/reference/js/
cd generator
dotnet runThis updates all auto-generated reference documentation.
Main configuration including:
- Site metadata (title, tagline, URL)
- Theme configuration (navbar, footer, color modes)
- Plugins (search, redirects, analytics)
- Deployment settings
Defines the documentation sidebar navigation structure. Docusaurus supports:
- Auto-generated sidebars from directory structure
- Manual sidebar configuration
- Category grouping and custom ordering
- Create MDX file in appropriate
docs/subdirectory - Add frontmatter with title and metadata
- Update
sidebars.tsif manual ordering is needed - Test locally with
npm run start
- Locate the MDX file in
docs/directory - Edit content (preserve frontmatter)
- Verify links and references are valid
- Check for broken Markdown links (enforced by
onBrokenMarkdownLinks: 'throw')
- Create directory in
blog/with format:YYYY-MM-DD-slug/ - Add
index.mdorindex.mdxwith frontmatter - Include author information in
blog/authors.yml
- Edit
docusaurus.config.tsfor site-wide settings - Edit
sidebars.tsfor navigation structure - Rebuild site to see changes
- Custom components go in
src/components/ - Import in MDX files:
import Component from '@site/src/components/Component' - Theme overrides go in
src/theme/
Velopack supports multiple programming languages. When adding documentation:
| Language | Status | Quick-Start Path | Reference Path |
|---|---|---|---|
| C# | ✅ Ready | docs/getting-started/csharp.mdx |
docs/reference/cs/ |
| Rust | ✅ Ready | docs/getting-started/rust.mdx |
- |
| JavaScript | ✅ Ready | docs/getting-started/javascript.mdx |
docs/reference/js/ |
| C++ | ✅ Ready | docs/getting-started/cpp.mdx |
docs/reference/cpp/ |
| Python | ✅ Ready | docs/getting-started/python.mdx |
- |
- Internal docs: Use relative paths:
[text](./page.mdx)or[text](../category/page.mdx) - External: Use full URLs:
[text](https://example.com) - Broken links: Will cause build to fail (enforced by config)
Use language-specific syntax highlighting:
```csharp
// C# code example
```
```bash
# Shell commands
```Old URLs are redirected in docusaurus.config.ts:
redirects: [
{ from: '/old-path', to: '/new-path' },
]Add new redirects when moving/renaming pages.
- Build succeeds:
npm run build(catches broken links, invalid config) - TypeScript checks:
npm run typecheck - Visual review: Test on dev server (
npm run start) - Search works: Verify search index includes new content
The configuration includes strict checks:
onBrokenLinks: 'throw'- Broken internal links fail the buildonBrokenMarkdownLinks: 'throw'- Invalid Markdown links fail the build
The site is deployed automatically via CI/CD. Deployment configuration is in docusaurus.config.ts:
url: 'https://docs.velopack.io/',
baseUrl: '/',
organizationName: 'velopack',
projectName: 'velopack.docs',Search is powered by @easyops-cn/docusaurus-search-local:
- Automatically indexes all documentation
- Blog posts are excluded from indexing
- Reference documentation is excluded via regex pattern
- Search index is built during
npm run build
- Documentation edits have "Edit this page" links pointing to GitHub
- Reference pages cannot be edited (auto-generated)
- Follow existing structure and conventions
- Test locally before committing
- Ensure builds pass without errors
- Docusaurus Docs: https://docusaurus.io/docs
- Velopack Main Repo: https://github.com/velopack/velopack
- Discord Community: https://discord.gg/CjrCrNzd3F
- Live Documentation: https://docs.velopack.io/
- Do not edit auto-generated reference docs - They're regenerated from source code
- Respect the MDX format - Maintain frontmatter and JSX syntax
- Test builds locally - Strict link checking will fail CI if broken
- Follow existing patterns - Match the style and structure of existing docs
- Update sidebars.ts - If adding new sections or changing navigation
- Use TypeScript - Configuration files use TypeScript for type safety
- Check package.json - For correct commands and dependencies
- Preserve React components - Don't convert JSX to plain Markdown if components are used
- Build fails on broken links: Check
npm run buildoutput for specific broken links - Search not working: Rebuild with
npm run buildto regenerate search index - Dev server issues: Clear cache with
npm run clearand restart - Missing dependencies: Run
npm installto ensure all packages are installed - TypeScript errors: Run
npm run typecheckto see type issues
- Check existing documentation structure for examples
- Review Docusaurus documentation for framework-specific questions
- Join Velopack Discord for project-specific questions