You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Zero Config**: Intelligent auto-routing scans your folders and builds navigation trees instantly.
46
-
-**Versioning**: Enterprise-grade versioning (v1, v2) with sticky context switching.
47
-
-**Super Fast**: Generates pure static HTML. No hydration gap. No heavy frameworks.
48
-
-**AI-Ready**: Automatically generates `llms.txt` context for AI agents.
49
-
-**Smart Search**: Built-in, privacy-friendly full-text search with deep-linking.
50
-
-**Isomorphic**: Runs seamlessly in Node.js (CLI) or directly in the browser.
51
-
-**Rich Content**: Native support for Tabs, Steps, Callouts, and Mermaid diagrams.
52
-
-**SEO Optimized**: Native sitemaps, canonical tags, and static HTML redirects.
45
+
-**Versioning**: Enterprise-grade versioning (v1, v2) with sticky context switching and smart routing.
46
+
-**Super Fast**: Generates pure static HTML. No hydration gap. No heavy React/Vue overhead.
47
+
-**AI-Ready**: Automatically generates `llms.txt` and `llms-full.txt` context for AI agents.
48
+
-**PWA**: Native Progressive Web App support for offline access and smart background caching.
49
+
-**Smart Search**: Built-in, privacy-friendly offline search with deep-linking to exact headers.
50
+
-**Isomorphic**: Runs seamlessly in Node.js (CLI) or directly in the browser via Live Editor.
51
+
-**Rich Content**: Native Markdown support for Tabs, Steps, Callouts, and Mermaid diagrams.
52
+
-**SEO Optimized**: Auto-generates sitemaps, canonical tags, 404 pages, and static HTML redirects.
53
53
54
-
## Installation
54
+
## Getting Started
55
55
56
-
```bash
57
-
npm install -g @docmd/core
58
-
```
59
-
60
-
## Usage
61
-
62
-
### CLI
63
-
64
-
The Command Line Interface is the primary way to interact with `docmd`.
56
+
You can run `docmd` on-the-fly without installing, or add it permanently to your long term projects.
65
57
58
+
### Option 1: Zero-Config (Try it instantly)
59
+
Run `docmd` inside any folder containing markdown files. It will automatically extract your headers and build a nested navigation sidebar.
66
60
```bash
67
-
docmd init # Initialize a new project with V3 config
68
-
docmd dev -z # ⚡️ Start Zero-Config mode (no setup required)
69
-
docmd dev # Start local server with config
70
-
docmd build # Generate production static site
71
-
docmd live # Launch the browser-based Live Editor
72
-
docmd migrate # Upgrade legacy configs to V3 structure
73
-
```
61
+
# Start local dev server
62
+
npx @docmd/core dev -z
74
63
75
-
### API
64
+
# Generate production static site
65
+
npx @docmd/core build -z
66
+
```
67
+
> **Note:** Zero-Config (`-z`) is currently in `beta`. It is fantastic for quick previews, but for production sites, we recommend initializing a standard configuration file for maximum control.
76
68
77
-
`docmd` exports its core engine, allowing you to build documentation programmatically within your own Node.js scripts or build tools.
69
+
### Option 2: Project Installation (Recommended)
70
+
For permanent projects, install `docmd` as dependency to lock your versions.
Install once and use the `docmd` command anywhere on your machine.
93
85
94
-
`docmd` features a modular architecture that allows the core engine to run client-side.
86
+
```bash
87
+
npm install -g @docmd/core
95
88
96
-
Running `docmd live` builds a standalone web application where you can write Markdown and see the preview instantly without any server-side processing. You can embed the generated `docmd-live.js` bundle to add Markdown capabilities to your own applications.
89
+
docmd dev # Start the local dev server
90
+
docmd build # Generate the production static site
91
+
```
97
92
98
93
## Project Structure
99
94
100
-
`docmd` keeps it simple. Your content lives in `docs/`, your config in `docmd.config.js`.
95
+
`docmd` keeps your repository clean. Your content lives in `docs/`, your config in `docmd.config.js`.
101
96
102
97
```bash
103
98
my-docs/
104
-
├── docs/ # Your Markdown files
99
+
├── docs/ # Your Markdown Files
105
100
│ ├── index.md # Homepage
106
-
│ └── guide.md # Content page
107
-
├── assets/ # Images and custom CSS
108
-
├── docmd.config.js # Configuration
109
-
└── package.json
101
+
│ └── guide.md # Content Page
102
+
├── assets/ # Images and Custom JS/CSS
103
+
├── docmd.config.js #The docmd Configuration
104
+
└── package.json# Node.js Dependencies
110
105
```
111
106
112
107
## Configuration
113
-
114
-
Customize your site in seconds via `docmd.config.js`. We use a type-safe helper for better DX:
108
+
`docmd` provides a highly flexible API. Customize your site in seconds via `docmd.config.js`. Here is a robust example showing off our most powerful features:
`docmd` features an isomorphic architecture. Running `npx @docmd/core live` builds a standalone web application where you can write Markdown and see the preview instantly without any server-side processing. You can also try our **[docmd live](https://live.docmd.io)** editor!
0 commit comments