Chapters and Subchapters

GitBook uses a SUMMARY.md file to define the structure of chapters and subchapters of the book. The SUMMARY.md file is used to generate the book’s table of contents.

The SUMMARY.md‘s format is simply a list of links, the name of the link is used as the chapter’s name, and the target is a path to that chapter’s file.

Subchapters are defined simply by adding a nested list to a parent chapter.

Simple example

  1. # Summary
  2. * [Chapter 1](chapter1.md)
  3. * [Chapter 2](chapter2.md)
  4. * [Chapter 3](chapter3.md)

Example with subchapters split into parts

  1. # Summary
  2. * [Part I](part1/README.md)
  3. * [Writing is nice](part1/writing.md)
  4. * [GitBook is nice](part1/gitbook.md)
  5. * [Part II](part2/README.md)
  6. * [We love feedback](part2/feedback_please.md)
  7. * [Better tools for authors](part2/better_tools.md)