How to add to tag list with custom Sphinx role
Description
I'm using ablog as a lab notebook. I've created a custom Sphinx role, :person:. The argument to the role would be the name of a person. With this role, I want to do two things:
- Add the name to the tag list.
- Make the text a link to the tag.
It wasn't clear to me how to do this and was hoping someone could advise me on how to do this.
Hi @jlconlin, you bring up an interesting use case but I am not certain that it is possible with ablog as it stands.
@nabobalis Thanks for the response. I saw the Collection class and assumed that there was a tag collection that I could add to. Is that not the case?
That is a great question that I can not answer. In theory the Collection class is fixed to the ablog types but it might be possible to override it. Even tho I maintain this library, its inner workings do escape me.
Hi @jlconlin , I wrote a extension named sphinxnotes-any which provides a way to custom role and create cross references.
But the "Add the name to the tag list." is not implemented, because there is not "tag" from the eyes of this extension.
https://sphinx-notes.github.io/any/#categorizing-and-tagging