mdtome
Markdown Tome is a Gitbook clone
Last updated 2 years ago by andersevenrud .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mdtome 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.8.5                                ...           latest (2 years ago)

34 Versions

  • 0.8.5                                ...           2 years ago
  • 0.8.3                                ...           2 years ago
  • 0.8.2                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.5                                ...           2 years ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.7                                ...           2 years ago
  • 0.6.6                                ...           2 years ago
  • 0.6.5                                ...           2 years ago
  • 0.6.4                                ...           2 years ago
  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (26)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |