# Welcome to DocHub

DocHub is a modern documentation generator that transforms Markdown files into a beautiful, searchable documentation site with live-reload during development and static HTML export for production.

## Features

- **Live-reload dev server** -- changes to markdown files instantly update the browser
- **Static site generation** -- export a fully self-contained HTML site for deployment
- **Full-text search** -- client-side search across all pages with relevance scoring
- **Dark mode** -- automatic theme toggle with persistent preference
- **Syntax highlighting** -- code blocks rendered with Highlight.js across 190+ languages
- **Responsive design** -- works on desktop, tablet, and mobile
- **Zero external runtime dependencies** -- everything is self-contained in the generated HTML

## Quick Start

```bash
# Install globally
npm install -g dochub

# Scaffold a project
dochub init my-docs

# Start the dev server
cd my-docs && dochub serve

# Build for production
dochub build
```

## Project Structure

```
my-docs/
├── markdown/           # Write your documentation here
│   ├── README.md       # Home page
│   ├── guide.md        # Additional pages
│   └── folder/         # Organized into folders
│       └── README.md
└── dochub.config.js    # Site configuration
```

## Writing Documentation

DocHub supports standard Markdown with the following features:

- Headers (h1 through h6)
- Bold, italic, and inline code
- Ordered and unordered lists
- Links and images
- Code blocks with syntax highlighting
- Blockquotes
- Tables
- Horizontal rules

## Customization

Edit `dochub.config.js` in your project root to change the site title and description:

```js
module.exports = {
  title: 'My Documentation',
  description: 'A great documentation site',
};
```

## Deployment

Run `dochub build` to generate a static `dist/` folder. Upload the contents to any static file host -- Netlify, Vercel, GitHub Pages, or a simple HTTP server.
