SUMMARY.md

The summary file is used by mdBook to know what chapters to include, in what order they should appear, what their hierarchy is and where the source files are. Without this file, there is no book.

This markdown file must be named SUMMARY.md. Its formatting is very strict and must follow the structure outlined below to allow for easy parsing. Any element not specified below, be it formatting or textual, is likely to be ignored at best, or may cause an error when attempting to build the book.

Structure

  1. Title - While optional, it's common practice to begin with a title, generally # Summary. This is ignored by the parser however, and can be omitted.

    # Summary
    
  2. Prefix Chapter - Before the main numbered chapters, prefix chapters can be added that will not be numbered. This is useful for forewords, introductions, etc. There are, however, some constraints. Prefix chapters cannot be nested; they should all be on the root level. And you cannot add prefix chapters once you have added numbered chapters.

    [A Prefix Chapter](relative/path/to/markdown.md)
    
    - [First Chapter](relative/path/to/markdown2.md)
    
  3. Part Title - Headers can be used as a title for the following numbered chapters. This can be used to logically separate different sections of the book. The title is rendered as unclickable text. Titles are optional, and the numbered chapters can be broken into as many parts as desired.

    # My Part Title
    
    - [First Chapter](relative/path/to/markdown.md)
    
  4. Numbered Chapter - Numbered chapters outline the main content of the book and can be nested, resulting in a nice hierarchy (chapters, sub-chapters, etc.).

    # Title of Part
    
    - [First Chapter](relative/path/to/markdown.md)
    - [Second Chapter](relative/path/to/markdown2.md)
       - [Sub Chapter](relative/path/to/markdown3.md)
    
    # Title of Another Part
    
    - [Another Chapter](relative/path/to/markdown4.md)
    

    Numbered chapters can be denoted with either - or * (do not mix delimiters).

  5. Suffix Chapter - Like prefix chapters, suffix chapters are unnumbered, but they come after numbered chapters.

    - [Last Chapter](relative/path/to/markdown.md)
    
    [Title of Suffix Chapter](relative/path/to/markdown2.md)
    
  6. Draft chapters - Draft chapters are chapters without a file and thus content. The purpose of a draft chapter is to signal future chapters still to be written. Or when still laying out the structure of the book to avoid creating the files while you are still changing the structure of the book a lot. Draft chapters will be rendered in the HTML renderer as disabled links in the table of contents, as you can see for the next chapter in the table of contents on the left. Draft chapters are written like normal chapters but without writing the path to the file.

    - [Draft Chapter]()
    
  7. Separators - Separators can be added before, in between, and after any other element. They result in an HTML rendered line in the built table of contents. A separator is a line containing exclusively dashes and at least three of them: ---.

    # My Part Title
    
    [A Prefix Chapter](relative/path/to/markdown.md)
    
    ---
    
    - [First Chapter](relative/path/to/markdown2.md)
    

Example

Below is the markdown source for the SUMMARY.md for this guide, with the resulting table of contents as rendered to the left.

# Summar

<!-- - [zh-cn](index.md) -->

[说明](index.md)

---

# 中文

- [指南](zh-cn/README.md)
- [命令](zh-cn/cli/README.md)
  - [init](zh-cn/cli/init.md)
  - [build](zh-cn/cli/build.md)
  - [watch](zh-cn/cli/watch.md)
  - [serve](zh-cn/cli/serve.md)
  - [test](zh-cn/cli/test.md)
  - [clean](zh-cn/cli/clean.md)
- [结构](zh-cn/format/README.md)
  - [SUMMARY.md](zh-cn/format/summary.md)
    - [草稿章节]()
  - [配置](zh-cn/format/configuration/README.md)
    - [常规](zh-cn/format/configuration/general.md)
    - [预处理](zh-cn/format/configuration/preprocessors.md)
    - [渲染](zh-cn/format/configuration/renderers.md)
    - [环境变量](zh-cn/format/configuration/environment-variables.md)
  - [主题](zh-cn/format/theme/README.md)
    - [index.hbs](zh-cn/format/theme/index-hbs.md)
    - [语法高亮](zh-cn/format/theme/syntax-highlighting.md)
    - [编辑器](zh-cn/format/theme/editor.md)
  - [数学公式支持](zh-cn/format/mathjax.md)
  - [mdBook特定功能](zh-cn/format/mdbook.md)
  - [Markdown](zh-cn/format/markdown.md)
- [持续集成](zh-cn/continuous-integration.md)
- [开发者](zh-cn/for_developers/README.md)
  - [预处理器](zh-cn/for_developers/preprocessors.md)
  - [替换后端](zh-cn/for_developers/backends.md)
- [贡献列表](zh-cn/misc/contributors.md)

----

# 原文

- [en](index.md)
  - [Introduction](en/README.md)
  - [Command Line Tool](en/cli/README.md)
    - [init](en/cli/init.md)
    - [build](en/cli/build.md)
    - [watch](en/cli/watch.md)
    - [serve](en/cli/serve.md)
    - [test](en/cli/test.md)
    - [clean](en/cli/clean.md)
  - [Format](en/format/README.md)
    - [SUMMARY.md](en/format/summary.md)
      - [Draft chapter]()
    - [Configuration](en/format/configuration/README.md)
      - [General](en/format/configuration/general.md)
      - [Preprocessors](en/format/configuration/preprocessors.md)
      - [Renderers](en/format/configuration/renderers.md)
      - [Environment Variables](en/format/configuration/environment-variables.md)
    - [Theme](en/format/theme/README.md)
      - [index.hbs](en/format/theme/index-hbs.md)
      - [Syntax highlighting](en/format/theme/syntax-highlighting.md)
      - [Editor](en/format/theme/editor.md)
    - [MathJax Support](en/format/mathjax.md)
    - [mdBook-specific features](en/format/mdbook.md)
    - [Markdown](en/format/markdown.md)
  - [Continuous Integration](en/continuous-integration.md)
  - [For Developers](en/for_developers/README.md)
    - [Preprocessors](en/for_developers/preprocessors.md)
    - [Alternative Backends](en/for_developers/backends.md)
  - [Contributors](en/misc/contributors.md)