Skip to content
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

Make deploying together with Franklin easier #127

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/Actions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,16 @@ function generate_static_export(
start_dir,
)
pluto_version = try_get_exact_pluto_version()
relative_to_notebooks_dir = without_pluto_file_extension(path)
export_jl_path = let
relative_to_notebooks_dir = path
joinpath(output_dir, relative_to_notebooks_dir)
joinpath(output_dir, relative_to_notebooks_dir, basename(path))
end
export_html_path = let
relative_to_notebooks_dir = without_pluto_file_extension(path) * ".html"
joinpath(output_dir, relative_to_notebooks_dir)
joinpath(output_dir, relative_to_notebooks_dir, "index.html")
end
export_statefile_path = let
relative_to_notebooks_dir = without_pluto_file_extension(path) * ".plutostate"
joinpath(output_dir, relative_to_notebooks_dir)
joinpath(output_dir, relative_to_notebooks_dir,
without_pluto_file_extension(basename(path)) * ".plutostate")
end


Expand All @@ -220,7 +219,7 @@ function generate_static_export(
end
slider_server_url_js = if slider_server_running_somewhere
abs_path = joinpath(start_dir, path)
url_of_root = relpath(start_dir, dirname(abs_path)) # e.g. "." or "../../.."
url_of_root = relpath(start_dir, dirname(abs_path)) # e.g. "." or "../../.."
repr(something(settings.Export.slider_server_url, url_of_root))
else
"undefined"
Expand Down Expand Up @@ -302,4 +301,4 @@ function remove_static_export(path; settings, output_dir)
!settings.Export.baked_notebookfile
tryrm(export_jl_path)
end
end
end
Loading