๐ Documentation Website Setup
Your Diataxis-structured documentation is now ready to become a beautiful, searchable website using VitePress!
๐ Quick Startโ
Super Quick (1 minute)โ
cd docs
npm run setup
npm run dev
โ Open http://localhost:5173 to see your website!
Using Scripts (Advanced)โ
cd docs
./setup-website.sh setup # First-time setup
./setup-website.sh dev # Start development
Manual Stepsโ
cd docs
npm install # Install dependencies
npm run docs:dev # Start development server
npm run docs:build # Build for production
Full guide: See QUICK_START.md for all options
โจ What You Getโ
๐ฏ Perfect Diataxis Navigationโ
- Clear user paths based on goals (Learn/Solve/Lookup/Understand)
- Intuitive sidebar organized by documentation type
- Smart search across all 37 tools and concepts
๐ฑ Professional Designโ
- Responsive layout works perfectly on mobile and desktop
- Fast loading with optimized static site generation
- Accessible following web accessibility standards
๐ Powerful Featuresโ
- Full-text search with instant results
- Syntax highlighting for code examples
- Cross-references between related topics
- Edit links for community contributions
๐จ Customization Optionsโ
Theme Configurationโ
Edit ./.vitepress/config.js
to customize:
// Change colors, fonts, and layout
themeConfig: {
// Your customizations here
}
Add Custom Pagesโ
Create new .md
files in the docs directory and they'll automatically be included.
Modify Navigationโ
Update the sidebar configuration in config.js
to reorganize content.
๐ Deployment Optionsโ
Option 1: GitHub Pages (Recommended)โ
- Enable GitHub Pages in your repository settings
- Push to main branch - the website deploys automatically via GitHub Actions
- Access your site at
https://username.github.io/mcp-adr-analysis-server/
The GitHub Actions workflow is already configured in .github/workflows/docs.yml
Option 2: Vercelโ
- Connect your GitHub repo to Vercel
- Set build settings:
- Build Command:
cd docs && npm run docs:build
- Output Directory:
./.vitepress/dist
- Build Command:
- Deploy automatically on every push
Option 3: Netlifyโ
- Connect your GitHub repo to Netlify
- Set build settings:
- Build Command:
cd docs && npm run docs:build
- Publish Directory:
./.vitepress/dist
- Build Command:
- Deploy automatically on every push
Option 4: Self-Hostedโ
# Build the site
cd docs
npm run docs:build
# Serve with any web server
npx serve .vitepress/dist
# or
python -m http.server -d .vitepress/dist
๐ง Advanced Configurationโ
Custom Domainโ
If using a custom domain, update base
in config.js
:
export default defineConfig({
base: '/', // Change from '/mcp-adr-analysis-server/'
// ... rest of config
})
Analytics Integrationโ
Add Google Analytics or other tracking:
head: [
// Add analytics scripts here
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID' }],
['script', {}, `window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');`]
]
Search Enhancementโ
For even better search, consider integrating Algolia:
search: {
provider: 'algolia',
options: {
appId: 'YOUR_APP_ID',
apiKey: 'YOUR_SEARCH_API_KEY',
indexName: 'YOUR_INDEX_NAME'
}
}
๐ Performance Featuresโ
Built-in Optimizationsโ
- โก Fast builds with Vite's optimized bundling
- ๐ Lightning-fast loading with code splitting
- ๐ฑ Mobile optimized with responsive design
- ๐ SEO optimized with proper meta tags
Performance Monitoringโ
- Check Core Web Vitals in browser dev tools
- Use Lighthouse for performance audits
- Monitor bundle size with
npm run docs:build --debug
๐ ๏ธ Development Workflowโ
Local Developmentโ
# Start dev server (hot reload enabled)
npm run docs:dev
# Build and preview
npm run docs:build
npm run docs:preview
Content Updatesโ
- Edit markdown files in the docs directory
- See changes instantly with hot reload
- Commit and push to deploy automatically
Testingโ
# Build and test locally
npm run docs:build
npm run docs:preview
# Check for broken links
npx linkinator ./.vitepress/dist --recurse
๐ฏ SEO Optimizationโ
Your site is pre-configured for excellent SEO:
- โ Semantic HTML structure
- โ Meta descriptions for each page
- โ Open Graph tags for social sharing
- โ JSON-LD structured data
- โ XML sitemap generation
- โ Mobile-friendly responsive design
Enhance Furtherโ
- Add page-specific meta descriptions in frontmatter
- Include relevant images with alt text
- Use descriptive headings and structure
- Add internal links between related topics
๐ Troubleshootingโ
Common Issuesโ
Build fails with "Cannot resolve module"
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
Images not loading
- Ensure images are in
./public/
directory - Reference with
/image-name.jpg
(leading slash)
Search not working
- Ensure all markdown files have proper frontmatter
- Check for malformed markdown syntax
Styling issues
- Clear browser cache
- Check for CSS conflicts in custom styles
Getting Helpโ
- VitePress Docs: https://vitepress.dev/
- GitHub Issues: Report specific problems
- Community: Join VitePress Discord for quick help
โ Launch Checklistโ
Before going live:
- Test all navigation links work correctly
- Verify search finds relevant content
- Check mobile responsiveness
- Validate links with linkinator
- Test build process completes successfully
- Configure custom domain if needed
- Set up analytics tracking
- Enable HTTPS on your hosting platform
๐ Your documentation website is ready to launch!
Next Steps:
- Run
npm run docs:dev
to see your site locally - Customize the theme colors and branding in
config.js
- Deploy to your preferred hosting platform
- Share the URL with your team and community!
This website setup leverages your excellent Diataxis-structured documentation to create a professional, searchable, and user-friendly experience that guides users exactly where they need to go.