LinuxCommandLibrary

docsify

Generate documentation websites from Markdown files

TLDR

Initialize a new documentation in the current directory

$ docsify init
copy

Initialize a new documentation in the specified directory
$ docsify init [path/to/directory]
copy

Serve local documentation on localhost:3000 with live reload
$ docsify serve [path/to/directory]
copy

Serve local documentation on localhost at the specified port
$ docsify serve [[-p|--port]] [80] [path/to/directory]
copy

Generate a sidebar markdown file in the specified directory
$ docsify generate [path/to/directory]
copy

SYNOPSIS

docsify <command> [options]
Commands: init [dir], serve [dir], build [dir]

PARAMETERS

init [dir]
    Initialize docsify project in dir (default: current)

serve [dir]
    Start dev server for dir with live reload

build [dir]
    Build static site from dir to _build

--port, -p PORT
    Server port (default: 3000)

--open
    Auto-open browser

--version
    Show version

--help
    Show help

DESCRIPTION

Docsify is a magical documentation site generator that generates a documentation website from Markdown files without a build process. It features a progressive web app architecture, load-on-demand functionality, and customizable themes. The docsify CLI tool, installed via npm, simplifies project setup, local serving, and building.

Key features include instant preview during editing, support for plugins like search and copy-code, and deployment readiness for GitHub Pages or any static host. Ideal for open-source projects and personal docs, it prioritizes simplicity over complex static site generators.

Usage starts with docsify init to scaffold a project, docsify serve for live reloading, and docsify build for production output. Requires Node.js (≥10) and global npm installation: npm i docsify-cli -g.

CAVEATS

Requires Node.js and npm i docsify-cli -g. Not native Linux binary. Build output goes to _build dir.

INSTALLATION

npm i docsify-cli -g or npx docsify init ./docs

CONFIGURATION

Edit index.html for theme, plugins, loadSidebar.

HISTORY

Created by Qing Wei in 2016. Gained popularity for zero-config Markdown docs. CLI evolved with v4+ for build/serve. Actively maintained on GitHub.

SEE ALSO

npm(1), node(1), pandoc(1)

Copied to clipboard