Skip to main content

A sphinx extension for including notebook files from outside the sphinx source root.

Normally, Sphinx will only allow you to add files that are situated inside the source directory, but you might want to include files from another directory, for example a central ‘examples’ folder. For RST files these can be linked with include directives inside another RST file. For notebooks, there’s nbsphinx-link!

Usage

  • Install the package.

  • Add ‘nbsphinx_link’ to extensions in Sphinx config ‘conf.py’

  • Add a file with the ‘.nblink’ extension where you want them included.

The .nblink file is a JSON file with the following structure:

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

Optionally the “extra-media” key can be added, if your notebook includes any media, i.e. images. The value needs to be an array of strings, which are paths to the media files or directories to include. Note that this is not needed if the images are added as attachments to markdown cells.

Further keys might be added in the future.

Note that the documentation of this project might serve as a further resource!

Release files for nbsphinx-link 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nbsphinx-link 1.4.1
File Size Uploaded
nbsphinx_link-1.4.1.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nbsphinx-link 1.4.1
File Interpreter ABI Platform
nbsphinx_link-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page