1.2.1 • Published 5 years ago

md-html-tool v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

md-html-tool

concat multiple md files together and convert it to a standalone html file

Install

using npm as a devDependency

npm install --save-dev md-html-tool

or using yarn as a devDependency

yarn add --dev md-html-tool

How to use

  • add setting to your package.json

    package-setting.png

    "md-html-tool": [
        "mdfiles": [
            // all your markdown files' paths
            // beware the orders of all md files
        ],
        "target": "" // the converted html file path
    ]
  • write code like this

      const mdhtml = require('md-html-tool');
    
      (async () => {
          await mdhtml.convert();
          console.log(`completed`);
      })();

API functions

funcdescription
convertconcat all md files and convert them to one html file
getconfget all configuration from package.json

Add TOC (Table of Content)

Converter will insert TOC (Table of Content) at the position that you put \ ... \

<!-- toc -->
toc will be inserted here
<!-- tocstop -->

if there is no \ \ , no TOC will be inserted

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago