You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,3 +201,28 @@ The general `toc-entry` is applied to all `li` elements in the `ul.section-nav`.
201
201
202
202
Depending on the heading level each specific entry refers to, it has a second CSS class `toc-XX`, where `XX` is the HTML heading tag name. For example, the TOC entry linking to a heading `<h1>...</h1>` (a single
203
203
`#`in Markdown) will get the CSS class `toc-h1`.
204
+
205
+
#### Anchor injection
206
+
207
+
Anchor injection can be customized with a liquid template:
208
+
209
+
```yml
210
+
toc:
211
+
injection_template: 'path/to/template.html'
212
+
```
213
+
214
+
The template is supplied with the original text content (`heading_text`) and id (`heading_id`) for each heading element:
215
+
216
+
```liquid
217
+
<!-- Append an anchor pilcrow after the heading text, Sphinx style: -->
0 commit comments