opdoc
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

OPDOC

What's OPDOC?

One Page Documentation is a one-stop-shop CLI tool for creating single page static documentation sites from markdown. that.. and also a bunch of known libraries glob, sanitize-html, html-minifier-terser, slugify duct-taped together with oclif


Usage

$ npm install -g opdoc

$ opdoc serve ./docs/
Running Serve
+ serving on http://localhost:8181
...

Commands

opdoc compile PATH [OUTPUT]

Compiles all markdown files in target folder into a single markdown file

USAGE
  $ opdoc compile [PATH] [OUTPUT] [-t] [-T <value>] [-d <value>]

ARGUMENTS
  PATH    search this directory for *.md files
  OUTPUT  [default: ./README.md] output filename

TABLE OF CONTENTS FLAGS
  -T, --tocString=<value>  [default: <!-- TOC -->] string to replace with Table of Contents
  -d, --tocDepth=<value>   [default: 6] depth when building Table of Contents.
  -t, --notoc              Skip table of contents generation

DESCRIPTION
  Compiles all markdown files in target folder into a single markdown file

EXAMPLES
  $ opdoc compile ./docs
    Running Compile
    + loading **/*.md files from ./docs
    + writing to ./README.md

See code: dist/commands/compile.ts

opdoc help [COMMAND]

Display help for opdoc.

USAGE
  $ opdoc help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for opdoc.

See code: @oclif/plugin-help

opdoc parse SOURCE [OUTPUT]

Parse .md files to html

USAGE
  $ opdoc parse [SOURCE] [OUTPUT] [-x] [-m] [-t] [-T <value>] [-d <value>]

ARGUMENTS
  SOURCE  [default: ./README.md] filename or directory to look for source file
  OUTPUT  [default: ./index.html] output filename

FLAGS
  -m, --minimize  minimize HTML output
  -x, --sanitize  sanitize HTML output

TABLE OF CONTENTS FLAGS
  -T, --tocString=<value>  [default: <!-- TOC -->] string to replace with Table of Contents
  -d, --tocDepth=<value>   [default: 6] depth when building Table of Contents.
  -t, --notoc              Skip table of contents generation

DESCRIPTION
  Parse .md files to html

EXAMPLES
  $ opdoc parse README.md
       $ opdoc parse ./path/to/folder

See code: dist/commands/parse.ts

opdoc serve SOURCE

create an http server for .md files

USAGE
  $ opdoc serve [SOURCE] [-p <value>] [-x] [-m] [-t] [-T <value>] [-d <value>]

ARGUMENTS
  SOURCE  [default: ./README.md] filename or directory to look for source file

FLAGS
  -m, --minimize      minimize HTML output
  -p, --port=<value>  [default: 8181] HTTP server port
  -x, --sanitize      sanitize HTML output

TABLE OF CONTENTS FLAGS
  -T, --tocString=<value>  [default: <!-- TOC -->] string to replace with Table of Contents
  -d, --tocDepth=<value>   [default: 2] depth when building Table of Contents.
  -t, --notoc              Skip table of contents generation

DESCRIPTION
  create an http server for .md files

EXAMPLES
       $ opdoc serve ./path/to/folder --port 8181
       Running Serve
        + serving on http://localhost:8181

See code: dist/commands/serve.ts

Package Sidebar

Install

npm i opdoc

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

49.3 kB

Total Files

35

Last publish

Collaborators

  • entomb