Markdown Tome - A Gitbook clone.
Example: https://andersevenrud.github.io/mdtome
Node 8.x or later.
npm install -g mdtome
You can also install this locally in your projects.
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.
The generated output will be in _book/
by default.
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.
const mdtome = require('mdtome');
mdtome({
/* Configuration options here */
/* Same as the .mdtome file */
}) // -> Promise
module.exports = {
// Per page render
render: html => Promise.resolve(html)
// Template loading
template => (html, pdf) => Promise.resolve(html)
};
Using https://github.com/bagder/everything-curl
23.79s user 0.73s system 108% cpu 22.495 total
4.18s user 0.18s system 110% cpu 3.952 total
System: i5-4670K + SSD
MIT