Skip to content

Document toc.md and toc.html and make toc.md a reserved file #3090

Description

@szabgab

Problem

In normal circumstances mdbook will generate a file called toc.html that will contain the Table of Contents`. It is used as the TOC for people (and bots) who don't run JavaScript.

If the user creates a file called src/toc.md and references it in SUMMARY.md then mdbook will use it to generated the toc.html file replacing the normally generated one.

Proposed Solution

IMHO this should be avoided.

  1. If there is a an toc.md file the build process should stop with an error toc.md is reserved for internal use.
  2. Regardless of 1. being implemented or not, the behaviour should be described in the documentation so people can search for either toc.html , toc.md or toc and find it.

Notes

See also #3047

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions