Usage¶
Produce book content¶
One Jupyter Notebook per chapter, just like you always do.
Formatting conventions¶
Every chapter must start with a markdown Title 1 (# title of the chapter
) element. This title is used for the table of contents.
The _book.json
file¶
You must add a _book.json
file in the directory that contains your notebooks. This file provides the chapters to include in the book and their order.
The file must have a structure as follows:
{
"title": "Title of the notebook",
"files": [
"firstChapter.ipynb",
"secondChapter.ipynb",
"thirdChapter.ipynb"
],
"assets": "img"}
Compile the site¶
cd
to the directory containing your notebooks and the _book.json
file, and run.
nb2book
Your site will be compiled in the _site
subdirectory.
Deploy on gh-pages¶
I'm still working on making that flowless. This bash scrip sounds like a good option.