π Deployment Guide
Docsly supports both static and server-rendered (SSR) deployment thanks to Nuxt 3 and Nitro. This guide covers deployment on popular platforms.
π¨ Static vs SSR
- Static (recommended): Pre-renders HTML. Fast and CDN-friendly.
- SSR (optional): Renders on the server at request time.
Use static export unless you need runtime data or dynamic routes.
π¦ Static Deployment
To generate static files:
pnpm build
pnpm generate
This will output your site into the .output/public or dist/ directory depending on your setup.
β Platforms
Vercel
- Connect your GitHub repo
- Set framework as Nuxt 3
- Vercel detects
nuxt generate
Netlify
- Connect Git repo
- Set build command:
pnpm generate - Set publish directory:
.output/public
GitHub Pages
git add dist -f
git commit -m "deploy"
git subtree push --prefix dist origin gh-pages
You may need to configure routing with
router.baseinnuxt.config.ts.
Cloudflare Pages
- Framework: Nuxt 3
- Build command:
pnpm generate - Output folder:
.output/public
π Custom Domains
All platforms above support adding a custom domain and configuring HTTPS automatically.
For example, on Netlify:
- Add your domain in Site Settings
- Update DNS to point to Netlify nameservers
βοΈ Environment Variables
For example, define your base URL:
NUXT_PUBLIC_SITE_URL=https://docs.example.com
This gets injected via Nuxtβs runtime config.
π Preview Builds
Both Netlify and Vercel support preview deployments on pull requests by default. This helps you test changes in staging before merging to main.
β You're Live!
Congrats! Your Docsly documentation site is now live.