Tender Zen Documentation
This directory contains the VitePress documentation for Tender Zen. The documentation is configured as an independent package that can be deployed separately from the main application.
Development
Local Development
From the repository root:
npm run docs:devOr from this directory:
npm install
npm run devThe documentation will be available at http://localhost:5173.
Build Locally
From the repository root:
npm run docs:buildOr from this directory:
npm install
npm run buildThe built site will be in .vitepress/dist.
Preview Production Build
From the repository root:
npm run docs:previewOr from this directory:
npm run previewVercel Deployment
Setup Instructions
Create a new Vercel project for the documentation
Configure the following settings:
- Root Directory:
docs - Framework Preset: VitePress
- Build Command:
npm run build(auto-detected) - Output Directory:
.vitepress/dist(auto-detected) - Install Command:
npm install(auto-detected)
- Root Directory:
Configure deployment branches (optional):
- Production Branch:
main - Enable automatic deployments for pull requests
- Production Branch:
Vercel Configuration
The documentation is configured as a standalone package with its own package.json. This ensures:
- Fast builds: Only VitePress dependencies are installed (~50MB vs ~500MB+ for the full app)
- Efficient deployments: Vercel only rebuilds when files in the
/docsdirectory change - Clean separation: Documentation is independent from the main application
Environment Variables
No environment variables are required for the documentation site.
Project Structure
docs/
├── .vitepress/
│ ├── config.ts # VitePress configuration
│ ├── theme/ # Custom theme files
│ │ ├── index.ts # Theme entry point
│ │ └── style.css # Custom styles
│ ├── cache/ # Build cache (gitignored)
│ └── dist/ # Build output (gitignored)
├── .gitignore # Ignores node_modules, cache, dist
├── package.json # Independent package configuration
├── README.md # This file
├── index.md # Documentation home page
└── *.md # Other documentation pagesMaintenance
Updating VitePress
To update VitePress to the latest version:
cd docs
npm update vitepressAdding Dependencies
If you need to add additional VitePress plugins or dependencies:
cd docs
npm install <package-name> --save-devTroubleshooting
Build Fails on Vercel
- Verify the root directory is set to
docs - Check that the build command is
npm run build - Ensure the output directory is
.vitepress/dist - Review the Vercel build logs for specific errors
Local Development Issues
- Ensure you've run
npm installin the/docsdirectory - Clear the cache:
rm -rf .vitepress/cache - Try removing
node_modulesand reinstalling:rm -rf node_modules && npm install
Changes Not Reflected
- For development: The dev server should hot-reload automatically
- For production: Clear the
.vitepress/cachedirectory and rebuild