-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Customize automatically generated TOC on jekyll #120
Comments
I want to specify For example, it would be nice to be able to specify them as follows. ---
layout: post
title: "Welcome to Jekyll!"
toc:
min_level: 2
--- |
Hi @daipom currently in the main repository of Minimal Mistakes there is this file https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/toc.html Which allows using the following command This should be added after the front matter on the first line before the article text. For this the This afternoon if I have some time I'll take a look at it and let you know if it works as I told you. Best regards, |
@schmittnieto Thanks!
My problem is solved. Thanks! |
In _config.yml I have the following setting that ensures that only h2 elements show up in the automatically generated table of contents.
toc:
min_level: 2 # default: 1
max_level: 2 # default: 6
This works fine, but on some pages, I would like to include h3 elements in the toc as well. So I want to change the max_level to 3 in a particular case. Is this possible? I want to change max_level value dynamically from the template code. Please help
The text was updated successfully, but these errors were encountered: