Skip to content

Steps for custom role in Jupyter Book? #101

Answered by choldgraf
matthew-brett asked this question in Q&A
Discussion options

You must be logged in to vote

further sleuthing that I suspect @chrisjsewell has figured out as well (see below)

if I do:

def setup(app):
    # Add runrole roles
    app.add_role('datapage', data8pagerole)
    app.add_role('data8page', data8pagerole)

and add this to a page

{data8page}`some text`

{datapage}`some text`

then the datapage one shows up as expected and the data8page does not. So I suspect that this is something about there being a number in your role name.

I further suspect this because I see @chrisjsewell just opened up executablebooks/markdown-it-py#34 which adds numbers to the regex in the role search :-)

Replies: 7 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@choldgraf
Comment options

@matthew-brett
Comment options

Comment options

You must be logged in to vote
1 reply
@matthew-brett
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@chrisjsewell
Comment options

@choldgraf
Comment options

@chrisjsewell
Comment options

Answer selected by matthew-brett
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants