spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
449 stars 130 forks source link

Incompatibility with sphinx-press-theme #443

Open rsayn opened 4 years ago

rsayn commented 4 years ago

Hi, I'm using nbsphinx in one of my projects along with sphinx-press-theme. When I include a Jupyter Notebook in the toctree:: directive, the page header is broken.

The generated HTML file looks OK, but when inspecting the code inside the browser I noticed that some of the tags in the ipynb page are different (see right HTML tree in the attachment). This is probably due to some processing step I'm not aware of.

image

mgeier commented 4 years ago

Thanks for the report!

"the page header is broken" isn't really enough information.

Can you please provide a minimal example?

If it is a visual problem, maybe a screenshot would help clarify?

rsayn commented 4 years ago

Sure, here's a screenshot of a page generated from a standard RST file: image

And here's a page generated from an .ipynb file: image

From what I saw, there are a few custom tags (<navlinks/>, <sidebar/>, <navbar/>) that are processed in some way and get translated into <nav class="nav-links"/> etc. For some reason, this doesn't happen in the .ipynb generated HTML file.

I managed to write a quick/dirty fix by manually adding CSS classes on said tags, but it's not something I'd like to keep around in the long run...

Let me know if you need anything else.

mgeier commented 4 years ago

OK, I can see the problem now.

Let me know if you need anything else.

As mentioned above, a minimal example, please.