How to utilize local Sphinx extensions in Jupyter Book?
See original GitHub issueHey all,
Sphinx has a great tutorial on developing extensions. Of note, it explains, by way of conf.py
, how to utilize a local Sphinx extension (i.e. one not available on PyPI):
import os
import sys
sys.path.append(os.path.abspath("./_ext"))
extensions = ['helloworld']
Of course, one can do the latter part of appending an extension to the extension list in Jupyter Book. Your documentation explains that one should modify _config.yml
like so:
sphinx:
extra_extensions:
- extension1
- extension2
However, the important part — adding the local extension’s path — is impossible via _config.yml
alone.
How would I go about using local Sphinx extensions as part of the Jupyter Book build process?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
How Jupyter Book and Sphinx relate to one another
These extensions grow Sphinx's capabilities so that it can handle the use-cases of Jupyter Book. An example: MyST Markdown. Let's take the case...
Read more >Jupyter Notebook Tools for Sphinx — nbsphinx version 0.8.10
Install nbsphinx · Edit your conf.py and add 'nbsphinx' to extensions . · Edit your index.rst and add the names of your *.ipynb...
Read more >nbsphinx - Read the Docs
nbsphinx is a Sphinx1 extension that provides a source parser for ... URL or local path to override the default URL for Jupyter...
Read more >August 2021 – OUseful.Info, the blog…
At the heart of my local Jupyter Book deployment, I see the Jupyter ... or Jupyter notebooks using the Sphinx document processing toolchain....
Read more >How do I reference a relative path in Jupyter-book
@NicoBako. No. What I did was add code in the config file to copy over the notebooks into my Sphinx folder; as part...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Huh, well I’ll be darned, nice job @mmcky! Your PR works just fine for my local extension. Bang up job 😄
I also like your syntax choice more than my previous suggestion. 👍
@choldgraf @hashslingrz I have added support for
local_extensions
in PR #1102. Let me know what you think re: syntax and then I can finalise with a test case etc.