-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support Dynamic Document Injection #1139
Comments
I was wondering about the same problem and tried to return a non-existent document name from the callback for |
Sphinx expects that the filenames that extension returns via |
Could you point out where this check happens, please? I'd like to check how hard would it be to improve it. |
Here: sphinx/sphinx/builders/__init__.py Lines 378 to 379 in 4c91c03
The filenames given from event handlers are compared with |
@tk0miya thanks! Would it be out of line to mutate what |
I'm not sure what will be happened if this line accepts non-existent files. I guess many Sphinx components expect the file must exist. So we have to check whole of Sphinx. |
Sphinx is a great tool. However, the need to create rst documents on disk prior to running sphinx-build is a bit inflexible. Sphinx-apidoc works around this limitation by requiring a separate script execution to manage api rst files. While this works, it requires extra steps and maintenance of the on-disk rst files, and additional tools like sphinx-apidoc for each set of dynamic documents generated.
I propose an enhancement to support dynamic document/doctree or perhaps even raw rst injection during sphinx-build execution. Ideally, this would be a hook or similar mechanism that extensions could use to inject documents prior to builder processing.
The text was updated successfully, but these errors were encountered: