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

mdtome

v0.8.5

Published

Markdown Tome is a Gitbook clone

Downloads

14

Readme

mdtome

Markdown Tome - A Gitbook clone.

  • Fast
  • Simple
  • Compatible with Gitbook structure(s)
  • Produces optimized builds
  • Creates sitemaps by default
  • Can generate PDFs
  • Google Analytics and Adsense built in by default

Example: https://andersevenrud.github.io/mdtome

Requirements

Node 8.x or later.

Installation

npm install -g mdtome

You can also install this locally in your projects.

Configuration

Create a file named .mdtome

module.exports = {
  input: '.',
  title: 'My Awesome Tome',
  url: 'http://my-website.com'
};

See src/config.js for a full list of options. TODO: Add table here

Regular Gitbook book.json file is also supported, but will not allow you to make any customization.

Usage

The generated output will be in _book/ by default.

CLI

Simply run this command in your project root directory:

mdtome [--input=path] [--output=path] [--pdf=path] [--verbose] [--watch]

Or if you have mdtome as a dependency in your project:

npx mdtome [--input=path] [--output=path] [--pdf=path] [--verbose] [--watch]

Note, use NODE_ENV=production mdtome ... to make an optimized build.

API

const mdtome = require('mdtome');

mdtome({
  /* Configuration options here */
  /* Same as the .mdtome file */
}) // -> Promise

Plugins

module.exports = {
  // Per page render
  render: html => Promise.resolve(html)

  // Template loading
  template => (html, pdf) => Promise.resolve(html)
};

Benchmarks

Using https://github.com/bagder/everything-curl

  • Gitbook: 23.79s user 0.73s system 108% cpu 22.495 total
  • mdtome: 4.18s user 0.18s system 110% cpu 3.952 total

System: i5-4670K + SSD

TODO

  • Generation: Glossary
  • Generation: Languages
  • Plugin: Typed quotes
  • Customization: CSS/JS entry points
  • UI: Highlight links based on scroll

License

MIT