nbsphinx-link
latest

Installation and usage

  • Installation
  • Introduction
    • Image including example
nbsphinx-link
  • Docs »
  • nbsphinx-link 1.3.1.dev documentation
  • Edit on GitHub

nbsphinx-link¶

Version: 1.3.1.dev

nbsphinx-link is a sphinx extension built on nbsphinx that allows you to include Jupyter notebooks that sit outside your sphinx source directory in your documentation.

In this documentation, the Installation section is written as a notebook included with nbsphinx, while the Introduction section is written as a notebook included with nbsphinx-link.

Contents¶

This page was generated from docs/source/installing.ipynb.

Installation¶

To install nbsphinx-link, run the following from a shell:

pip install nbsphinx-link

and add both nbsphinx and nbsphinx_link as extensions in your Sphinx build config, typicalyl in conf.py:

extensions = [
    # ...
    # any other extensions you need,
    # ...
    'nbsphinx',
    'nbsphinx_link',
]

This page was generated from notebooks/introduction.ipynb.

Introduction¶

For a start, consider the documentation folder of the nbsphinx-link repository. This documentation page itself comes from a linked notebook:

[1]:
def foo(a):
    return 'foo' + a

print(foo('bar'))
foobar

After the installation steps (installing the package, and adding nbsphinx_link as an extension in the Sphinx config), you can link external notebooks by including .nblink files in your documentation source tree. The format of the link file is as follows:

{
    "path": "relative/path/to/notebook"
}

It should then Just Work. For further information and examples, consider inspecting the Sphinx config file of the nbsphinx-link repository!

Image including example¶

Look at this happy smile, because the notebook made it in the docs.

Image path next to notebook¶

python logo 1

Image path in subdirectory notebook¶

python logo 2

Image path in sub-subdirectory notebook¶

python logo 3

[ ]:


© Copyright 2018, Vidar Tonaas Fauske Revision f1682a8b.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.