Hi,
I'm hoping for some advice from y'all on the Sphinx-onic way of writing my Sphinx extension.
I'm writing an extension to build html pages from IPython notebooks:
I've got a role like this:
Here is :brole:`my notebook <the_notebook.ipynb>`
At the moment I'm doing something which feels terrible which is to build the html pages inside the role code, and pump that html into the html build directory. It kind of works, but it means I have a problem implementing another role::
Here's a link to :nblink:`that same notebook <the_notebook.ipynb>`.
This means I need to be able to collect all the notebooks I will build, with any options I passed with customized versions of ``brole``, and then go back and check my links later, which is not easy to do with my current crude setup. More motivation here if that's not clear:
So - I'd like to as - what is the right way of doing this? Can I / should I store parameters for each ``brole`` in the role code, and then hook into other sphinx events to go back and write the html / fix the links?
Thanks very much for any advice,
Cheers,
Matthew