<img src="../assets/figures/header.png">sys.path.insert(0, os.path.abspath('../../'))
My project looks like this:
proj ==> root dir
proj/docs ==> sphinx build dirproj/assets ==> imageshttps://github.com/mluerig/phenopype ==> repohttps://mluerig.github.io/phenopype/ ==> docshttps://mluerig.github.io/phenopype/tutorial_2_phenopype_workflow.html ==> converted jupyter notebooksProblem: I use relative paths in html tags to add images to my documentation:<img src="../assets/figures/header.png">
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?
Thanks Stefano. I have never used symlinks before - do you have a public repo I could have a look at, or point me towards instructions on how I would do that?
I don't know about your reason for avoiding duplicate files, but I really would like to make the repo as light as possible. Currently the files in my docs folder make ~60% of the whole repo size, and having all images as duplicates inside docs/_images doesn't help