⇐

  • SimpleDoc
  • Installing
  • Updating
  • Uninstalling
  • The Basics
  • Generating Docs
  • File Order
  • Readme Files
  • Options
  • from
  • to
  • serve
  • Contributing

SimpleDoc

SimpleDoc is a static site generator for documentation. It generates a single, portable HTML file from a directory of markdown files.

It is useful for writing guides, references, manuals, or any other type of documentation that is made by humans instead of generated from source code.

Installing

npm install -g simpledoc

Updating

npm update -g simpledoc

Uninstalling

npm uninstall -g simpledoc

The Basics

The goal is to make this as simple as possible. If you think any part of the process could be simplified, let me know.

Generating Docs

Just navigate to a directory in your terminal and run simpledoc.

The program will collect all markdown files in a directory and turn them in to a nice HTML file with permalinks and soothing colours.

You can keep everything in a single file if you'd like, but I prefer to separate my source files in to sections.

File Order

Files are read in alphabetical order. If you'd like to change where content appears in the output, prefix the files numerically. For example:

1 - MyFirstFile.md
2 - MySecondFile.md
3 - MyThirdFile.md

SimpleDoc doesn't care about your filenames, otherwise - it just reads the directory in order.

Readme Files

If you include a README.md file in the directory, its contents will always be displayed at the top of the generated output, regardless of the other files' names.

I use the README as an introduction with links to the rendered docs for people viewing the repository.

Options

SimpleDoc may be simple but it still has a few options. You can use any or all of these together.

from

-f, --from

Specify the directory to read markdown files from. Defaults to current directory.

simpledoc -f C:\Example\Docs

to

-t, --to

Specify the output directory for the index.html file. Defaults to current directory.

simpledoc -t C:\Example\Output

serve

-s, --serve

Starts a server after compiling docs, running on port 3000 or whatever the $PORT environment variable is set to. Defaults to disabled.

simpledoc -s

Contributing

You can check out the source for SimpleDoc on GitHub:

https://github.com/claflamme/simpledoc

Feel free to submit any issues or suggestions.

Mon Mar 30 2015 21:27:57 GMT-0400 (Eastern Daylight Time)