We use jupyterbook to create a condensed, single interface to all our course materials. This book will be autogenerated and published to [https://neuromatchacademy.github.io/course-content] every time a PR is merged into the master branch.
The Github workflow is defined in .github/workflows/publish-book.yml.
In order to build the book locally, you will need to do the following:
- Install dependencies
pip install jupyter-book==0.10.2
Do not install jupyter-book 0.11 or later at this point, as there are breaking changes in how it handles the table of contents file we generate.
- Create a symlink in the book dir to the tutorials dir. From the repo root directory:
ln -s ../tutorials book/tutorials
ln -s ../projects book/projects
- Prepare repo for book building
python ci/generate_book.py
This will use the tutorials/materials.yml to create the _toc.yml file in the book directory. It will also be responsible for creating any additional markdown files or modifying any tutorial notebooks specifically for book generation.
No changes created by this script should be committed to the repo.
- Build the book
jupyer-book build book