# Docsify Setup

Zero-build documentation site that reads skills directly.

## Directory Structure

```
docs/
└── guide/
    ├── index.html      # Docsify entry point
    ├── _sidebar.md     # Navigation (auto-generated)
    ├── README.md       # Landing page content
    └── .nojekyll       # Prevents Jekyll processing on GitHub Pages
```

## index.html

```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Lushbot Documentation</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'Lushbot',
      repo: '',
      loadSidebar: true,
      subMaxLevel: 2,
      search: 'auto',
      auto2top: true,

      // Map routes to skills directory
      alias: {
        '/skills/(.*)': '/.claude/skills/$1',
        '/_sidebar.md': '/_sidebar.md'
      }
    }
  </script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
</body>
</html>
```

## _sidebar.md Structure

Auto-generated from skills. See [index-generation.md](index-generation.md).

```markdown
* **Getting Started**
  * [Overview](README.md)

* **Core**
  * [Doc Management](/skills/doc-management/SKILL.md)
  * [Skill Manager](/skills/skill-manager/SKILL.md)

* **Development**
  * [Testing](/skills/testing/SKILL.md)
  * [Spec Writer](/skills/spec-writer/SKILL.md)

* **Review**
  * [Security](/skills/security/SKILL.md)
  * [Reviewer](/skills/reviewer/SKILL.md)
```

## Local Development

Serve locally with any static server:

```bash
# Python
python -m http.server 3000 --directory docs/guide

# Node (npx)
npx serve docs/guide

# Then open http://localhost:3000
```

## GitHub Pages Deployment

1. Enable GitHub Pages in repo settings
2. Set source to `docs/guide` folder (or use GitHub Actions)
3. Push changes — site updates automatically

## Customization

### Theme Options

Replace `vue.css` with:
- `//cdn.jsdelivr.net/npm/docsify/themes/buble.css` — Minimal
- `//cdn.jsdelivr.net/npm/docsify/themes/dark.css` — Dark mode
- `//cdn.jsdelivr.net/npm/docsify/themes/pure.css` — Clean

### Plugins

Add before closing `</body>`:

```html
<!-- Copy code button -->
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>

<!-- Syntax highlighting -->
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-typescript.min.js"></script>
```

## Migration Path

If you later want Hugo or Eleventy:
1. Skills remain unchanged (they're just markdown)
2. Replace `docs/guide/` contents with new generator
3. Update sidebar generation script
