docmd compiles static documentation sites into self-contained output directories (default: site/) that require zero server-side runtimes.

npx @docmd/core build

Choosing a Deployment Method

Select a deployment pattern based on infrastructure needs:

Strategy Primary Use Case Target Destination
Starter Template Rapid creation of new repositories with pre-configured GitHub Actions. GitHub Pages
GitHub Action Automated CI/CD integration for existing source repositories. GitHub Pages / Custom CI
Deployer CLI Tool Automated generation of server configurations and container files. Docker, NGINX, Caddy, Vercel, Netlify

Starter Template

The fastest path for standalone documentation projects. Clone the official template repository containing a default docmd.config.json, sample pages, and a pre-configured GitHub Actions workflow for automated deployments on push.

Starter Template Guide

GitHub Action

The docmd-io/deploy GitHub Action compiles your documentation and exposes the output directory path for downstream publishing steps. Use this to integrate docmd into existing CI/CD pipelines without modifying project file structures.

GitHub Action Guide

Deployer Tool

The deploy command parses your docmd.config.json configuration and generates production-ready configuration files tailored to your project settings, SPA routing preferences, and asset directories:

# Self-hosted infrastructure
npx @docmd/core deploy --docker          # Multi-stage Dockerfile + .dockerignore
npx @docmd/core deploy --nginx           # Production NGINX configuration
npx @docmd/core deploy --caddy           # Caddyfile with automatic HTTPS

# Cloud & Serverless Platforms
npx @docmd/core deploy --github-pages    # GitHub Actions workflow
npx @docmd/core deploy --vercel          # vercel.json configuration
npx @docmd/core deploy --netlify         # netlify.toml configuration

Deployer CLI Reference

Supported Hosting Platforms

  • Docker Image — Official multi-architecture image for containerised environments.
  • NGINX — Self-hosted reverse proxy configuration.
  • Caddy — Self-hosted web server with automatic TLS certificate management.
  • Vercel — Cloud deployment configuration with static asset optimization.
  • Netlify — Git-backed continuous deployment.
  • Cloudflare Pages — Edge-native static site hosting with integrated CI/CD.
  • Firebase Hosting — Google CDN deployment with GitHub Actions integration.

Production Checklist

  1. Canonical Site URL: Specify url in docmd.config.json to generate accurate canonical tags, open graph URLs, and sitemap entries.
  2. Path Redirects: Preserve legacy URL paths during migration using the redirects config.
  3. Analytics Integration: Enable the analytics plugin to track visitor traffic and search metrics.
  4. AI Context Files: Enable the llms plugin to output machine-readable llms.txt and llms-full.txt files.
Custom 404 Pages

docmd compiles a standalone 404.html page into your site output root. Most static hosts serve this file automatically for unmapped routes.