2. Create your book#
Now that you set up the environment of your books, it is time to create a book.
2.1. Download the TU Delft template#
TU Delft has developed a template book to start with and update it with your content. Download this template from the TU Delft repository:
2.2. Anatomy of a Jupyter Book#
There are three things that you need in order to build a Jupyter Book, each of which is already part of the TU Delft template that you have downloaded before:
A configuration file (
_config.yml
)A Table of Contents (
_toc.yml
)Your book’s content
For example, take a look at the template book that you just downloaded:
$ tree template-book
template-book/
├── content
├── images
├── _config.yml
├── _toc.yml
├── intro.md
├── references.bib
└── requirements.txt
There are a few extra files in there that we include to show off some new features, but the required pieces are _toc.yml
, _config.yml
, and content files. You can find more information at Anatomy of a Jupyter Book.
We’ll cover each briefly below, and you can find more information about them elsewhere in this documentation.
2.3. Book configuration (_config.yml
)#
The configuration for your book is in a YAML file called _config.yml
.
You can define metadata for your book (such as its title), add a book logo, turn on different “interactive” buttons, and more.
More about _config.yml?
For more information about your book’s configuration file, see Configuration File.
2.4. Table of Contents (_toc.yml
)#
Jupyter Book uses your Table of Contents to define the structure of your book. For example, your chapters, sub-chapters, etc.
This is a YAML file with a collection of pages, each one linking to a file in your book.
More about _toc.yml?
For more information about your book’s Tale of Contents file, see Table of Contents.
2.5. Book content#
A collection of text files make up your book’s content. These can be one of several types of files. Some of the most common file types are the four files listed below:
a Markdown file (
markdown.md
)a Jupyter Notebook (
notebooks.ipynb
)a MyST Markdown Notebook (
markdown-notebooks.md
)a reStructuredText file (
reStructuredText.rst
)
This Jupyter Book is written entirely in Markdown files. However, you can use whichever type you feel conformable with. (see Types of content source files for a full list).
Warning
All the packages of this book are tested for Markdown files. If you want to use other type of files, make sure that everything works before you publish it to the TU Delft webpage.
2.6. More Information#
Find more information about creating your book: