Thanks, Stefano. I guess some confusion on my side arises from Sphinx behavior to copy images to an "_images" folder inside the docs folder. Because I am using multiple source directories (using `sphinx-multibuild`) and also jupyter notebooks converted to html (using `nbsphinx`) I am trying to avoid multiple locations at which the images are stored. Therefore, my original question remains: why to relative paths work locally, but not online? I.e. having a central "assets" works locally, but not online - is that because if github pages are specified to be in the docs folder of the master branch, they cannot go beyond that level?
On Thursday, 26 March 2020 08:35:51 UTC+1, Stefano David wrote: > > > > On Wednesday, 25 March 2020 12:16:35 UTC+1, Moritz Lürig wrote: >> >> My project looks like this: >> >> proj ==> root dir >> proj/docs ==> sphinx build dir >> proj/assets ==> images >> >> https://github.com/mluerig/phenopype ==> repo >> https://mluerig.github.io/phenopype/ ==> docs >> https://mluerig.github.io/phenopype/tutorial_2_phenopype_workflow.html ==> >> converted jupyter notebooks >> >> Problem: I use relative paths in html tags to add images to my >> documentation: >> >> <img src="../assets/figures/header.png"> >> > If you add figures properly using figure:: or image:: you should just > write e.g., > > .. image:: /asset/figures/header.png > > But looking quickly at your repo, all images are included via raw:: html, > so my guess is that this is not sphinx's fault, but that the /assets/ > directory is not correctly rechable from the place where the final html is > located. > > my 2 cents, > Stefano > > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/316739cf-e1c8-4149-a5ce-13071cb6ecbe%40googlegroups.com.
