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 🙏

© 2025 – Pkg Stats / Ryan Hefner

markdown-html-cli

v0.1.0

Published

a cli tool to transform markdown to html

Downloads

10

Readme

markdown-html-cli

a cli tool to transform markdown to html

  • support custom css
  • support highlight your code by highlight.js
  • support custom markdown css
  • support transform your image into base64
  • support only generate html fragment(do not contain body tag)

install

npm i -g markdown-html-cli

usage

md2html -h

Usage: md2html mdFile [options]

Options:
  mdfile                       Path of the markdown file to convert
  -o --out <path>              path where save the html (default: "/Users/An1")
  --cwd <path>                 current working directory (default: "/Users/An1")
  -mc --md-css <path>          markdown css file to use (default: "github")
  -cc --custom-css <path>      custom css file to use (default: "")
  -hc --hljs-css <path|name>   highlight.js css to use (default: "github-gist")
  -no-ti --no-transform-image  do not transform image to base64
  -no-hf --no-html-fragment    do not generate html fragment
  --md-class <class>           warper div class name (default: "markdown-body")
  -V, --version                output the version number
  -h, --help                   display help for command
  • cwd current working directory, default is where you run md2html command, it will be used by mdfile, out option

  • mdfile path of the md file to convert, it will use cwd as base path

  • out path of the output html file, it will use cwd as base path

  • md-css markdown css file to use

    This cli tool use github-markdown-css as default. If u want different markdown css, pass http link or localPath css file, like http://cdn.com/a.css or /path/to/md.css

  • custom-css custom css file, pass http link or localPath css file

  • hljs-css highlight.js css to use. U can pass http link or localpath. Besides, u can pass the embed css name, like Agate, Github, you can find css name here

  • no-transform-image By default, this tool will transform image to embed base64, this is great helpful if you want the html file to show standalone.

  • no-html-fragment By default, the html file is just a div tag wrap the generated html code. If you want a complete html file, pass -no-hf

  • md-class Since we use github-markdown-css as default and it requires all html code wraped by class name markdown-body, so the default is markdown-body

example

md2html a.md

Above command will transform a.md to a.html at current directory

md2html a.md -mc http://a.com/md.css -hc http://b.com/highlight.css

Above command will use a different markdown css and hightlight.js css