-
Notifications
You must be signed in to change notification settings - Fork 132
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
Split code into several files? #667
Comments
Thanks for creating this issue based on my lengthy comment. |
One idea that came to my mind was - is it possible to fragment the code according to the phases as listed at https://www.sphinx-doc.org/en/master/extdev/index.html#build-phases? That'd be really handy for issues like the TOC question or when it comes to link resolution. Another idea could be to extract the template code into separate text files. |
I'm not so sure. I guess only two of the phases would be relevant, phase 1 and phase 3, right? So those would be submodules? Something like
Yeah, on the one hand this would definitely be an option, on the other hand the template code is a work-around anyway (see #36). It would be nice to move the LaTeX and CSS stuff into separate files, but it never bothered me enough to look into it. In case of CSS I'm also not so sure about the performance implications of having the CSS as separately hosted file vs. inline in the HTML. |
Your propositions sound great to me! As #36 has been around for a while, the interims solution seems to be good enough to stick with it for another few months or years? Well, I guess that the CSS could remain embedded into the HTML file as long as the HTML file is extracted from the Python code. I could try to extract LaTeX and HTML/CSS into separate files and create a related PR if you'd like. |
Yes, #36 might stay open for a while ... we could try to move the RST template to a separate file until then.
I don't understand what you mean by that.
Yes, sure, if you want to. However, please note that |
I've started with this in #705. I need this for the new gallery style (to store some default images). For now, I'm only planning to move the CSS out of the main file. If you want to move more things, feel free to create a PR. |
It turns out that having the LaTeX stuff in a separate files makes it easier to include a Now the |
Thank you @mgeier for pushing the idea forward. I am currently involved in a quite time-consuming project. I hope to give a helping hand later! |
I just stumbled over this behavior in an up-to-date version. I tried to understand what is going on in https://github.com/spatialaudio/nbsphinx/blob/master/src/nbsphinx.py but reading and comprehending close to 2400 lines of code is no joke. @mgeier is there a chance that in the future this code is split up into several files, each dealing with specific concerns? That would make it much easier to contribute.
Originally posted by @1kastner in #315 (comment)
The text was updated successfully, but these errors were encountered: