Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MiTschMR opened this issue Apr 15, 2024 · 2 comments
Closed

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

MiTschMR opened this issue Apr 15, 2024 · 2 comments

Comments

@MiTschMR
Copy link

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)
@MiTschMR MiTschMR added the bug label Apr 15, 2024
@filzrev
Copy link
Contributor

filzrev commented Apr 15, 2024

What's about to specifying _layout: landing metadata to index page.
https://dotnet.github.io/docfx/docs/template.html?q=_layout&tabs=modern#template-metadata

This setting hide both TOC and Affix area though.


hide the TOC on the left side of the page within the modern template as it is handled by the default template.

Latest docfx v2.76.0 change default behaviors to align to default template behavior.
And add _disableToc metadata support to separately hide TOC area. (#9737/ #9741)

@MiTschMR
Copy link
Author

Thanks, that helped a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants