To build your site, take the following steps.:
-
(optionally) clean out the auto-generated folders by running
make clean -
Ensure that your Table of Contents file (
_data/toc.yml) is up to date. The links in that file should be relative to the/content/folder and with no extension. For example, the file that’s located inmysite/content/mychapter/mypage.ipynbshould have an entry like this:- title: My page title url: /mychapter/mypageSee the template
toc.ymlfor examples. -
Build the textbook by navigating to the site root, and running the following command:
make book
This will:
- Run
nbconvertto turn the.ipynbfiles into markdown - Replace relative image file paths so that they work on your new built site
- Clean up formatting issues for things like MathJax to display properly
- Place all these generated files in the
/_build/directory.
You can the push the changes to GitHub, which will automatically build a Jekyll site with your newly-created Markdown files. We’ll cover this next.