nbdev
nbdev copied to clipboard
Broken paths in README.md
Hello,
I have some trouble when I include images in the notebook index.ipynb.
The structure of the folders I am using is as follows:
- main folder
*nbs folder
- library
- figures
My index.ipynb is in nbs folder and in this document I refer to figures in the figures folder through the path `./figures/xxx.png'.
This works well in the documentation but in the autogenerated file README.md the paths to the images are broken. When I open the README.md, I see that the paths are taken as absolute paths instead of relative paths and this would explain the issue.
What would be the best way to fix it?
Thank you very much!
Alexandre
I once resolved it by using absolute (github) paths to refer to the figures. For example:
<img align="center" width="650" src="https://github.com/hugetim/nbstata/raw/master/nbs/jupyter_notebook_example.gif">
(I've since removed that gif, but it worked at the time.)
Hi! I have exactly the same problem, and used the solution proposed by @hugetim previously, but there may be a cleaner way of doing it?
We would only need that when the README is created it adds the folder where index.ipynb is as a prefix to all paths. Any idea on how this can be done?