No way to prevent insertion of inlined SVG images, and instead insert raw HTML
See original GitHub issueSphinx-Gallery version used:
- 0.4.0
- latest version compatible with Python 3.6
We are working on GLM Reporter . The feature takes some args and generates a report, which contains many inlined SVG images. The entire report is a string, including the code for the generated SVG images.
This string is wrapped as HTMLDocument object (nilearn.plotting.js_plotting_utils.HTMLDocument).
When we run make html
on this, the GLM Reporter function is executed, and all the images created as SVG’s (they are not saved to disk by the feature) are saved to disk and inserted into the HTML.
The HTML code, which we would want inserted, perhaps as an iframe, is not.
I have bundled the 4 files I think are pertinent to demonstrate what I am saying and maybe help reproduce & troubleshoot. This includes the .py
source, the .rst
and .html
generated by Sphinx-gallery, as well the report this PR creates, containing the HTML we would like inserted into the gallery example.
The source .py
file for the example is also at https://github.com/nistats/nistats/blob/43ebb718619a0e5021d7faa3a12c090cc5f7177e/examples/02_first_level_models/plot_adhd_dmn.py
The section I speak of is right at the bottom of the page.
Is there anyway to do one or the things we want without editing the raw html generated?
Attached:
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
FYI this was the whole PR originally (has some styles that might help you tweak things)
https://github.com/mne-tools/mne-python/pull/6433/files
I commented over on your PR, you need to modify
sphinx_gallery_conf
. I’ll close this since I think no action is needed from the SG end, but feel free to reopen if something ends up missing.