You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,7 +65,7 @@ function process(s::NotebookSession{Nothing,String,<:Any};
71
65
if new_hash != s.desired_hash
72
66
@warn"Notebook file does not have desired hash. This probably means that the file changed too quickly. Continuing and hoping for the best!" s.path new_hash s.desired_hash
Copy file name to clipboardExpand all lines: src/Configuration.jl
+38-26Lines changed: 38 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -9,59 +9,71 @@ using FromFile
9
9
10
10
11
11
@extract_docs@optionstruct SliderServerSettings
12
-
enabled::Bool=true
12
+
enabled::Bool=true
13
13
"List of notebook files to skip. Provide paths relative to `start_dir`. *If `Export.enabled` is `true` (default), then only paths in `SliderServer_exclude ∩ Export_exclude` will be skipped, paths in `setdiff(SliderServer_exclude, Export_exclude)` will be shut down after exporting.*"
14
-
exclude::Vector=String[]
14
+
exclude::Vector=String[]
15
15
"Port to run the HTTP server on."
16
-
port::Integer=2345
16
+
port::Integer=2345
17
17
"""Often set to `"0.0.0.0"` on a server."""
18
-
host::Any="127.0.0.1"
19
-
simulated_lag::Real=0
18
+
host::Any="127.0.0.1"
19
+
simulated_lag::Real=0
20
20
"Besides handling slider server request, should we also run a static file server of the export output folder? Set to `false` if you are serving the HTML files in another way, e.g. using GitHub Pages, and, for some reason, you do not want to *also* serve the HTML files using this serve."
21
-
serve_static_export_folder::Bool=true
21
+
serve_static_export_folder::Bool=true
22
22
"Watch the input directory for file changes, and update the slider server sessions automatically. Only takes effect when running the slider server. More info in the README."
23
-
watch_dir::Bool=true
23
+
watch_dir::Bool=true
24
24
end
25
25
26
26
@extract_docs@optionstruct ExportSettings
27
27
"Generate static HTML files? This setting can only be `false` if you are also running a slider server."
28
-
enabled::Bool=true
28
+
enabled::Bool=true
29
29
"Folder to write generated HTML files to (will create directories to preserve the input folder structure). The behaviour of the default value depends on whether you are running the slider server, or just exporting. If running the slider server, we use a temporary directory; otherwise, we use `start_dir` (i.e. we generate each HTML file in the same folder as the notebook file)."
30
-
output_dir::Union{Nothing,String}=nothing
30
+
output_dir::Union{Nothing,String}=nothing
31
31
"List of notebook files to skip. Provide paths relative to `start_dir`."
32
-
exclude::Vector{String}=String[]
32
+
exclude::Vector{String}=String[]
33
33
"List of notebook files that should always re-run, skipping the `cache_dir` system. Provide paths relative to `start_dir`."
34
-
ignore_cache::Vector=String[]
35
-
pluto_cdn_root::Union{Nothing,String}=nothing
34
+
ignore_cache::Vector=String[]
35
+
pluto_cdn_root::Union{Nothing,String}=nothing
36
36
"base64-encode the state object and write it inside the .html file. If `false`, a separate `.plutostate` file is generated. A separate statefile allows us to show a loading bar in pluto while the statefile is loading, but it can complicate setup in some environments."
37
-
baked_state::Bool=true
38
-
baked_notebookfile::Bool=true
37
+
baked_state::Bool=true
38
+
baked_notebookfile::Bool=true
39
39
"Hide all buttons and toolbars in Pluto to make it look like an article."
40
-
disable_ui::Bool=true
40
+
disable_ui::Bool=true
41
41
"""Show a "Run on Binder" button on the notebooks."""
42
-
offer_binder::Bool=true
42
+
offer_binder::Bool=true
43
43
"e.g. `https://mybinder.org/v2/gh/mitmath/18S191/e2dec90`. Defaults to a binder repo that runs the correct version of Pluto -- https://github.com/fonsp/pluto-on-binder. TODO docs"
44
-
binder_url::Union{Nothing,String}=nothing
44
+
binder_url::Union{Nothing,String}=nothing
45
45
"""If 1) you are using this setup to export HTML files for notebooks, AND 2) you are running the slider server **on another setup/computer**, then this setting should be the URL pointing to the slider server, e.g. `"https://sliderserver.mycoolproject.org/"`. For example, you need this if you use GitHub Actions and GitHub Pages to generate HTML files, with a slider server on DigitalOcean. === If you only have *one* server for both the static exports and the slider server, and people will read notebooks directly on your server, then the default value `nothing` will work: it will automatically make the HTML files use their current domain for the slider server."""
46
-
slider_server_url::Union{Nothing,String}=nothing
46
+
slider_server_url::Union{Nothing,String}=nothing
47
47
"If provided, use this directory to read and write cached notebook states. Caches will be indexed by the hash of the notebook file, but you need to take care to invalidate the cache when Pluto or this export script updates. Useful in combination with https://github.com/actions/cache, see https://github.com/JuliaPluto/static-export-template for an example."
48
-
cache_dir::Union{Nothing,String}=nothing
48
+
cache_dir::Union{Nothing,String}=nothing
49
49
"Automatically generate an `index.html` file, listing all the exported notebooks (only if no `index.jl` or `index.html` file exists already)."
# we set `Pluto_server_notebook_path_suggestion=joinpath(homedir(),"")` to because the default value for this setting changes when the pwd changes. This causes our run_git_directory to exit... Not necessary for Pluto 0.17.3 and up.
0 commit comments