-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Set TOC depth freely for every note by using YAML metadata or an option within [toc]
#1532
Set TOC depth freely for every note by using YAML metadata or an option within [toc]
#1532
Conversation
…every note Signed-off-by: Gereon Dusella <git@gereondusella.de>
could resolve #368 |
For now, you can take a look at PR 1306 to see how it pass environment variable config to frontend: #1306 |
…toc depth Signed-off-by: Gereon Dusella <git@gereondusella.de>
Thank you very much for the tip, I've added the feature accordingly. |
Signed-off-by: Gereon Dusella <git@gereondusella.de>
to finish this up, I've added the option to set a custom TOC level within the toc tag, e.g. |
[toc]
Signed-off-by: Gereon Dusella <git@gereondusella.de>
Signed-off-by: Gereon Dusella <git@gereondusella.de>
Signed-off-by: Gereon Dusella <git@gereondusella.de>
seems to be set elsewhere Co-authored-by: Yukai Huang <yukaihuangtw@gmail.com> Signed-off-by: Gereon Dusella <git@gereondusella.de>
db87701
to
3438c57
Compare
@jackycute does this look proper to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @zergar
This commit allows one to set the depth of the table of contents freely by means of YAML metadata or an option directly within the
[toc]
tag (e.g.[toc maxLevel=4]
. The default level can also be set by means of the environment variableCMD_DEFAULT_TOC_DEPTH
, this variable defaults to 3. The toc depth of the automatically generated toc can only be set by setting the level in the YAML or below.The precedence of the toc depth is as follows (highest to lowest):
[toc maxLevel=4]
> YAML metadata >CMD_DEFAULT_TOC_DEPTH
> 3 (default value)Optional Features