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

1.2.1-beta.1 • Public • Published

ManDoc

NPM version tested with jest Commitizen friendly Conventional Commits lerna

Your swiss-army knife to convert documents in Markdown to PDF or HTML.

Features

This project is inspired by

Installation

$ npm install mandoc -g

Executable Package Release is also in plan for Windows Users.

Docker Image provide is also in plan for Docker Users.

Quick Start

Convert your markdown into PDF through Mandoc

$ mandoc path/to/your/doc.md
$ open path/to/your/doc.pdf

Convert a markdown bytes stream to PDF

$ curl https://raw.githubusercontent.com/chigix/mandoc/master/README.md | mandoc -o ./r.pdf

With Template to build for different situation from your original markdown

$ mandoc --template path/to/template_dir path/to/your/doc.md

Template in mandoc is similar to the concept of theme in building a web site. However mandoc is designed for converting your original markdown document into different shape of files for different situation and needs, which is mostly outputted to a single file as the final result for future usage.

About the template package, mandoc is designed to support npm packaged template release as well, which means that you can share or download other designers' template work through npm install -g tpl_name simply.

Format Specific Options

Currently, html and pdf are supported, and default output format would be pdf.

If you want html format as the output result:

$ mandoc --to html path/to/your/doc.md

Print Option Section

--pagesize SIZE, --print.pageSize SIZE : Specify the paper size for output pdf file.

SIZE format can be:

  • A4
  • A3 landscape
  • 400mm 600mm, where the left dedicates to the width to set and the right is height

TODO

License

MIT

Package Sidebar

Install

npm i mandoc

Weekly Downloads

0

Version

1.2.1-beta.1

License

MIT

Unpacked Size

217 kB

Total Files

133

Last publish

Collaborators

  • chigix