Stop anchored headings? #323
-
Hi folks, Still pretty new here to Hugo and Markdown. Love the theme, fits perfectly for what I'd like to use it for - a basic 'link tree' for my socials etc - but I have a slight issue that I can't seem to stop happening. Granted, I'm 99.9% sure it's something I'm doing wrong, I've definitely got a feeling I'm using Hugo/MD incorrectly to be fair. However, anytime I try to use a heading (H1, H2, H3, all the way down, same issue) - I get an anchor / hashtag link at the end of it. The hash / link refers back directly to itself as a hyperlink to that section of the page. I've delved into the code and I can see that it's something to do with the anchored_headings.html partial under layouts. If I try fiddling with it, removing it, the site breaks. It's being referenced by single.html under layouts, same issue if I try to remove this. Thanks for taking the time to read - if you get a minute, could you possibly help a n00b out? :] Edit: Forgot to add, I've also tried adding; anchor_sections: false All into the config.yml and the pages themselves directly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes there is no option to disable anchored heading but you could tweak it out .. What you can do simply is override the template by following this guide Override theme template And put the following into {{ . }} |
Beta Was this translation helpful? Give feedback.
Yes there is no option to disable anchored heading but you could tweak it out ..
What you can do simply is override the template by following this guide Override theme template
And put the following into
layouts/partials/anchored_headings.html
of your site root