Skip to content

SUMMARY.md / Table of Contents: Parts are being ignored #4536

Description

@NeatNit

SUMMARY.md currently looks like this:

# The Rust Programming Language

(Intro stuff)

## Getting started

- (Chapters 1 to 6)

## Basic Rust Literacy

- (Chapters 7 to 12)

## Thinking in Rust

- (Chapters 13 to 18)

## Advanced Topics

- (Chapters 19 to 21 + Appendix)

None of the headers are actually being used. This is because:

  1. The first header # The Rust Programming Language is always ignored.
  2. All headers after that must be h1, otherwise they are ignored too.

This is according to:
https://rust-lang.github.io/mdBook/format/summary.html

  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.

[..]

  1. Part Title - Level 1 headers can be used as a title for the following numbered chapters. [..]. Part titles must be h1 headers (one #), other heading levels are ignored.

This seems like a mistake, assuming the part titles were meant to be visible. The fix is easy:

-## Getting started
+# Getting started

-## Basic Rust Literacy
+# Basic Rust Literacy

etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions