-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Molecules not displayed if .rst file is located more than one directory deep #9
Comments
Thank you for the kind words and the reproducible example! The issue is here moldoc/src/moldoc/_internal/moldoc.py Lines 61 to 65 in d78de72
Basically, the javascript dependencies are located in the folder I'll have to check the sphinx api to see if there is a nice way around it. I assume I didn't find a way to get around this before but maybe a fresh look is what it takes. In the worst case I can just add more relative imports and that should fix your issue, how deep is your nesting? |
My nesting was 4 directories deep, but I actually already refactored and flattened the directory structure so that it all works for me now. Since this issue seems difficult to solve but has a very easy workaround, maybe just mention it prominently in the docs? |
Fixes issue #9. rst files can now have any amount of nesting they want.
Fixed and released a new version ( |
First of all, thank you very much for this amazing package that makes chemistry documentations so much more beautiful!
I have found one little issue when I wanted to use it for myself: It works great in all
.rst
files that are saved in the same folder asindex.rst
or one folder below, but not if the.rst
file is located two directories deep. In this case, the molecule is simply not displayed.I have created a minimal working example in which you can see this effect. Just download and extract the directory and open
_build/html/index.html
to see the issue or runmake clean && make html; open _build/html/index.html
to make new html files. I tested it with both Chrome and Safari.The issue is not critical and really hard to test for. As a workaround, one can simply flatten the folder structure so that all files are in maximum one subdirectory below the
index.rst
and everything should work.My software:
Mac Sonoma 14.5
Python 3.12.4
moldoc 3.0.0
sphinx 7.4.7
The text was updated successfully, but these errors were encountered: