I fixed it by using an image folder INSIDE the docs directory. Can sphinx not source files from the project directory level? Maybe I got the relative paths wrong...
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"> > > The images are stored in the assets folder in the root directory, from > which they are also accessed by jupyter notebook and the repo-readme. > > Now when i build my docs locally, everything works fine, relative paths > work, but when I push them to the repo (and the github pages), I get broken > links. I tried a bunch of things, e.g. adding this to conf.py: > > sys.path.insert(0, os.path.abspath('../../')) > > I don't know why it's working locally, but not online - does anyone know > where the problem lies? > -- 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/c57882db-1399-478b-8710-c61bd6e9a98e%40googlegroups.com.
