npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

m2pdb

v0.0.4

Published

markdown to pdf documentation builder

Downloads

19

Readme

m2pdb - Markdown To Pdf Documentation Builder

This project provide a simple way to create a pdf from your projects documentation wrote with markdown syntax. It's combining the strictness of markdown syntax, the flexibility of html/css and the portability of a pdf presentation. Your markdown documentation is converted to html and magically transformed to pdf by wkhtmltopdf package.

Installation

> npm install m2pdb

Requirements

Usage

> m2pdb src_path output.pdf

In src_path the script must find some files :

  • settings.json: file containing your settings (describe below)
  • layout.html: main layout use for all your document. Content will replace the {{content}} variable.
    • all of your markdown files (with this extensions : .md or .markdown).

You can try with the embedded example of Node.JS documentaton by running this line :

> node index.js node_doc/ node.pdf

Note that all links are wrong : original documentation was written for a different context. But take look at the markdown documentation, you should find how to make your own anchors.

Example of settings.json

{"title": "Title of my project",
 "version": "v0.0.1",
 "index": "all",
 "output-args": ["--default-header", "toc"]}

Every {{keys}} in this object will be replace by its associated value during markdown to html conversion. There's two specials keys :

  • index: used as main file (in your src path) witch includes all your markdown files (use @include filename to include it).
  • output-args : used as parameters for wkhtmltopdf (more infos : wkhtmltopdf 0.10.0_rc2 doc)