kerouac-book
v0.0.4
Published
Kerouac app that generates a website from a GitBook.
Downloads
5
Readme
kerouac-gitbook
Kerouac app that generates a website from a GitBook.
Usage
Add Book to Website
Use the app created by this package within a website. The path to the book is passed as an argument.
var gitbook = require('kerouac-gitbook');
site.use('/books/on-the-road', gitbook('books/on-the-road'));
And map the pages of the book when generating the site.
site.generate({
'/books/on-the-road': gitbook.createMapper('books/on-the-road')
});
Add Multiple Books to Website
Multiple books can be generated by use()
ing an app at different paths.
site.use('/books/on-the-road', gitbook('books/on-the-road'));
site.use('/books/big-sur', gitbook('books/big-sur'));
site.generate({
'/books/on-the-road': gitbook.createMapper('books/on-the-road'),
'/books/big-sur': gitbook.createMapper('books/big-sur')
});
License
Copyright (c) 2017-2022 Jared Hanson <https://www.jaredhanson.me/>