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
From the limited context that a directive has access to, it might be difficult to automatically find the nearest section header. Possibly by manually parsing the document starting at SphinxDirective.lineno? Or is there other info available in SphinxDirective.state that could be used here?
Option 2: user-specified anchor
Alternatively, the directive could be updated with an option to create a new anchor, with usage like:
```{tags} tag_1, tag_2
:ref: my-custom-anchor```
And then:
Update TagLinks to insert a ref node directly before the tag list
Would there be a way to first check if the ref already exists elsewhere?
Update links on tag index and tag pages to point to site.com/_tags/page.html#my-custom-anchor.
Option 3: automatic anchor
Or, instead of adding a directive option, TagLinks could automatically add a unique ref to each instance (like {document_name}-tags). Maybe that could be enabled/disabled with an extension config option.
Would it be possible to have tags associated with section headers or anchors instead of per page?
The text was updated successfully, but these errors were encountered: