[IPython-User] Sphinx live link to nbviewer view of notebook

Matthew Brett matthew.brett@gmail....
Wed Apr 3 16:32:43 CDT 2013


Hi,

On Wed, Apr 3, 2013 at 1:54 PM, Martijn Vermaat <martijn@vermaat.name> wrote:
>> Did I miss something specific in the links?
>
> I don't think this is possible directly in plain Sphinx, so yes, you
> could write a (trivial) Sphinx extension to do this similar to what
> Doug did for linking to bug reports.
>
> So you'd be able to write something like
>
>     :nbview:`gist number`
>
> or
>
>     :nbview:`url to your notebook`
>
> which would render as a Notebook Viewer link for your notebook (or it
> could render as two links, one to the raw notebook and one to the
> viewer).
>
> Or maybe I misunderstood your question?

No, but I think that still needs the extra piece, because at sphinx
build time, sphinx does not know the eventual fulll URL of the raw
notebook.  Of course I could specify that in a conf flag or some such,
but it would be nicer to be able to have the page itself work out its
full URL,

Cheers,

Matthew


More information about the IPython-User mailing list