Skip to content

sphinx-gallery fix: don't save plotlyjs in every figure #2953

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

Merged
merged 3 commits into from
Dec 4, 2020

Conversation

emmanuelle
Copy link
Contributor

No description provided.

@emmanuelle
Copy link
Contributor Author

I figured out that it was not a good idea to have every example page weighing 3+ Mo if we want more people to use plotly in docs :-).

@@ -861,7 +861,7 @@ def render(self, fig_dict):
filename_html = filename_root + ".html"
filename_png = filename_root + ".png"
figure = return_figure_from_figure_or_data(fig_dict, True)
_ = write_html(fig_dict, file=filename_html)
_ = write_html(fig_dict, file=filename_html, include_plotlyjs=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm so how does Plotly.js get included?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first time I mean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum good question. I had checked that with include_plotlyjs=False the plotly cdn was included in the html files (which is weird, but it did include the cdn). I switched to include_plotlyjs='cdn' instead.

@nicolaskruchten
Copy link
Contributor

💃

@nicolaskruchten nicolaskruchten merged commit be1c4ed into master Dec 4, 2020
@archmoj archmoj deleted the sphinx-gallery-fix branch November 23, 2021 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants