Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Open In Colab

This page explains how to add your own notebooks and configure project metadata in JupyterBook v2 (MyST).

Configuring Your Book with myst.yml

In JupyterBook v2, all configuration lives in myst.yml at the repository root.

Open myst.yml and set:

project:
  title: My Book Title
  description: A short description of your book
  authors:
    - name: Your Name
  github: https://github.com/your-username/your-repo

Updating the Table of Contents

The project.toc section in myst.yml controls navigation. Add pages without the file extension:

project:
  toc:
    - file: intro
    - title: Getting Started
      children:
        - file: notebooks/adding_contents
    - title: Features
      children:
        - file: notebooks/features
        - file: notebooks/section_markdown_page

Project Structure (JupyterBook v2)

myst.yml                   ← All config + TOC
intro.md                   ← Landing page
requirements.txt           ← Python dependencies
images/                    ← Static assets (root level)
    banner_image.png
notebooks/                 ← Content pages
  adding_contents.ipynb
  features.ipynb
  section_markdown_page.md
extensions/                ← Helper scripts (optional)
.github/workflows/         ← GitHub Actions CI/CD

Important: The images/ folder lives at the project root (same level as myst.yml). Paths in site.options.logo, project.banner, etc. are relative to myst.yml.

Add Notebooks and Content

  1. Add new .ipynb or .md files to the notebooks/ folder.

  2. Use clear, descriptive filenames such as chapter_name.ipynb.

  3. Register each new file in the project.toc section of myst.yml.

  4. Keep each notebook focused on a single topic.

Local Preview

pip install -r requirements.txt
jupyter book start        # live-reload dev server → http://localhost:3000
jupyter book build        # static HTML → _build/html/index.html