Create your Jupyter Book template

This page covers how to create a Jupyter Book with your own content.You've got three primary ways to create your Jupyter Book.

by starting with a minimal book

Running the following command will create a new Jupyter Book with a fewcontent pages and a Table of Contents to get you started:

  1. jupyter-book create mybookname

This will create a new book using your content in mybookname/. You'll then need to

  • Add your content to mybookname/content/
  • Modify mybookname/_data/toc.yml to match your content
  • Modify mybookname/_config.yml to the configuration you'd like Note that if you choose to create the book template and later add contentto it, you can quickly generate a basic Table of Contents by runningthe following command:
  1. jupyter-book toc mybookname/

by modifying the Demo Book

If you'd like to see a more fully-functioning demo book for inspiration, you cancreate the book that lives at the jupyter-book websiteby adding the —demo flag:

  1. jupyter-book create mybookname --demo

See the previous section for a description of all of the relevant files youshould modify for your book.

by using a pre-existing book configuration

If you've used Jupyter Book before, you can quickly generate a new book using a pre-existingset of folders and files. These are all available as arguments in the command line interface.

For example, if you have your book's content in a folder structure like this:

  1. myoldbook/
  2. ├── content
  3. ├── root_test.md
  4. └── tests
  5. ├── _data
  6. └── toc.yml
  7. ├── images
  8. └── tests
  9. ├── mylicense.md
  10. ├── myextrafolder
  11. └── myextrafile.txt
  12. └── config.yml

You can generate a Jupyter Book from it with the following command:

  1. jupyter-book create mybookname --content-folder myoldbook/content \
  2. --toc myoldbook/_data/toc.yml \
  3. --config myoldbook/_config.yml \
  4. --license myoldbook/mylicense.md \
  5. --extra-files myoldbook/myextrafolder

This will create a new Jupyter Book using these files. In this case, you need to ensurethat the values in _config.yml are correct, and that the Table of Contents (toc.yml) filehas the structure that you want.

Next step: convert your book content into HTML

Now that you've got a Jupyter Book folder structure, we can createthe HTML for each of your book's pages. That's covered in the nextsection.

This page was created by The Jupyter Book Community