NkS
February 27, 2015, 9:44am
1
In hugo v0.`2, I am using TOC. This is a snippet
Status.
.
.
.
.
## Status{#status}
After updated the version into v0.13, the header is generated with some numbers <h2 id="status-232sfdf">Status</h2>
. TOC is not working because of this.
How do I disable the generation?
Regards,
NkS
bep
February 27, 2015, 11:16am
2
[blackfriday]
plainIdAnchors = true
Just wanted to ask a question on shortcodes without creating a new topic:
How do I create an in-page anchor not at a header? Say at the beginning of a specific paragraph?
I tried doing something like this:
<a name="myanchor"></a>The paragraph begins like blah blah blah
Obviously it doesn’t work because when I use relref
, the unique identifier gets appended.
When I try this
<a name="{{< relref "#myanchor" >}}"></a>The paragraph begins like blah blah blah
relref doesn’t work, because it is generated with an # in the beginning.
When I try this
<a name="{{< relref "myanchor" >}}"></a>The paragraph begins like blah blah blah
everything just breaks, I get bad html and something like Page not found
inside of <a name=
Of course I can either turn on plainIdAnchors
or hack on it, adding the identifier manually, like: <a name="myanchor:b23efc10a"></a>
But it obviously isn’t the right way. What should I do?
how about not using relref when you reference to the anchor?
[some text](#myanchor)
should work just fine.
bep
September 11, 2015, 6:53am
6
You can disable the funky IDs in config.toml:
[blackfriday]
plainIdAnchors = true