← 返回命令列表

Linux command

docsify 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize new documentation

docsify init [./docs]

Initialize with a specific theme

docsify init [./docs] --theme [dark]

Start local preview

docsify serve [./docs]

Serve on specific port

docsify serve [./docs] --port [4000]

Serve and open in browser

docsify serve [./docs] --open

Generate sidebar

docsify generate [./docs]

说明

docsify is a documentation site generator that dynamically renders Markdown files without building static HTML. It loads and parses Markdown files on the fly, providing instant updates during editing. The tool creates simple, elegant documentation websites from Markdown files. Features include full-text search, multiple themes, plugin support, and GitHub Pages compatibility. Configuration is minimal, typically just an index.html and Markdown files. docsify is particularly suited for project documentation, requiring no build step and supporting features like cover pages, sidebars, and embedded code samples.

参数

init _PATH_
Initialize new docsify project. Shorthand: i.
--local, -l
Copy docsify files to the docs path instead of using CDN (default: false).
--theme, -t _THEME_
Choose a theme: vue, buble, dark, pure (default: vue).
--plugins, -p
Add plugin script tags to index.html.
serve _PATH_
Start local server with live reload. Shorthand: s.
--port, -p _N_
Server port (default: 3000).
--host, -H _HOST_
Host to bind to (default: localhost).
--open, -o
Open browser automatically.
generate _PATH_
Generate sidebar file. Shorthand: g.
--sidebar, -s _FILE_
Sidebar filename (default: _sidebar.md).
--overwrite, -o
Allow overwriting existing files.
--help
Display help information.

FAQ

What is the docsify command used for?

docsify is a documentation site generator that dynamically renders Markdown files without building static HTML. It loads and parses Markdown files on the fly, providing instant updates during editing. The tool creates simple, elegant documentation websites from Markdown files. Features include full-text search, multiple themes, plugin support, and GitHub Pages compatibility. Configuration is minimal, typically just an index.html and Markdown files. docsify is particularly suited for project documentation, requiring no build step and supporting features like cover pages, sidebars, and embedded code samples.

How do I run a basic docsify example?

Run `docsify init [./docs]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init _PATH_ do in docsify?

Initialize new docsify project. Shorthand: i.