Skip to content

gmh5225/docmd

 
 

docmd logo

The minimalist, zero-config documentation generator.

npm version downloads downloads stars license

docmd preview
docmd noStyle page preview in light mode

Features

  • Zero Config: Works out of the box with sensible defaults. Just init and go.
  • Blazing Fast: Generates pure, static HTML. No React hydration lag, no heavy bundles.
  • Smart Search: Built-in, offline-capable full-text search with fuzzy matching. No API keys required.
  • Isomorphic Core: Runs anywhere, Node.js CLI, CI/CD pipelines, or directly in the browser.
  • Rich Content: Built-in support for Callouts, Cards, Tabs, Steps, Changelogs, and Mermaid diagrams.
  • Theming: Beautiful light/dark modes and multiple pre-built themes (sky, ruby, retro).

Installation

npm install -g @docmd/core

Usage

CLI

The Command Line Interface is the primary way to interact with docmd.

docmd init      # Initialize a new project with config and assets
docmd dev       # Start a local development server with hot-reload
docmd build     # Generate a production-ready static site in ./site
docmd live      # Launch the browser-based Live Editor locally

API

docmd exports its core engine, allowing you to build documentation programmatically within your own Node.js scripts or build tools.

const { build, buildLive } = require('@docmd/core');

// Trigger a standard documentation build
await build('./docmd.config.js', { 
  isDev: false, 
  preserve: true 
});

// Trigger a Live Editor bundle build
await buildLive(); 

Live Editor

docmd features a modular architecture that allows the core engine to run client-side.

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.

Project Structure

docmd keeps it simple. Your content lives in docs/, your config in docmd.config.js.

my-docs/
├── docs/                  # Your Markdown files
│   ├── index.md           # Homepage
│   └── guide.md           # Content page
├── assets/                # Images and custom CSS
├── docmd.config.js        # Configuration
└── package.json

Configuration

Customize your site in seconds via docmd.config.js:

module.exports = {
  siteTitle: 'My Project',
  siteUrl: 'https://mysite.com',
  srcDir: 'docs',
  outputDir: 'site',
  
  // Theme Settings
  theme: {
    name: 'sky',           // 'default', 'sky', 'ruby', 'retro'
    defaultMode: 'system', // 'light', 'dark', or 'system'
    enableModeToggle: true
  },
  
  // Sidebar Navigation
  navigation: [
    { title: 'Home', path: '/', icon: 'home' },
    { 
      title: 'Guide', 
      icon: 'book',
      children: [
        { title: 'Installation', path: '/guide/install' }
      ]
    }
  ],

  // Plugins
  plugins: {
    seo: { /* ... */ },
    sitemap: { /* ... */ }
  }
}

Comparison

Feature docmd Docusaurus MkDocs Mintlify
Language Node.js React.js Python Proprietary
Output Static HTML React SPA Static HTML Hosted
JS Payload Tiny (< 15kb) Heavy Minimal Medium
Search Built-in (Offline) Algolia (Ext) Built-in Built-in
Setup ~1 min ~15 mins ~10 mins Instant
Cost Free OSS Free OSS Free OSS Freemium

Community & Support

License

Distributed under the MIT License. See LICENSE for more information.

{ github.com/mgks }

Website Badge Sponsor Badge

About

Generate minimal, fast & beautiful docs from Markdown. No React, no bloat, just content. Built for developers.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 51.2%
  • CSS 35.2%
  • EJS 10.5%
  • HTML 3.1%