ablog icon indicating copy to clipboard operation
ablog copied to clipboard

How to add to tag list with custom Sphinx role

Open jlconlin opened this issue 5 years ago • 5 comments

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:

  1. Add the name to the tag list.
  2. 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.

jlconlin avatar Oct 07 '20 20:10 jlconlin

Hi @jlconlin, you bring up an interesting use case but I am not certain that it is possible with ablog as it stands.

nabobalis avatar Oct 07 '20 20:10 nabobalis

@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?

jlconlin avatar Oct 07 '20 20:10 jlconlin

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.

nabobalis avatar Oct 07 '20 21:10 nabobalis

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.

SilverRainZ avatar Mar 21 '21 13:03 SilverRainZ

https://sphinx-notes.github.io/any/#categorizing-and-tagging

SilverRainZ avatar Jun 06 '21 16:06 SilverRainZ