Intersphinx mapping is broken for notebook blog posts

Open
#256 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter-notebook, python
Domain
documentation

Research direction

Start by reproducing the rendered links in a notebook blog post such as modeling coronal loops and compare them with a post written in reStructuredText. Read the nbsphinx conversion behavior and the related spatialaudio/nbsphinx#89 issue. Done means intersphinx references such as ~ndcube.NDCube render as links in notebook posts, or the upstream limitation is clearly documented.

Written by the indexing model from the issue text.

Description

The posts written as Jupyter notebooks (e.g. modeling coronal loops) do not respect links to the docs via intersphinx mapping. Posts written as normal reStructured text don't seem to have this issue.

I think this has something to do with how nbsphinx converts the markdown in the cells to reST. This may possibly be related to spatialaudio/nbsphinx#89.

As an example of what this looks like in the rendered raw html, this is an intersphinx mapping `~ndcube.NDCube` rendered (incorrectly) in the notebook,

<p><code class="docutils literal notranslate"><span class="pre">~ndcube.NDCube</span></code></p>

and rendered correctly in the case of a post written in pure reST,

<a class="reference external" href="https://docs.sunpy.org/projects/ndcube/en/stable/api/ndcube.NDCube.html#ndcube.NDCube" title="(in ndcube v1.3.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">NDCube</span></code></a> 

This is really an upstream issue for nbsphinx I guess, but it does mean all of the links in those notebook blog posts do not work.

Dominant language
Jupyter Notebook
Stars
24
Forks
38
Avg merge
18h 37m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/sunpy.org

All issues in sunpy/sunpy.org

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.