Skip to content

Table of content on an article #97

Answered by Foxtrek64
TechWatching asked this question in Q&A
Discussion options

You must be logged in to vote

When I was playing with this, I ended up doing this through some razor code.

It never ended up in my final project, but the debugging class that shows how I did it still exists. Also, be sure to set GatherHeadingsLevel to a value of higher equal to the deepest header (h1 being 1, h2 being 2, and so on) in your global config.

I should also point out that this only works with markdown pages. Razor pages are not supported since not all of them are valid html documents on their own. Some are C# scripts or partials.

See also #58

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@daveaglick
Comment options

Answer selected by daveaglick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants