Skip to content

[Question] Hide TOC in modern template on page in root directory #9873

@MiTschMR

Description

@MiTschMR

Describe the bug
A clear and concise description of what the question is about: I would like to hide the TOC on the left side of the page within the modern template as it is handled by the default template.

To Reproduce
Steps to reproduce the behavior:

  1. Add some documentation with subfolders and TOC's on each level
  2. Set the templates in the docfx.json file to default and modern
  3. Switch between the two and compare the page results

More information
The TOC should only be shown on the left side if there is one specified e.g. in a subfolder. The documentation of docfx is a good example of the modern template that utilizes folders and TOCs in there to organize the content. However, if we for instance take a look at the new material template then you will see that the root TOC is used for pages in the root directory, which I do not want. I want it only at the top and can't find a way to do so.

I have several documentation pages like this: https://mitschmr-studios.io/documentation/easyugs/
Having the top TOC e.g. on this index page would look horrible.

Context (please complete the following information):

  • OS: Windows 11
  • Docfx version: 2.73.2 (a rather old one because I can't use the new pdf engine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions