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

Add disableToc parameter to not show TOC on a page #48

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

earnestma
Copy link
Contributor

@earnestma earnestma commented Feb 11, 2022

disableToc: true can be set in page frontmatter to not show the table of contents for that page.

Copy link
Owner

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit :')) Looks good and thanks for submitting this!

layouts/_default/single.html Outdated Show resolved Hide resolved
Copy link
Owner

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@jackyzha0 jackyzha0 merged commit fa3bc3d into jackyzha0:hugo Feb 11, 2022
@meleu
Copy link
Contributor

meleu commented Apr 3, 2022

I'd like to suggest using enableToc: false to achieve this same result. It seems more intuitive.

What do you guys think?

Talking about myself:

When I saw enableToc: true in data/config.yaml, I intuitively thought that using enableToc: false in a page's frontmatter would be the way to disable ToC for that page.

I had to look into the partials code to figure out that it's done via disableToc: true.

@jackyzha0
Copy link
Owner

This makes sense! Not super urgent for me right now but feel free to open a PR for this if you so wish :))

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

Successfully merging this pull request may close these issues.

None yet

3 participants