New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mdocu

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdocu

A documentation generator for markdown flavoured pages.

latest
Source
npmnpm
Version
0.0.52
Version published
Maintainers
1
Created
Source

MDocu (work in progress)

Build Status codecov

MDocu is a NodeJS documentation generator capable of converting a bulk of .md files into a static webapp.

Installing the CLI

Npm or Yarn

To use the CLI, install MDocu with Npm or Yarn globally.

npm install mdocu -g
yarn global add mdocu

CLI Commands

compile

mdocu compile "/output-dir" "/pages-dir" -n "Name of the project"

new

Create a new directory by the given name and creates examples pages, a configuration file and finally compiles.

mdocu new "Name of the project"

init

Initializes a new project in the current working directory.

mdocu init "Name of the project"

version

Show Cli version information.

mdocu --version

Writing your first page

MDocu follows a simple naming convention that controls the order and name of your pages. Therefor it's necassary to keep in mind that MDocu only looks for files that follow that convention, let's take a look at the following examples of valid and invalid filenames:

Valid filenames

01-introduction.md
02-getting-started.md
03-about-the-author.md

Invalid filenames

getting-started.md
getting_started.md
01-getting_started.md
getting-started

Configuration

The module has the following configuration options:

PropertyTypeDefaultExplanation
PathstringnullPath where to should look for .md files
outDirstringnullPath where the compiled pages should appear
namestring'MDocu'(optional) Project name that appears throughout the app
localestring'en'(optional) The language of your writings
debugbooleantrue(optional) Display log information, warnings and errors
versionstring'0.0.0'(optional) Current version of your project

Javascript implementation

To extend it's functionality or have more control over MDocu, you can use it as a javascript module.

Es6

import { Mdocu } from 'mdocu';

Mdocu.setup({
  name:     'Demo documentation',
  path:     './demo/md',
  outDir:   './demo/docs'
}).compile()

Es5

const lib = require('mdocu');

lib.Mdocu.setup({
  name:     'Demo documentation',
  path:     './demo/md',
  outDir:   './demo/docs'
}).compile()

FAQs

Package last updated on 02 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts