Hi, Hugo’s terrific, thanks to everybody who has participated in building it. There’s one thing I would like to do but haven’t found an option for: remove TOC tags if I decide to not use them. I was thinking that an option such as --disableRSS could be nice, does that sound like a good idea to you? It’s a detail, really, but Hugo is good at removing the bloat (I’m currently converting a WP site to it) that I find it a pity to see those extra tags in my code when I don’t need them.
I’m not following. If you don’t include {{ .TableOfContents }} in your template, Hugo won’t generate the TOC. Are you referring to something different?
Yes, I am using the latest stable. But what is your opinion on adding an option to remove those extra tags when unneeded? I feel like this feature wouldn’t be worth the trouble of writing it but perhaps somebody has a different opinion and would like to see this as well.
The id gets added to any heading in the content, so it’s not related to the .TableOfContents variable. That’s what the reference to TOC brought to mind. So, it could use a name that’s closer to the functionality.
I agree that it adds a little clutter to the HTML (especially with that new fingerprint), but I hadn’t even noticed it until after you pointed it out (even then, it took a couple of tries to actually see it). If it generated a different id each time I ran Hugo, then it would cause unnecessary (and unwanted) changes that would have to be pushed up. But if it’s the same, it doesn’t matter either way to me, especially since I’m not running any JQuery to manipulate the DOM based on id.
On a somewhat related note, I am not the biggest fan of IDs for header tags beiong generated with a hash, like this:
I would much rather have a predictable one like this,
for the purposes of easily creating links from elsewhere in the same page,
and also for comsemtiuc reasons:
<h1 id=“test”>test</h1>
I understand that the reason that hashes are added is to ensure that each one has a unique ID. However, I am wil;ling to manually ensure that all headings on a page are unique myself.
Is there currenlty an option to disable adding hashes?
Ah, thanks for that, I was not aware of this option! Pity that we need 0.13 for this though. I’m collaborating with others who jsut use the hugo binary, so they are stuckl with 0.12 for now.
This is an odd feature to have by default. I can understand that for blog post headings you would want IDs, but for everything it’s quite strange.
It makes the generated HTML constantly change by default which messes with SVN history. If you use the plain option it means that all headings get default IDs that might clash with other things on the page. That seems error-prone to me.
Can it be configured to only apply to certain headings. For instance h1/h2. Then at least you can use lower level ones to avoid it.