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

mardoc

v1.0.1

Published

A simple command line tool to convert a Markdown file into an HTML document.

Downloads

18

Readme

mardoc

A simple command line tool that can convert markdown files into html documents.

Installation

# install globally
npm install mardoc -g
# or install in your special project
npm install mardoc --save-dev

New features (v1.0.0)

  • Can convert multy markdown files at once.
  • You can choose a variety of code block styles you like.
  • A markdown will only generate an html file without external references, making your documents more introductory and easier to manage.

Compared with the previous version, I added some new features in this version, and also solved some style problems.

Usage

Very easy to use, if you installed the mardoc globally, you only enter like below on your terminal.

mardoc 

mardoc will automatically convert the README.md (that is, ./README.md) files in the current path into html documents and save them in the docs (that is, ./docs) folder in the current path.

More usage examples

# You can specify the path to the generated file, including the file name
mardoc -o ./TEST.md -d ./docs/index.html
# You can also convert all markdown files in a folder at once
mardoc -o ./dir/ -d ./docs/

By default, mardoc generates documents without a toc, but you can generate a toc for documents with the option -t. like below:

mardoc -t

You can also customize your theme very conveniently, you only need to rewrite the style in the theme directory. At last enter the command just like below:

mardoc -T /path/to/your/theme

In addition, you can choose the style of the code block you like, as long as you simply enter the parameter "-s",like below:

mardoc -s dark
# Or
mardoc -s default
# Or
mardoc -s idea
# Or
mardoc -s xcode
# and other more styles

Here are all the code block styles (highlight.js)

'a11y-dark'
 'a11y-light'
 'agate'
 'an-old-hope'
 'androidstudio'
 'arduino-light'
 'arta'
 'ascetic'
 'atelier-cave-dark'
 'atelier-cave-light'
 'atelier-dune-dark'
 'atelier-dune-light'
 'atelier-estuary-dark'
 'atelier-estuary-light'
 'atelier-forest-dark'
 'atelier-forest-light'
 'atelier-heath-dark'
 'atelier-heath-light'
 'atelier-lakeside-dark'
 'atelier-lakeside-light'
 'atelier-plateau-dark'
 'atelier-plateau-light'
 'atelier-savanna-dark'
 'atelier-savanna-light'
 'atelier-seaside-dark'
 'atelier-seaside-light'
 'atelier-sulphurpool-dark'
 'atelier-sulphurpool-light'
 'atom-one-dark'
 'atom-one-dark-reasonable'
 'atom-one-light'
 'brown-paper'
 'brown-papersq'
 'codepen-embed'
 'color-brewer'
 'darcula'
 'dark'
 'darkula'
 'default'
 'docco'
 'dracula'
 'far'
 'foundation'
 'github'
 'github-gist'
 'gml'
 'googlecode'
 'gradient-dark'
 'grayscale'
 'gruvbox-dark'
 'gruvbox-light'
 'hopscotch'
 'hybrid'
 'idea'
 'ir-black'
 'isbl-editor-dark'
 'isbl-editor-light'
 'kimbie.dark'
 'kimbie.light'
 'lightfair'
 'magula'
 'mono-blue'
 'monokai'
 'monokai-sublime'
 'night-owl'
 'nord'
 'obsidian'
 'ocean'
 'paraiso-dark'
 'paraiso-light'
 'pojoaque'
 'purebasic'
 'qtcreator_dark'
 'qtcreator_light'
 'railscasts'
 'rainbow'
 'routeros'
 'school-book'
 'shades-of-purple'
 'solarized-dark'
 'solarized-light'
 'sunburst'
 'tomorrow'
 'tomorrow-night'
 'tomorrow-night-blue'
 'tomorrow-night-bright'
 'tomorrow-night-eighties'
 'vs'
 'vs2015'
 'xcode'
 'xt256'
 'zenburn'

All options supported

Usage: mardoc [options]

A simple command line tool that can convert markdown files into html documents.

Options:
  -v, --version                  output the current version
  -o, --origin <path>            Enter the path of the markdown file or the folder where the markdown file is located (default: "./README.md")
  -d, --destination <path>       Document generated path, which can be a html file path or a folder path (default: "./docs")
  -t, --toc                      Choose whether you need to generate a toc (default: false)
  -i, --ignore-h1                Choose whether to ignore heading 1 when generating a toc (default: true)
  -D, --toc-depth [number]       Toc hierarchy (default: 2)
  -T, --theme <path>             Custom theme path
  -s, --code-block-style <name>  choose a code block style you like (default: "github")
  -h, --help                     output usage information

Thanks a lot!!