[sphinx-users] relative image paths work locally, but not in online docs (github pages)

2020-03-25 Thread Moritz Lürig
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:



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 sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/4777a71f-2601-4c33-bd0c-49a1b3eb93c9%40googlegroups.com.


[sphinx-users] relative image paths work locally, but not in online docs (github pages)

2020-03-25 Thread Moritz Lürig
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:



The images are stored in the asses in the root directory, because 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 sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/44b20f99-ff60-4cd5-a524-a9ec0cf0b6c1%40googlegroups.com.