When I set title on a document, it uses that as the first H1 in the page, which is fine. I can adopt the pattern of only using second level headings and beyond in my markdown.
But the table of contents generated for me doesn’t include the first H1, which makes the TOC look off.
If I have a page like this:
---
title: Objects and Stuff
---
## Big Objects
Big Objects
# Little Objects
Little Objects
It looks like the generated TOC isn’t taking into account the front matter title, but if I go ahead and ad my own first level title, it screws up the look of the page because I get two H1s in the HTML.
The Hugo Learn Theme generated TOC is still trying to display a level 1 heading and failing, looking odd.
But The HTML body looks good, using the default H1 generated from title.
I hope that better describes what I am trying to fix. I don’t mind either approach: writing my own level 1 headings or letting Hugo pick title and make a H1 out of it. I don’t mind if I need to put to some custom work to fix either situation. But I am also interested in what the “Hugo best practice” is, if I can do that.
Basically it doesn’t make sense to print out the h1 in the toc as it should the only h1 in the whole document and so would only add up to the nesting without any gain.