Restore heading self links (#2007)

It was a change I did not notice when upgrading Docsy from 0.8.0 to 0.11.0. Docsy changed the way heading self links are generated: they used to be rendered with JS and now they use a Hugo render hook.

This means two things:
- We need to enable them explicitly by overriding the `_default/_markup/render-heading.html` template.
- We need to add the self heading ourselves to headings that are not rendered by Hugo, i.e. HTML headings that we create ourselves.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-11-29 10:38:55 +01:00 committed by GitHub
parent f64eec5a93
commit 7ec9b7f2e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 2 deletions

View file

@ -37,6 +37,7 @@
<h1 id="{{ $anchor }}">
<span class="http-api-method">{{ $method }}</span>
<span class="endpoint{{ if $operation_data.deprecated }} deprecated-inline{{ end }}">{{ $endpoint }}</span>
{{ template "_default/_markup/td-heading-self-link.html" $anchor }}
</h1>
</summary>