Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add to tag list with custom Sphinx role #76

Open
jlconlin opened this issue Oct 7, 2020 · 5 comments
Open

How to add to tag list with custom Sphinx role #76

jlconlin opened this issue Oct 7, 2020 · 5 comments

Comments

@jlconlin
Copy link

jlconlin commented Oct 7, 2020

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.

@nabobalis
Copy link
Contributor

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

@jlconlin
Copy link
Author

jlconlin commented Oct 7, 2020

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

@nabobalis
Copy link
Contributor

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.

@SilverRainZ
Copy link
Contributor

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
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants