VitePress-powered documentation for the ck hybrid code search tool.
- Node.js 18+ or 20+
- pnpm 10+
# Install pnpm if you haven't already
npm install -g pnpm
# Install dependencies
pnpm installStart the local development server with hot reload:
pnpm devThe site will be available at http://localhost:5173 (or next available port).
Build the documentation site for production:
pnpm buildOutput will be in .vitepress/dist/.
Preview the production build locally:
pnpm build
pnpm previewdocs-site/
├── .vitepress/
│ ├── config.ts # Site configuration
│ ├── dist/ # Build output (gitignored)
│ └── cache/ # Build cache (gitignored)
├── guide/ # Getting started guides
│ ├── introduction.md
│ ├── installation.md
│ ├── basic-usage.md
│ └── advanced-usage.md
├── features/ # Feature documentation
│ ├── semantic-search.md
│ ├── mcp-integration.md
│ ├── hybrid-search.md
│ └── grep-compatibility.md
├── reference/ # Reference documentation
│ ├── cli.md
│ ├── models.md
│ ├── configuration.md
│ └── architecture.md
├── contributing/ # Contributing guides
│ ├── development.md
│ ├── release-process.md
│ └── testing.md
├── index.md # Landing page
├── package.json # Dependencies and scripts
└── README.md # This file
VitePress supports enhanced markdown:
```rust fn main() { println!(“Hello, world!”); } ```
```rust // Rust example ```
```python
```
```markdown ::: tip This is a tip :::
::: warning This is a warning :::
::: danger This is a danger notice ::: ```
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |- Create markdown file in appropriate directory
- Add to sidebar in
.vitepress/config.ts:
sidebar: {
'/guide/': [
{
text: 'Guide',
items: [
{ text: 'New Page', link: '/guide/new-page' }
]
}
]
}[Link text](/guide/installation)
[Another page](/features/semantic-search#section)Place images in public/ directory and reference:
Main config file: .vitepress/config.ts
Key sections:
title: Site titledescription: Site descriptionthemeConfig.nav: Top navigationthemeConfig.sidebar: Sidebar navigationthemeConfig.search: Search configuration
Add to .github/workflows/deploy-docs.yml:
name: Deploy Docs
on:
push:
branches: [main]
paths:
- 'docs-site/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: docs-site/pnpm-lock.yaml
- run: cd docs-site && pnpm install
- run: cd docs-site && pnpm build
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs-site/.vitepress/dist- Connect repository to Netlify
- Set build settings:
— Base directory:
docs-site— Build command:pnpm build— Publish directory:docs-site/.vitepress/dist
{
"buildCommand": "cd docs-site && pnpm build",
"outputDirectory": "docs-site/.vitepress/dist"
}# Kill process on port 5173
lsof -ti:5173 | xargs kill -9
# Or use different port
pnpm dev --port 5174# Clear cache and rebuild
rm -rf .vitepress/cache .vitepress/dist node_modules
pnpm install
pnpm buildVitePress checks for broken links during build. Fix any reported issues.
- Fork the repository
- Create feature branch
- Make changes to docs
- Test locally with
pnpm dev - Build to verify:
pnpm build - Submit pull request
- VitePress Documentation
- Markdown Guide
- Vue.js Documentation (for custom components)
MIT or Apache-2.0 (same as ck project)