Currently, I have a folder called images in the nbs folder that contains all the images that I use in my notebooks. When I run nbdev_build_docs, it duplicates the images folder at docs/images/.
My question is, is this duplication of the image folder necessary? Or is there some way around it?
Yes itβs necessary- this is the only way to make the files visible to the build system of Jekyll. Otherwise you would have to copy them yourself and change all the links. Nbdev automated all this for you
This isnβt working in my case. Iβve βimagesβ folder in the βnbsβ folder, few of the images added earlier have been copied but it is not working with the recent ones. Does this have anything to do with notebooks kept in sub-directories?
I did @hamelsmu and yes, it seems like notebooks in subfolders is not yet supported. I failed to reporting jekyll/yaml errors though, so these are the errors from my log when I run make docs_serve
Invalid theme folder: _includes
YAML Exception reading /home/.../docs/visualize.grad_cam.html: (<unknown>): did not find expected key while parsing a block mapping at line 3 column 1
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
Iβm currently using find with xargs as a workaround but I really want this to be supported by nbdev. One more thing I realized, as mentioned here, it was okay to have symlink in nbs folder but weβd need to do the same for subdirectories as well, so might need think about some alternative. Iβd like to make a feature request for this. Should I post about it on forums or make an issue on nbdev repository?
You can post it on the forum. I personally donβt support this feature as for me, subfolders should contain examples that donβt need conversion/docs (like in the fastai2 repo) and there is no feature of nbdev that could be helped by having subfolders.