Skip to content

how do i exclude a specific heading? #69

Answered by allejo
zoofytech asked this question in Q&A
Discussion options

You must be logged in to vote

Two ways of accomplishing this and it depends on the situation that you want.

  1. If you want to ignore all headings that are level 1 (i.e. <h1> or #), you can make use of the h_min parameter; set it to 2 and it will only include headings level 2 and above (i.e. <h2> or ##). You can also limit the other side with h_max, so say you want to ignore <h6> from the TOC.
  2. If you want to exclude ONLY specific headings, you can attach the .no_toc class to the headings you want to exclude.
    # Heading 1
    {:.no_toc}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zoofytech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants