0.3.1 • Published 4 years ago

@petervertesi/md-lib v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

md-lib

THIS MODULE IS WORK IN PROGRESS AND NOT READY TO USE.

An open-source node module for compiling libraries from markdown input.

Installation

Install MDLib using npm:

$ npm install @petervertesi/md-lib

Usage

First, you have to create a md-lib.config.yaml in your root directory.

Example md-lib.config.yaml:

title: Example Library
version: 0.1.0

options:
  input: input
  output: output/Example.md
  doclevel: 2

content:
  - path: introduction.md
  - path: example-chapter-01.md
    subsections:
      - path: example-subsection-01.md
      - path: example-subsection-02.md
  - path: example-chapter-02.md

Then you can use MDLib in your project like this:

const MDLib = require('@petervertesi/md-lib');

MDLib.compile();
// => results in the new file output/Example.md, containing all the .md files specified in content

Compiler

The Compiler module compiles multiple markdown files into one, based on the specified structure.

Compiler~compile(configFile, options)

Compiles multiple markdown files into one, based on the provided config file and other options.

Kind: inner method of Compiler

ParamTypeDefaultDescription
configFilestring"md-lib.config.yaml"A .yaml file that contains the configuration for the compiler.
optionsanyOptions (input, output and doclevel) specified in this object overwrite the options in the config file.
0.3.0

4 years ago

0.3.1

4 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.2

5 years ago

0.1.3

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago