Skip to content

Commit

Permalink
Warn when generating HTML with large baked statefile
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Jan 18, 2024
1 parent b7bb3b4 commit 66bcf07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/notebook/Export.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ function generate_html(;

cdnified = cdnified_editor_html(; version, pluto_cdn_root)

length(statefile_js) > 32000000 && @error "Statefile embedded in HTML is very large. The file can be opened with Chrome and Safari, but probably not with Firefox. If you are using PlutoSliderServer to generate this file, then we recommend the setting `baked_statefile=false`. If you are not using PlutoSliderServer, then consider reducing the size of figures and output in the notebook." length(statefile_js)

parameters = """
<script data-pluto-file="launch-parameters">
window.pluto_notebook_id = $(notebook_id_js);
Expand Down

0 comments on commit 66bcf07

Please sign in to comment.