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

[ ]: