diff --git a/.github/workflows/ExportNotebooks.yml b/.github/workflows/ExportNotebooks.yml index f941baf..d716ff7 100644 --- a/.github/workflows/ExportNotebooks.yml +++ b/.github/workflows/ExportNotebooks.yml @@ -20,8 +20,6 @@ jobs: - name: 🙌 Install Julia uses: julia-actions/setup-julia@v1 - with: - version: "1.8" - name: ⏱ Cache notebook states uses: actions/cache@v2 @@ -43,8 +41,8 @@ jobs: run: julia --project=pluto-deployment-environment -e ' import Pkg; Pkg.instantiate(); - - include("./generate.jl")' + using PlutoPages; + PlutoPages.generate(pwd())' - name: 📰 Upload site generation report diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0e675d1..0634b95 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "PlutoPages: run development server", "type": "shell", - "command": "julia develop.jl", + "command": "julia --project=pluto-deployment-environment -e 'using PlutoPages; PlutoPages.develop(pwd())'", "group": "build" } ] diff --git a/PlutoPages.jl b/PlutoPages.jl deleted file mode 100644 index 832b288..0000000 --- a/PlutoPages.jl +++ /dev/null @@ -1,1040 +0,0 @@ -### A Pluto.jl notebook ### -# v0.19.25 - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end -end - -# ╔═╡ b8024c95-6a63-4409-9c75-9bad6b301a92 -begin - import Pkg - Pkg.activate("./pluto-deployment-environment") - - import PlutoSliderServer - import Pluto - using MarkdownLiteral -end - -# ╔═╡ d4cfce05-bae4-49ae-b26d-ce27171a3853 -using PlutoUI - -# ╔═╡ ce840b47-8406-48e6-abfb-1b00daab28dd -using HypertextLiteral - -# ╔═╡ 7c53c1e3-6ccf-4804-8bc3-09126036608e -using PlutoHooks - -# ╔═╡ 725cb996-68ac-4736-95ee-0a9754867bf3 -using BetterFileWatching - -# ╔═╡ 9d996c55-0e37-4ae9-a6a2-8c8761e8c6db -using PlutoLinks - -# ╔═╡ c5a0b072-7f49-4c0c-855e-773cfc03d308 -TableOfContents(include_definitions=true) - -# ╔═╡ 644552c6-4e32-4caf-90ef-bee259977094 -import Logging - -# ╔═╡ 66c97351-2294-4ac2-a93a-f334aaee8f92 -import Gumbo - -# ╔═╡ bcbda2d2-90a5-43e6-8400-d5472578f86a -import ProgressLogging - -# ╔═╡ cd576da6-59ae-4d1b-b812-1a35023b6875 -import ThreadsX - -# ╔═╡ 86471faf-af03-4f35-8b95-c4011ceaf7c3 -function progressmap_generic(mapfn, f, itr; kwargs...) - l = length(itr) - id = gensym() - num_iterations = Threads.Atomic{Int}(0) - - function log(x) - Threads.atomic_add!(num_iterations, x) - Logging.@logmsg(ProgressLogging.ProgressLevel, "", progress=num_iterations[] / l, id=id) - end - - log(0) - - output = mapfn(enumerate(itr); kwargs...) do (i,x) - result = f(x) - log(1) - result - end - - log(0) - output -end - -# ╔═╡ e0ae20f5-ffe7-4f0e-90be-168924526e03 -"Like `Base.map`, but with ProgressLogging." -function progressmap(f, itr) - progressmap_generic(map, f, itr) -end - -# ╔═╡ d58f2a89-4631-4b19-9d60-5e590908b61f -"Like `Base.asyncmap`, but with ProgressLogging." -function progressmap_async(f, itr; kwargs...) - progressmap_generic(asyncmap, f, itr; kwargs...) -end - -# ╔═╡ 2221f133-e490-4e3a-82d4-bd1c6c979d1c -"Like `ThreadsX.map`, but with ProgressLogging." -function progressmap_threaded(f, itr; kwargs...) - progressmap_generic(ThreadsX.map, f, itr; kwargs...) -end - -# ╔═╡ 6c8e76ea-d648-449a-89de-cb6632cdd6b9 -md""" -# Template systems - -A **template** system is will turn an input file (markdown, julia, nunjucks, etc.) into an (HTML) output. This architecture is based on [eleventy](https://www.11ty.dev/docs/). - -To register a template handler for a file extension, you add a method to `template_handler`, e.g. - -```julia -function template_handler( - ::Val{Symbol(".md")}, - input::TemplateInput -)::TemplateOutput - - s = String(input.contents) - result = run_markdown(s) - - return TemplateOutput(; - contents=result.contents, - front_matter=result.front_matter, - ) -end -``` - -See `TemplateInput` and `TemplateOutput` for more info! -""" - -# ╔═╡ 4a2dc5a4-0bf2-4678-b984-4ecb7b397d72 -md""" -## `.jlhtml`: HypertextLiteral.jl -""" - -# ╔═╡ b3ce7742-fb47-4c17-bac2-e6a7710eb1a1 -md""" -## `.md` and `.jlmd`: MarkdownLiteral.jl -""" - -# ╔═╡ f4a4b741-8028-4626-9187-0b6a52f062b6 -import CommonMark - -# ╔═╡ 535efb29-73bd-4e65-8bbc-18b72ae8fe1f -import YAML - -# ╔═╡ 90f0c676-b33f-441c-8ea6-d59c44a11547 -s_example = raw""" ---- -title: "Hello worfdsld!" -description: "A longer description of the same thing" -authors: ["Fonsi"] ---- - -### Hello there! - -My name is fons - - - -Want to embed some cool HTML? *Easy!* Just type the HTML! **or markdown**, it's all the same!! 👀 - -```math -\\sqrt{\\frac{1}{2}} -```` - -$(begin -a = 1 -b = 2 -export b -end) - -""" - -# ╔═╡ 5381e8b3-d4f9-4e58-8da3-f1ee0a9b7a6d -@bind s TextField((70,20); default=s_example) - -# ╔═╡ 08b42df7-9120-4b42-80ee-8e438752b50c -# s_result.exported - -# ╔═╡ adb1ddac-d992-49ca-820f-e1ed8ca33bf8 -md""" -## `.jl`: PlutoSliderServer.jl -""" - -# ╔═╡ bb905046-59b7-4da6-97ad-dbb9055d823a -const pluto_deploy_settings = PlutoSliderServer.get_configuration(PlutoSliderServer.default_config_path()) - -# ╔═╡ b638df55-fd74-4ae8-bdbd-ec7b18214b40 -function prose_from_code(s::String)::String - replace(replace( - replace( - replace(s, - # remove embedded project/manifest - r"000000000001.+"s => ""), - # remove cell delimiters - r"^# [╔╟╠].*"m => ""), - # remove some code-only punctiation - r"[\!\#\$\*\+\-\/\:\;\<\>\=\(\)\[\]\{\}\:\@\_]" => " "), - # collapse repeated whitespace - r"\s+"s => " ") -end - -# ╔═╡ 87b4431b-438b-4da4-9d06-79e7f3a2fe05 -prose_from_code(""" -[xs for y in ab(d)] -fonsi -""") - -# ╔═╡ cd4e479c-deb7-4a44-9eb0-c3819b5c4067 -find(f::Function, xs) = for x in xs - if f(x) - return x - end -end - -# ╔═╡ 2e527d04-e4e7-4dc8-87e6-8b3dd3c7688a -const FrontMatter = Dict{String,Any} - -# ╔═╡ a166e8f3-542e-4068-a076-3f5fd4daa61c -Base.@kwdef struct TemplateInput - contents::Vector{UInt8} - relative_path::String - absolute_path::String - frontmatter::FrontMatter=FrontMatter() -end - -# ╔═╡ 6288f145-444b-41cb-b9e3-8f273f9517fb -begin - Base.@kwdef struct TemplateOutput - contents::Union{Vector{UInt8},String,Nothing} - file_extension::String="html" - frontmatter::FrontMatter=FrontMatter() - search_index_data::Union{Nothing,String}=nothing - end - TemplateOutput(t::TemplateOutput; kwargs...) = TemplateOutput(; - contents=t.contents, - file_extension=t.file_extension, - frontmatter=t.frontmatter, - search_index_data=t.search_index_data, - kwargs..., - ) -end - -# ╔═╡ ff55f7eb-a23d-4ca7-b428-ab05dcb8f090 -# fallback method -function template_handler(::Any, input::TemplateInput)::TemplateOutput - TemplateOutput(; - contents=nothing, - file_extension="nothing", - ) -end - -# ╔═╡ 692c1e0b-07e1-41b3-abcd-2156bda65b41 -""" -Turn a MarkdownLiteral.jl string into HTML contents and front matter. -""" -function run_mdx(s::String; - data::Dict{String,<:Any}=Dict{String,Any}(), - cm::Bool=true, - filename::AbstractString="unknown", - ) - # take a look at https://github.com/JuliaPluto/MarkdownLiteral.jl if you want to use it this too! - - # Just HTL, CommonMark parsing comes in a later step - code = "@htl(\"\"\"$(s)\"\"\")" - - m = Module() - Core.eval(m, :(var"@mdx" = var"@md" = $(MarkdownLiteral.var"@mdx"))) - Core.eval(m, :(var"@htl" = $(HypertextLiteral.var"@htl"))) - # Core.eval(m, :(setpage = $(setpage))) - Core.eval(m, :(using Markdown, InteractiveUtils)) - for (k,v) in data - Core.eval(m, :($(Symbol(k)) = $(v))) - end - - result = Base.include_string(m, code, filename) - - to_render, frontmatter = if !cm - result, FrontMatter() - else - - # we want to apply our own CM parser, so we do the MarkdownLiteral.jl trick manually: - result_str = repr(MIME"text/html"(), result) - cm_parser = CommonMark.Parser() - CommonMark.enable!(cm_parser, [ - CommonMark.AdmonitionRule(), - CommonMark.AttributeRule(), - CommonMark.AutoIdentifierRule(), - CommonMark.CitationRule(), - CommonMark.FootnoteRule(), - CommonMark.MathRule(), - CommonMark.RawContentRule(), - CommonMark.TableRule(), - CommonMark.TypographyRule(), - # TODO: allow Julia in front matter by using Meta.parse as the TOML parser? - # but you probably want to be able to use those variables inside the document, so they have to be evaluated *before* running the expr. - CommonMark.FrontMatterRule(yaml=YAML.load), - ]) - - ast = cm_parser(result_str) - - ast, CommonMark.frontmatter(ast) - end - - contents = repr(MIME"text/html"(), to_render) - - # TODO: might be nice: - # exported = filter(names(m; all=false, imported=false)) do s - # s_str = string(s) - # !(startswith(s_str, "#") || startswith(s_str, "anonymous")) - # end - - (; - contents, - frontmatter, - # exported, - ) -end - -# ╔═╡ 7717e24f-62ee-4852-9dec-d09b734d0693 -s_result = run_mdx(s; data=Dict("num" => 3)); - -# ╔═╡ 9f945292-ff9e-4f29-93ea-69b10fc4428d -s_result.contents |> HTML - -# ╔═╡ 83366d96-4cd3-4def-a0da-16a22b40124f -s_result.frontmatter - -# ╔═╡ 94bb6730-a4ad-42d2-aa58-41b70a15cd0e -md""" -## `.css`, `.html`, `.js`, `.png`, etc: passthrough - -""" - -# ╔═╡ e15cf987-3615-4e96-8ccd-04cad3bcd48e -function template_handler(::Union{ - Val{Symbol(".css")}, - Val{Symbol(".html")}, - Val{Symbol(".js")}, - Val{Symbol(".png")}, - Val{Symbol(".svg")}, - Val{Symbol(".gif")}, - }, input::TemplateInput)::TemplateOutput - - TemplateOutput(; - contents=input.contents, - file_extension=lstrip(isequal('.'), splitext(input.relative_path)[2]), - ) -end - -# ╔═╡ 940f3995-1739-4b30-b8cf-c27a671043e5 -md""" -## Generated assets -""" - -# ╔═╡ 5e91e7dc-82b6-486a-b745-34f97b6fb20c -struct RegisteredAsset - url::String - relative_path::String - absolute_path::String -end - -# ╔═╡ 8f6393a4-e945-4f06-90f6-0a71f874c8e9 -import SHA - -# ╔═╡ 4fcdd524-86a8-4033-bc7c-4a7c04224eeb -import Unicode - -# ╔═╡ 070c710d-3746-4706-bd03-b5b00a576007 -function myhash(data) - s = SHA.sha256(data) - string(reinterpret(UInt32, s)[1]; base=16, pad=8) -end - -# ╔═╡ a5c22f80-58c7-4c63-95b8-ecb30bc896d0 -myhash(rand(UInt8, 50)) - -# ╔═╡ 750782a1-3aeb-4816-8f6a-ec31055373c1 -legalize(filename) = replace( - Unicode.normalize( - replace(filename, " " => "_"); - stripmark=true) - , r"[^\w-]" => "") - -# ╔═╡ f6b89b8c-3750-4dd2-940e-579be953c1c2 -legalize(" ëasdfa sd23__--f//asd f?\$%^&*() .") - -# ╔═╡ 29a81ad7-3803-4b7a-98ca-6e5b1077e1c7 -md""" -# Input folder -""" - -# ╔═╡ c52c9786-a25f-11ec-1fdc-9b13922d7ccb -const dir = joinpath(@__DIR__, "src") - -# ╔═╡ cf27b3d3-1689-4b3a-a8fe-3ad639eb2f82 -md""" -## File watching -""" - -# ╔═╡ 7f7f1981-978d-4861-b840-71ab611faf74 -@bind manual_update_trigger Button("Read input files again") - -# ╔═╡ e1a87788-2eba-47c9-ab4c-74f3344dce1d -ignored_dirname(s; allow_special_dirs::Bool=false) = - startswith(s, "_") && (!allow_special_dirs || s != "_includes") - -# ╔═╡ 485b7956-0774-4b25-a897-3d9232ef8590 -const this_file = split(@__FILE__, "#==#")[1] - -# ╔═╡ d38dc2aa-d5ba-4cf7-9f9e-c4e4611a57ac -function ignore(abs_path; allow_special_dirs::Bool=false) - p = relpath(abs_path, dir) - - # (_cache, _site, _andmore) - any(x -> ignored_dirname(x; allow_special_dirs), splitpath(p)) || - startswith(p, ".git") || - startswith(p, ".vscode") || - abs_path == this_file -end - -# ╔═╡ 8da0c249-6094-49ab-9e59-d6e356818651 -dir_changed_time = let - valx, set_valx = @use_state(time()) - - @info "Starting watch task" - - @use_task([dir]) do - BetterFileWatching.watch_folder(dir) do e - @debug "File event" e - try - is_caused_by_me = all(x -> ignore(x; allow_special_dirs=true), e.paths) - - if !is_caused_by_me - @info "Reloading!" e - set_valx(time()) - end - catch e - @error "Failed to trigger" exception=(e,catch_backtrace()) - end - end - end - - valx -end - -# ╔═╡ 7d9cb939-da6b-4961-9584-a905ad453b5d -allfiles = filter(PlutoSliderServer.list_files_recursive(dir)) do p - # reference to retrigger when files change - dir_changed_time - manual_update_trigger - - !ignore(joinpath(dir, p)) -end - -# ╔═╡ d314ab46-b866-44c6-bfca-9a413bc06514 -md""" -# Output folder generation -""" - -# ╔═╡ e01ebbab-dc9a-4aaf-ae16-200d171fcbd9 -const output_dir = mkpath(joinpath(@__DIR__, "_site")) - -# ╔═╡ 37b2cecc-e4c7-4b80-b7d9-71c68f3c0339 - - -# ╔═╡ 7a95681a-df77-408f-919a-2bee5afd7777 -""" -This directory can be used to store cache files that are persisted between builds. Currently used as PlutoSliderServer.jl cache. -""" -const cache_dir = mkpath(joinpath(@__DIR__, "_cache")) - -# ╔═╡ f3d225b8-b9a5-4639-97eb-7785b1a78f5a -md""" -## Running a dev web server -""" - -# ╔═╡ c3a495c1-3e1f-42a1-ac08-8dc0b9175fe9 -# import Deno_jll - -# ╔═╡ 3b2d1919-41d9-4bba-9774-c8497bba5003 -# dev_server_port = 4507 - -# ╔═╡ 6f7f66e8-ed10-4cc4-8672-a06861111aec -# dev_server_url = "http://localhost:$(dev_server_port)/" - -# ╔═╡ d09ee809-33d8-44f8-aa7a-be4b3fdc21eb - - -# ╔═╡ a0a80dce-2199-45b6-b4e9-d4168f520c85 -# @htl("
Go to $(dev_server_url) to preview the site.
") - -# ╔═╡ 4e88cf07-8d85-4327-b310-6c71ba951bba -md""" -## Running the templates - -(This can take a while if you are running this for the first time with an empty cache.) -""" - -# ╔═╡ f700357f-e21c-4d23-b56c-be4f9c90465f -const NUM_PARALLEL_WORKERS = 4 - -# ╔═╡ aaad71bd-5425-4783-952c-82e4d4fa7bb8 -md""" -## URL generation -""" - -# ╔═╡ 76c2ac85-2e89-4396-a498-a4ceb1cc80bd -Base.@kwdef struct Page - url::String - full_url::String - input::TemplateInput - output::TemplateOutput -end - -# ╔═╡ a510857f-528b-43e8-be78-69e554d165a6 -function short_url(s::String) - a = replace(s, r"index.html$" => "") - isempty(a) ? "." : a -end - -# ╔═╡ 1c269e16-65c7-47ae-aeab-001f1b205e14 -ishtml(output::TemplateOutput) = output.file_extension == "html" - -# ╔═╡ 898eb093-444c-45cf-88d7-3dbe9708ae31 -function final_url(input::TemplateInput, output::TemplateOutput)::String - if ishtml(output) - # Examples: - # a/b.jl -> a/b/index.html - # a/index.jl -> a/index.html - - in_dir, in_filename = splitdir(input.relative_path) - in_name, in_ext = splitext(in_filename) - - if in_name == "index" - joinpath(in_dir, "index.html") - else - joinpath(in_dir, in_name, "index.html") - end - else - ext = lstrip(isequal('.'), output.file_extension) - join((splitext(input.relative_path)[1], ".", ext)) - end -end - -# ╔═╡ 76193b12-842c-4b82-a23e-fb7403274234 -md""" -## Collections from `tags` -""" - -# ╔═╡ 4f563136-fc7b-4322-92ba-78c0183c40cc -struct Collection - tag::String - pages::Vector{Page} -end - -# ╔═╡ 41ab51f9-0b33-4548-b08a-ad1ef7d38f1b -function sort_by(p::Page) - bn = basename(p.input.relative_path) - num = get(p.output.frontmatter, "order", Inf) - if num isa AbstractString - num = tryparse(Float64, num) - if isnothing(num) - num = Inf - end - end - return ( - num, - splitext(bn)[1] != "index", - # TODO: sort based on dates if we ever need that - bn, - ) -end - -# ╔═╡ b0006e61-b037-41ed-a3e4-9962d15584c4 -md""" -## Layouts -""" - -# ╔═╡ f2fbcc70-a714-4eda-8786-7ee5692e3268 -with_doctype(p::Page) = Page(p.url, p.full_url, p.input, with_doctype(p.output)) - -# ╔═╡ 57fd383b-d791-4170-a353-f839356f9d7a -with_doctype(output::TemplateOutput) = if ishtml(output) && output.contents !== nothing - TemplateOutput(output; - contents="" * String(output.contents) - ) -else - output -end - -# ╔═╡ 05f735e0-01cc-4276-a3f9-8420296e68be -md""" -## Search index -""" - -# ╔═╡ 1a303aa4-bed5-4d9b-855c-23355f4a88fe -md""" -## Writing to the output directory -""" - -# ╔═╡ 834294ff-9441-4e71-b5c0-edaf32d860ee -import JSON - -# ╔═╡ eef54261-767a-4ce4-b549-0b1828379f7e -SafeString(x) = String(x) - -# ╔═╡ cda8689d-9ae5-42c4-8e7e-715cf44c33bb -SafeString(x::Vector{UInt8}) = String(copy(x)) - -# ╔═╡ 995c6810-8df2-483d-a87a-2277af0d43bd -function template_handler( - ::Union{Val{Symbol(".jlhtml")}}, - input::TemplateInput)::TemplateOutput - s = SafeString(input.contents) - result = run_mdx(s; - data=input.frontmatter, - cm=false, - filename=input.absolute_path, - ) - - return TemplateOutput(; - contents=result.contents, - search_index_data=Gumbo.text(Gumbo.parsehtml(result.contents).root), - frontmatter=result.frontmatter, - ) -end - -# ╔═╡ 7e86cfc7-5439-4c7a-9c3b-381c776d8371 -function template_handler( - ::Union{ - Val{Symbol(".jlmd")}, - Val{Symbol(".md")} - }, - input::TemplateInput)::TemplateOutput - s = SafeString(input.contents) - result = run_mdx(s; - data=input.frontmatter, - filename=input.absolute_path, - ) - - return TemplateOutput(; - contents=result.contents, - search_index_data=Gumbo.text(Gumbo.parsehtml(result.contents).root), - frontmatter=result.frontmatter, - ) -end - -# ╔═╡ 4013400c-acb4-40fa-a826-fd0cbae09e7e -reprhtml(x) = repr(MIME"text/html"(), x) - -# ╔═╡ 5b325b50-8984-44c6-8677-3c6bc5c2b0b1 -"A magic token that will turn into a relative URL pointing to the website root when used in output." -const root_url = "++magic#root#url~$(string(rand(UInt128),base=62))++" - -# ╔═╡ 0d2b7382-2ddf-48c3-90c8-bc22de454c97 -""" -```julia -register_asset(contents, original_name::String) -``` - -Place an asset in the `/generated_assets/` subfolder of the output directory and return a [`RegisteredAsset`](@ref) referencing it for later use. (The original filename will be sanitized, and a content hash will be appended.) - -To be used inside `process_file` methods which need to generate additional files. You can use `registered_asset.url` to get a location-independent href to the result. -""" -function register_asset(contents, original_name::String) - h = myhash(contents) - n, e = splitext(basename(original_name)) - - - mkpath(joinpath(output_dir, "generated_assets")) - newpath = joinpath(output_dir, "generated_assets", "$(legalize(n))_$(h)$(e)") - write(newpath, contents) - rel = relpath(newpath, output_dir) - return RegisteredAsset(joinpath(root_url, rel), rel, newpath) -end - -# ╔═╡ e2510a44-df48-4c05-9453-8822deadce24 -function template_handler( - ::Val{Symbol(".jl")}, - input::TemplateInput -)::TemplateOutput - - - if Pluto.is_pluto_notebook(input.absolute_path) - temp_out = mktempdir() - Logging.with_logger(Logging.NullLogger()) do - PlutoSliderServer.export_notebook( - input.absolute_path; - Export_create_index=false, - Export_cache_dir=cache_dir, - Export_baked_state=false, - Export_baked_notebookfile=false, - Export_output_dir=temp_out, - ) - end - d = readdir(temp_out) - - statefile = find(contains("state") ∘ last ∘ splitext, d) - notebookfile = find(!contains("html") ∘ last ∘ splitext, d) - - reg_s = register_asset(read(joinpath(temp_out, statefile)), statefile) - reg_n = register_asset(read(joinpath(temp_out, notebookfile)), notebookfile) - - # TODO these relative paths can't be right... - h = @htl """ - - """ - - frontmatter = Pluto.frontmatter(input.absolute_path) - - return TemplateOutput(; - contents = repr(MIME"text/html"(), h), - search_index_data=prose_from_code(SafeString(input.contents)), - frontmatter, - ) - else - - s = SafeString(input.contents) - - h = @htl """ -
$(s)
- """ - - return TemplateOutput(; - contents=repr(MIME"text/html"(), h), - search_index_data=prose_from_code(s), - ) - end -end - -# ╔═╡ 079a6399-50eb-4dee-a36d-b3dcb81c8456 -template_results = let - # delete any old files - for f in readdir(output_dir) - rm(joinpath(output_dir, f); recursive=true) - end - - # let's go! running all the template handlers - progressmap_async(allfiles; ntasks=NUM_PARALLEL_WORKERS) do f - absolute_path = joinpath(dir, f) - - input = TemplateInput(; - contents=read(absolute_path), - absolute_path, - relative_path=f, - frontmatter=FrontMatter( - "root_url" => root_url, - ), - ) - - output = try - template_handler(Val(Symbol(splitext(f)[2])), input) - catch e - @error "Template handler failed" f exception=(e,catch_backtrace()) - rethrow() - end - - input, output - end -end - -# ╔═╡ 318dc59e-15f6-4b25-bcf5-1ab6b0d87af7 -pages = Page[ - let - u = final_url(input, output) - Page( - short_url(u), u, input, output, - ) - end - for (input, output) in template_results if output.contents !== nothing -] - -# ╔═╡ f93da14a-e4c8-4c28-ab01-4a5ba1a3cf47 -collections = let - result = Dict{String,Set{Page}}() - - for page in pages - for t in get(page.output.frontmatter, "tags", String[]) - old = get!(result, t, Set{Page}()) - push!(old, page) - end - end - - - Dict{String,Collection}( - k => Collection(k, sort(collect(v); by=sort_by)) for (k,v) in result - ) -end - -# ╔═╡ c2ee20be-16f5-47a8-851a-67a361bb0316 -""" -```julia -process_layouts(page::Page)::Page -``` - -Recursively apply the layout specified in the frontmatter, returning a new `Page` with updated `output`. -""" -function process_layouts(page::Page)::Page - output = page.output - - if haskey(output.frontmatter, "layout") - @assert output.file_extension == "html" "Layout is not (yet) supported on non-HTML outputs." - - layoutname = output.frontmatter["layout"] - @assert layoutname isa String - layout_file = joinpath(dir, "_includes", layoutname) - @assert isfile(layout_file) "$layout_file is not a valid layout path" - - - content = if ishtml(output) - HTML(SafeString(output.contents)) - else - output.contents - end - - metadata = Dict() - for data_file in readdir(joinpath(dir, "_data"); join=true) - key = splitext(basename(data_file))[1] - metadata[key] = include(data_file) - end - - input = TemplateInput(; - contents=read(layout_file), - absolute_path=layout_file, - relative_path=relpath(layout_file, dir), - frontmatter=merge(output.frontmatter, - FrontMatter( - "content" => content, - "page" => page, - "collections" => collections, - "root_url" => root_url, - "metadata" => metadata - ), - ) - ) - - result = template_handler(Val(Symbol(splitext(layout_file)[2])), input) - - @assert result.file_extension == "html" "Non-HTML output from Layouts is not (yet) supported." - - - - old_frontmatter = copy(output.frontmatter) - delete!(old_frontmatter, "layout") - new_frontmatter = merge(old_frontmatter, result.frontmatter) - - process_layouts(Page( - page.url, - page.full_url, - page.input, - TemplateOutput( - result; - search_index_data=output.search_index_data, - frontmatter=new_frontmatter, - ), - )) - else - page - end -end - -# ╔═╡ 06edb2d7-325f-4f80-8c55-dc01c7783054 -rendered_results = progressmap(with_doctype ∘ process_layouts, pages) - -# ╔═╡ d8e9b950-6e71-40e2-bac1-c3ba85bc83ee -collected_search_index_data = [ - ( - url=page.url::String, - title=get( - page.output.frontmatter, "title", - splitext(basename(page.input.relative_path))[1] - )::String, - tags=get(page.output.frontmatter, "tags", String[]), - text=page.output.search_index_data, - ) - for page in rendered_results if page.output.search_index_data !== nothing -] - -# ╔═╡ 1be06e4b-6072-46c3-a63d-aa95e51c43b4 -write( - joinpath(output_dir, "pp_search_data.json"), - JSON.json(collected_search_index_data) -) - -# ╔═╡ 9845db00-149c-45be-9e4f-55d1157afc87 -process_results = map(rendered_results) do page - input = page.input - output = page.output - - if output !== nothing && output.contents !== nothing - - # TODO: use front matter for permalink - - output_path2 = joinpath(output_dir, page.full_url) - mkpath(output_path2 |> dirname) - # Our magic root url: - # in Julia, you can safely call `String` and `replace` on arbitrary, non-utf8 data :) - write(output_path2, - replace(SafeString(output.contents), root_url => relpath(output_dir, output_path2 |> dirname)) - ) - end -end - -# ╔═╡ 70fa9af8-31f9-4e47-b36b-828c88166b3d -md""" -# Verify output -""" - -# ╔═╡ d17c96fb-8459-4527-a139-05fdf74cdc39 -allfiles_output = let - process_results - PlutoSliderServer.list_files_recursive(output_dir) -end - -# ╔═╡ 9268f35e-1a4e-414e-a7ea-3f5796e0bbf3 -allfiles_output2 = filter(allfiles_output) do f - !startswith(f, "generated_assets") -end - -# ╔═╡ e0a25f24-a7de-4eac-9f88-cb7632de09eb -begin - @assert length(allfiles_output2) ≥ length(pages) - - @htl(""" - - """) -end - -# ╔═╡ Cell order: -# ╠═b8024c95-6a63-4409-9c75-9bad6b301a92 -# ╠═c5a0b072-7f49-4c0c-855e-773cfc03d308 -# ╠═d4cfce05-bae4-49ae-b26d-ce27171a3853 -# ╠═644552c6-4e32-4caf-90ef-bee259977094 -# ╠═66c97351-2294-4ac2-a93a-f334aaee8f92 -# ╠═bcbda2d2-90a5-43e6-8400-d5472578f86a -# ╠═cd576da6-59ae-4d1b-b812-1a35023b6875 -# ╟─e0ae20f5-ffe7-4f0e-90be-168924526e03 -# ╟─d58f2a89-4631-4b19-9d60-5e590908b61f -# ╟─2221f133-e490-4e3a-82d4-bd1c6c979d1c -# ╟─86471faf-af03-4f35-8b95-c4011ceaf7c3 -# ╟─6c8e76ea-d648-449a-89de-cb6632cdd6b9 -# ╠═a166e8f3-542e-4068-a076-3f5fd4daa61c -# ╠═6288f145-444b-41cb-b9e3-8f273f9517fb -# ╠═ff55f7eb-a23d-4ca7-b428-ab05dcb8f090 -# ╟─4a2dc5a4-0bf2-4678-b984-4ecb7b397d72 -# ╠═ce840b47-8406-48e6-abfb-1b00daab28dd -# ╠═995c6810-8df2-483d-a87a-2277af0d43bd -# ╟─b3ce7742-fb47-4c17-bac2-e6a7710eb1a1 -# ╠═f4a4b741-8028-4626-9187-0b6a52f062b6 -# ╠═535efb29-73bd-4e65-8bbc-18b72ae8fe1f -# ╠═7e86cfc7-5439-4c7a-9c3b-381c776d8371 -# ╠═90f0c676-b33f-441c-8ea6-d59c44a11547 -# ╠═5381e8b3-d4f9-4e58-8da3-f1ee0a9b7a6d -# ╠═9f945292-ff9e-4f29-93ea-69b10fc4428d -# ╠═83366d96-4cd3-4def-a0da-16a22b40124f -# ╠═08b42df7-9120-4b42-80ee-8e438752b50c -# ╠═7717e24f-62ee-4852-9dec-d09b734d0693 -# ╠═692c1e0b-07e1-41b3-abcd-2156bda65b41 -# ╟─adb1ddac-d992-49ca-820f-e1ed8ca33bf8 -# ╠═e2510a44-df48-4c05-9453-8822deadce24 -# ╠═bb905046-59b7-4da6-97ad-dbb9055d823a -# ╠═b638df55-fd74-4ae8-bdbd-ec7b18214b40 -# ╠═87b4431b-438b-4da4-9d06-79e7f3a2fe05 -# ╟─cd4e479c-deb7-4a44-9eb0-c3819b5c4067 -# ╠═2e527d04-e4e7-4dc8-87e6-8b3dd3c7688a -# ╟─94bb6730-a4ad-42d2-aa58-41b70a15cd0e -# ╠═e15cf987-3615-4e96-8ccd-04cad3bcd48e -# ╟─940f3995-1739-4b30-b8cf-c27a671043e5 -# ╠═0d2b7382-2ddf-48c3-90c8-bc22de454c97 -# ╠═5e91e7dc-82b6-486a-b745-34f97b6fb20c -# ╠═8f6393a4-e945-4f06-90f6-0a71f874c8e9 -# ╠═4fcdd524-86a8-4033-bc7c-4a7c04224eeb -# ╟─070c710d-3746-4706-bd03-b5b00a576007 -# ╟─a5c22f80-58c7-4c63-95b8-ecb30bc896d0 -# ╟─750782a1-3aeb-4816-8f6a-ec31055373c1 -# ╟─f6b89b8c-3750-4dd2-940e-579be953c1c2 -# ╟─29a81ad7-3803-4b7a-98ca-6e5b1077e1c7 -# ╠═c52c9786-a25f-11ec-1fdc-9b13922d7ccb -# ╠═7c53c1e3-6ccf-4804-8bc3-09126036608e -# ╠═725cb996-68ac-4736-95ee-0a9754867bf3 -# ╠═9d996c55-0e37-4ae9-a6a2-8c8761e8c6db -# ╟─cf27b3d3-1689-4b3a-a8fe-3ad639eb2f82 -# ╟─7f7f1981-978d-4861-b840-71ab611faf74 -# ╟─7d9cb939-da6b-4961-9584-a905ad453b5d -# ╠═e1a87788-2eba-47c9-ab4c-74f3344dce1d -# ╠═d38dc2aa-d5ba-4cf7-9f9e-c4e4611a57ac -# ╠═485b7956-0774-4b25-a897-3d9232ef8590 -# ╠═8da0c249-6094-49ab-9e59-d6e356818651 -# ╟─d314ab46-b866-44c6-bfca-9a413bc06514 -# ╠═e01ebbab-dc9a-4aaf-ae16-200d171fcbd9 -# ╠═37b2cecc-e4c7-4b80-b7d9-71c68f3c0339 -# ╟─7a95681a-df77-408f-919a-2bee5afd7777 -# ╟─f3d225b8-b9a5-4639-97eb-7785b1a78f5a -# ╠═c3a495c1-3e1f-42a1-ac08-8dc0b9175fe9 -# ╠═3b2d1919-41d9-4bba-9774-c8497bba5003 -# ╠═6f7f66e8-ed10-4cc4-8672-a06861111aec -# ╠═d09ee809-33d8-44f8-aa7a-be4b3fdc21eb -# ╟─a0a80dce-2199-45b6-b4e9-d4168f520c85 -# ╟─4e88cf07-8d85-4327-b310-6c71ba951bba -# ╠═f700357f-e21c-4d23-b56c-be4f9c90465f -# ╠═079a6399-50eb-4dee-a36d-b3dcb81c8456 -# ╟─aaad71bd-5425-4783-952c-82e4d4fa7bb8 -# ╠═76c2ac85-2e89-4396-a498-a4ceb1cc80bd -# ╠═898eb093-444c-45cf-88d7-3dbe9708ae31 -# ╟─a510857f-528b-43e8-be78-69e554d165a6 -# ╟─1c269e16-65c7-47ae-aeab-001f1b205e14 -# ╟─318dc59e-15f6-4b25-bcf5-1ab6b0d87af7 -# ╟─76193b12-842c-4b82-a23e-fb7403274234 -# ╠═4f563136-fc7b-4322-92ba-78c0183c40cc -# ╠═f93da14a-e4c8-4c28-ab01-4a5ba1a3cf47 -# ╠═41ab51f9-0b33-4548-b08a-ad1ef7d38f1b -# ╟─b0006e61-b037-41ed-a3e4-9962d15584c4 -# ╠═c2ee20be-16f5-47a8-851a-67a361bb0316 -# ╠═06edb2d7-325f-4f80-8c55-dc01c7783054 -# ╟─f2fbcc70-a714-4eda-8786-7ee5692e3268 -# ╟─57fd383b-d791-4170-a353-f839356f9d7a -# ╟─05f735e0-01cc-4276-a3f9-8420296e68be -# ╠═d8e9b950-6e71-40e2-bac1-c3ba85bc83ee -# ╟─1a303aa4-bed5-4d9b-855c-23355f4a88fe -# ╠═834294ff-9441-4e71-b5c0-edaf32d860ee -# ╠═1be06e4b-6072-46c3-a63d-aa95e51c43b4 -# ╠═9845db00-149c-45be-9e4f-55d1157afc87 -# ╟─eef54261-767a-4ce4-b549-0b1828379f7e -# ╟─cda8689d-9ae5-42c4-8e7e-715cf44c33bb -# ╟─4013400c-acb4-40fa-a826-fd0cbae09e7e -# ╟─5b325b50-8984-44c6-8677-3c6bc5c2b0b1 -# ╟─70fa9af8-31f9-4e47-b36b-828c88166b3d -# ╠═d17c96fb-8459-4527-a139-05fdf74cdc39 -# ╠═9268f35e-1a4e-414e-a7ea-3f5796e0bbf3 -# ╠═e0a25f24-a7de-4eac-9f88-cb7632de09eb diff --git a/develop.jl b/develop.jl deleted file mode 100644 index 90401bb..0000000 --- a/develop.jl +++ /dev/null @@ -1,127 +0,0 @@ -cd(@__DIR__) -notebook_path = joinpath(@__DIR__, "PlutoPages.jl") - -@assert VERSION >= v"1.6.0" - -begin - begin - begin - # copy paste from pluto source code - function detectwsl() - Sys.islinux() && - isfile("/proc/sys/kernel/osrelease") && - occursin(r"Microsoft|WSL"i, read("/proc/sys/kernel/osrelease", String)) - end - - function open_in_default_browser(url::AbstractString)::Bool - try - if Sys.isapple() - Base.run(`open $url`) - true - elseif Sys.iswindows() || detectwsl() - Base.run(`powershell.exe Start "'$url'"`) - true - elseif Sys.islinux() - Base.run(`xdg-open $url`) - true - else - false - end - catch ex - false - end - end - end - end -end - - - -import Pkg -Pkg.activate("./pluto-deployment-environment") -Pkg.instantiate() -import Pluto -import Deno_jll - - -pluto_port_channel = Channel{UInt16}(1) -function on_event(e::Pluto.ServerStartEvent) - put!(pluto_port_channel, e.port) -end -function on_event(e) - # ignore -end - -req_s = false - -# We create a session: -sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; - # workspace_use_distributed=false, - # disable_writing_notebook_files=true, - auto_reload_from_file=true, - launch_browser=false, - on_event, - require_secret_for_access=req_s, - require_secret_for_open_links=req_s -)) - -notebook_launch_task = @async Pluto.SessionActions.open(sesh, notebook_path; run_async=true) - -@info "Pluto app: Starting server..." - -println("Ignore the message \"Go to ... in your browser\":") -pluto_server_task = @async Pluto.run(sesh) - -pluto_port = take!(pluto_port_channel) # This waits for the server to get ready -@info "Pluto app: waiting for notebook to launch..." -notebook = fetch(notebook_launch_task) # This waits for the notebook to finish - -output_dir = joinpath(@__DIR__, "_site") - -dev_server_port = rand(40507:40999) - - -dev_server_task = @async run(`$(Deno_jll.deno()) run --allow-read --allow-net https://deno.land/std@0.102.0/http/file_server.ts --cors --port $(dev_server_port) $(output_dir)`) # <=v"0.102.0" because of https://github.com/denoland/deno_std/issues/2251 - -sleep(.5) - -ccall(:jl_exit_on_sigint, Cvoid, (Cint,), 0) -@info "Press Ctrl+C multiple times to exit" - -isolated_cell_ids = [ - "cf27b3d3-1689-4b3a-a8fe-3ad639eb2f82" - "7f7f1981-978d-4861-b840-71ab611faf74" - "7d9cb939-da6b-4961-9584-a905ad453b5d" - "4e88cf07-8d85-4327-b310-6c71ba951bba" - "079a6399-50eb-4dee-a36d-b3dcb81c8456" - "b0006e61-b037-41ed-a3e4-9962d15584c4" - "06edb2d7-325f-4f80-8c55-dc01c7783054" - "e0a25f24-a7de-4eac-9f88-cb7632de09eb" -] - -isolated_cell_query = join("&isolated_cell_id=$(i)" for i in isolated_cell_ids) - -dev_server_url = "http://localhost:$(dev_server_port)/" -pluto_server_url = "http://localhost:$(pluto_port)/edit?id=$(notebook.notebook_id)$(isolated_cell_query)" - -@info """ - -✅✅✅ - -Ready! To see the website, visit: -➡️ $(dev_server_url) - -To inspect the generation process, go to: -➡️ $(pluto_server_url) - -✅✅✅ - -""" - - - -open_in_default_browser(dev_server_url) -open_in_default_browser(pluto_server_url) - -wait(dev_server_task) -wait(pluto_server_task) \ No newline at end of file diff --git a/generate.jl b/generate.jl deleted file mode 100644 index a870f89..0000000 --- a/generate.jl +++ /dev/null @@ -1,28 +0,0 @@ -import Pluto - -s = Pluto.ServerSession() - -# s.options.server.disable_writing_notebook_files = true -s.options.server.launch_browser = false - -@info "PlutoPages: Starting..." -nb = Pluto.SessionActions.open(s, joinpath(@__DIR__, "PlutoPages.jl"); run_async=false) -@info "PlutoPages: Finished. Analyzing result..." - -write("generation_report.html", Pluto.generate_html(nb)) - -failed = filter(c -> c.errored, nb.cells) - -for c in failed - println(stderr, "Cell errored: ", c.cell_id) - println(stderr) - show(stderr, MIME"text/plain"(), c.output.body) - println(stderr) - println(stderr) -end - -Pluto.SessionActions.shutdown(s, nb) - -if !isempty(failed) - exit(1) -end diff --git a/pluto-deployment-environment/Manifest.toml b/pluto-deployment-environment/Manifest.toml index f492445..a0d104c 100644 --- a/pluto-deployment-environment/Manifest.toml +++ b/pluto-deployment-environment/Manifest.toml @@ -1,25 +1,52 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.3" manifest_format = "2.0" -project_hash = "1897773a8065215ef94f8d665d12f3684212efac" +project_hash = "19ad24db2368c154e579918bddd75b30e1f2b707" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] -git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.1.4" +version = "1.3.2" [[deps.AbstractTrees]] -git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" -version = "0.4.4" +version = "0.4.5" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] +git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.36" + + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "76289dc51920fdc6e0013c872ba9551d54961c24" +git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.6.2" +version = "4.0.4" + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + + [deps.Adapt.weakdeps] + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.ArgCheck]] git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" @@ -34,10 +61,26 @@ version = "1.1.1" uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.BangBang]] -deps = ["Compat", "ConstructionBase", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables"] -git-tree-sha1 = "e28912ce94077686443433c2800104b061a827ed" +deps = ["Accessors", "Compat", "ConstructionBase", "InitialValues", "LinearAlgebra", "Requires"] +git-tree-sha1 = "08e5fc6620a8d83534bf6149795054f1b1e8370a" uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.3.39" +version = "0.4.2" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -54,27 +97,27 @@ uuid = "c9fd44ac-77b5-486c-9482-9798bd063cc6" version = "0.1.5" [[deps.BitFlags]] -git-tree-sha1 = "43b1a4a8f797c1cddadf60499a8a077d4af2cd2d" +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.7" +version = "0.1.9" [[deps.CodeTracking]] deps = ["InteractiveUtils", "UUIDs"] -git-tree-sha1 = "d730914ef30a06732bdd9f763f6cc32e92ffbff1" +git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386" uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" -version = "1.3.1" +version = "1.3.5" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "9c209fb7536406834aa938fb149964b985de6c83" +git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.1" +version = "0.7.5" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.11.5" [[deps.CommonMark]] deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] @@ -83,38 +126,54 @@ uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" version = "0.8.12" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "UUIDs"] -git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.6.1" +version = "4.15.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "96d823b94ba8d187a6d8f0826e731195a74b90e9" +git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.2.0" +version = "2.4.2" [[deps.Configurations]] deps = ["ExproniconLite", "OrderedCollections", "TOML"] -git-tree-sha1 = "62a7c76dbad02fdfdaa53608104edf760938c4ca" +git-tree-sha1 = "4358750bb58a3caefd5f37a4a0c5bfdbbf075252" uuid = "5218b696-f38b-4ac9-8b61-a12ec717816d" -version = "0.17.4" +version = "0.17.6" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] -git-tree-sha1 = "738fec4d684a9a6ee9598a8bfee305b26831f28c" +git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.2" +version = "1.5.5" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.Crayons]] git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" @@ -122,9 +181,9 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" version = "4.1.1" [[deps.DataAPI]] -git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.15.0" +version = "1.16.0" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -155,26 +214,36 @@ deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.6.2+0" + +[[deps.ExpressionExplorer]] +git-tree-sha1 = "0da78bef32ca71276337442389a3d1962a1ee0da" +uuid = "21656369-7473-754a-2065-74616d696c43" +version = "1.0.2" [[deps.ExproniconLite]] -deps = ["Pkg", "TOML"] -git-tree-sha1 = "c2eb763acf6e13e75595e0737a07a0bec0ce2147" +git-tree-sha1 = "4627945941758db441d197192f228cd854700ef9" uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" -version = "0.7.11" +version = "0.10.10" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FixedPointNumbers]] deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" +version = "0.8.5" [[deps.FromFile]] deps = ["Downloads", "Requires"] @@ -188,27 +257,27 @@ uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.FuzzyCompletions]] deps = ["REPL"] -git-tree-sha1 = "e16dd964b4dfaebcded16b2af32f05e235b354be" +git-tree-sha1 = "40ec72c57559a4473961bbcd12c96bcd4c2aaab4" uuid = "fb4132e2-a121-4a70-b8a1-d5b831dcdcc2" -version = "0.5.1" +version = "0.5.4" [[deps.Git]] deps = ["Git_jll"] -git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d" +git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.0" +version = "1.3.1" [[deps.GitHubActions]] deps = ["JSON", "Logging"] -git-tree-sha1 = "56e01ec63d13e1cf015d9ff586156eae3cc7cd6f" +git-tree-sha1 = "8750718611144f23584ca265d899baa1bf1a4531" uuid = "6b79fd1a-b13a-48ab-b6b0-aaee1fee41df" -version = "0.1.4" +version = "0.1.7" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "d8be4aab0f4e043cc40984e9097417307cce4c03" +git-tree-sha1 = "d18fb8a1f3609361ebda9bf029b60fd0f120c809" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.36.1+2" +version = "2.44.0+2" [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" @@ -228,28 +297,28 @@ uuid = "528830af-5a63-567c-a44a-034ed33b8444" version = "0.10.2+0" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e77dbf117412d4f164a464d610ee6050cc75272" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.6" +version = "1.10.8" [[deps.Hyperscript]] deps = ["Test"] -git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.4" +version = "0.0.5" [[deps.HypertextLiteral]] deps = ["Tricks"] -git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.4" +version = "0.9.5" [[deps.IOCapture]] deps = ["Logging", "Random"] -git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.3" +version = "0.2.5" [[deps.InitialValues]] git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" @@ -260,16 +329,26 @@ version = "0.3.1" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "e7cbed5032c4c397a6ac23d1493f3289e01231c4" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.14" +weakdeps = ["Dates"] + + [deps.InverseFunctions.extensions] + DatesExt = "Dates" + [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" +version = "1.5.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -279,19 +358,23 @@ version = "0.21.4" [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] -git-tree-sha1 = "6a125e6a4cb391e0b9adbd1afa9e771c2179f8ef" +git-tree-sha1 = "a6adc2dcfe4187c40dc7c2c9d2128e326360e90a" uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -version = "0.9.23" +version = "0.9.32" [[deps.LRUCache]] -git-tree-sha1 = "48c10e3cc27e30de82463c27bef0b8bdbd1dc634" +git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.4.1" +version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LazilyInitializedFields]] -git-tree-sha1 = "410fe4739a4b092f2ffe36fcb0dcc3ab12648ce1" +git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -version = "1.2.1" +version = "1.2.2" [[deps.LeftChildRightSiblingTrees]] deps = ["AbstractTrees"] @@ -302,49 +385,60 @@ version = "0.2.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.16.1+2" +version = "1.17.0+0" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LiveServer]] +deps = ["HTTP", "LoggingExtras", "MIMEs", "Pkg", "Sockets", "Test"] +git-tree-sha1 = "1e46b873b8ef176e23ee43f96e72cd45c20bafb4" +uuid = "16fef848-5104-11e9-1b77-fb7a48bbb589" +version = "1.3.1" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "cedb76b37bc5a6c702ade66be44f831fa23c681e" +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.0" +version = "1.0.3" [[deps.LoweredCodeUtils]] deps = ["JuliaInterpreter"] -git-tree-sha1 = "60168780555f3e663c536500aa790b6368adc02a" +git-tree-sha1 = "eeaedcf337f33c039f9f3a209a8db992deefd7e9" uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -version = "2.3.0" +version = "2.4.8" [[deps.MIMEs]] git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" @@ -353,9 +447,15 @@ version = "0.1.4" [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.10" +version = "0.5.13" + +[[deps.Malt]] +deps = ["Distributed", "Logging", "RelocatableFolders", "Serialization", "Sockets"] +git-tree-sha1 = "18cf4151e390fce29ca846b92b06baf9bc6e002e" +uuid = "36869731-bdee-424d-aa32-cab38c994e3b" +version = "1.1.1" [[deps.Markdown]] deps = ["Base64"] @@ -368,15 +468,15 @@ uuid = "736d6165-7244-6769-4267-6b50796e6954" version = "0.1.1" [[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] -git-tree-sha1 = "03a9b9718f5682ecb107ac9f7308991db4ce395b" +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.7" +version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.Memoize]] deps = ["MacroTools"] @@ -385,23 +485,23 @@ uuid = "c03570c3-d221-55d1-a50c-7939bbd78826" version = "0.4.4" [[deps.MicroCollections]] -deps = ["BangBang", "InitialValues", "Setfield"] -git-tree-sha1 = "629afd7d10dbc6935ec59b32daeb33bc4460a42e" +deps = ["Accessors", "BangBang", "InitialValues"] +git-tree-sha1 = "44d32db644e84c75dab479f1bc15ee76a1a3618f" uuid = "128add7d-3638-4c79-886c-908ea0c25c34" -version = "0.1.4" +version = "0.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MsgPack]] deps = ["Serialization"] -git-tree-sha1 = "fc8c15ca848b902015bd4a745d350f02cf791c2a" +git-tree-sha1 = "f5db02ae992c260e4826fe78c942954b48e1d9c2" uuid = "99f44e22-a591-53d1-9472-aa23ef4bd671" -version = "1.2.0" +version = "1.2.1" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -410,46 +510,52 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" +git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.1" +version = "1.4.3" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1aa4b74f80b01c6bc2b89992b861b5f210e665b5" +git-tree-sha1 = "a028ee3cb5641cccc4c24e90c36b0a4f7707bdf5" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.21+0" +version = "3.0.14+0" [[deps.OrderedCollections]] -git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282" +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.0" +version = "1.6.3" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.40.0+0" +version = "10.42.0+1" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.10" +version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.Pluto]] -deps = ["Base64", "Configurations", "Dates", "Distributed", "FileWatching", "FuzzyCompletions", "HTTP", "HypertextLiteral", "InteractiveUtils", "Logging", "LoggingExtras", "MIMEs", "Markdown", "MsgPack", "Pkg", "PrecompileSignatures", "REPL", "RegistryInstances", "RelocatableFolders", "SnoopPrecompile", "Sockets", "TOML", "Tables", "URIs", "UUIDs"] -git-tree-sha1 = "c3127195e4d10d9de5aa7364b5924ae062dcad35" +deps = ["Base64", "Configurations", "Dates", "Downloads", "ExpressionExplorer", "FileWatching", "FuzzyCompletions", "HTTP", "HypertextLiteral", "InteractiveUtils", "Logging", "LoggingExtras", "MIMEs", "Malt", "Markdown", "MsgPack", "Pkg", "PlutoDependencyExplorer", "PrecompileSignatures", "PrecompileTools", "REPL", "RegistryInstances", "RelocatableFolders", "Scratch", "Sockets", "TOML", "Tables", "URIs", "UUIDs"] +git-tree-sha1 = "500c5d51779931f5d404df47e10325edbb5b874b" uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781" -version = "0.19.25" +version = "0.19.43" + +[[deps.PlutoDependencyExplorer]] +deps = ["ExpressionExplorer", "InteractiveUtils", "Markdown"] +git-tree-sha1 = "4bc5284f77d731196d3e97f23abb732ad6f2a6e4" +uuid = "72656b73-756c-7461-726b-72656b6b696b" +version = "1.0.4" [[deps.PlutoHooks]] deps = ["InteractiveUtils", "Markdown", "UUIDs"] @@ -463,17 +569,25 @@ git-tree-sha1 = "8f5fa7056e6dcfb23ac5211de38e6c03f6367794" uuid = "0ff47ea0-7a50-410d-8455-4348d5de0420" version = "0.1.6" +[[deps.PlutoPages]] +deps = ["BetterFileWatching", "CommonMark", "Gumbo", "HypertextLiteral", "InteractiveUtils", "JSON", "LiveServer", "Logging", "Malt", "Markdown", "MarkdownLiteral", "Pkg", "Pluto", "PlutoHooks", "PlutoLinks", "PlutoSliderServer", "PlutoUI", "ProgressLogging", "RelocatableFolders", "SHA", "ThreadsX", "Unicode", "YAML"] +git-tree-sha1 = "b063957255fffd4ba2db2d4cbc22576758371bd2" +repo-rev = "lf-template-updates" +repo-url = "https://github.com/JuliaPluto/PlutoPages.jl.git" +uuid = "d5dc3dd1-4774-47c7-8860-0a1ad9e34b8c" +version = "0.1.3" + [[deps.PlutoSliderServer]] deps = ["AbstractPlutoDingetjes", "Base64", "BetterFileWatching", "Configurations", "Distributed", "FromFile", "Git", "GitHubActions", "Glob", "HTTP", "JSON", "Logging", "Pkg", "Pluto", "SHA", "Sockets", "TOML", "TerminalLoggers", "UUIDs"] -git-tree-sha1 = "2bca19d5d90959f6ffda8ec4bcfaa25ebf09b6b7" +git-tree-sha1 = "bebd149349757df4ef8f1f62b78408b68114e133" uuid = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4" -version = "0.3.25" +version = "0.3.29" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "b478a748be27bd2f2c73a7690da219d0844db305" +git-tree-sha1 = "ab55ee1510ad2af0ff674dbcced5e94921f867a9" uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.51" +version = "0.7.59" [[deps.PrecompileSignatures]] git-tree-sha1 = "18ef344185f25ee9d51d80e179f8dad33dc48eb1" @@ -482,15 +596,15 @@ version = "3.0.3" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81" +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.1.2" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.0" +version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] @@ -507,7 +621,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Reexport]] @@ -517,9 +631,9 @@ version = "1.2.2" [[deps.Referenceables]] deps = ["Adapt"] -git-tree-sha1 = "e681d3bfa49cd46c3c161505caddf20f0e62aaa9" +git-tree-sha1 = "02d31ad62838181c1a3a5fd23a1ce5914a643601" uuid = "42d2dcc6-99eb-4e98-b66c-637b7d73030e" -version = "0.1.2" +version = "0.1.3" [[deps.RegistryInstances]] deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] @@ -529,9 +643,9 @@ version = "0.1.0" [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] -git-tree-sha1 = "90bc7a7c96410424509e4263e277e43250c05691" +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.0" +version = "1.0.1" [[deps.Requires]] deps = ["UUIDs"] @@ -541,9 +655,9 @@ version = "1.3.0" [[deps.Revise]] deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] -git-tree-sha1 = "feafdc70b2e6684314e188d95fe66d116de834a7" +git-tree-sha1 = "85ddd93ea15dcd8493400600e09104a9e94bb18d" uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.5.2" +version = "3.5.15" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -551,9 +665,9 @@ version = "0.7.0" [[deps.Scratch]] deps = ["Dates"] -git-tree-sha1 = "30449ee12237627992a99d5e30ae63e4d78cd24a" +git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.2.0" +version = "1.2.1" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -569,18 +683,13 @@ git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" version = "1.1.0" -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SplittablesBase]] deps = ["Setfield", "Test"] @@ -589,24 +698,30 @@ uuid = "171d559e-b47b-412a-8079-5efa626c420e" version = "0.1.15" [[deps.StaticArraysCore]] -git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.0" +version = "1.4.3" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringEncodings]] deps = ["Libiconv_jll"] -git-tree-sha1 = "33c0da881af3248dafefb939a21694b97cfece76" +git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" -version = "0.3.6" +version = "0.3.7" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -615,15 +730,15 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] -git-tree-sha1 = "1544b926975372da01227b382066ab70e574a3ec" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.10.1" +version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TerminalLoggers]] deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] @@ -636,32 +751,49 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.ThreadsX]] -deps = ["ArgCheck", "BangBang", "ConstructionBase", "InitialValues", "MicroCollections", "Referenceables", "Setfield", "SplittablesBase", "Transducers"] -git-tree-sha1 = "34e6bcf36b9ed5d56489600cf9f3c16843fa2aa2" +deps = ["Accessors", "ArgCheck", "BangBang", "ConstructionBase", "InitialValues", "MicroCollections", "Referenceables", "SplittablesBase", "Transducers"] +git-tree-sha1 = "70bd8244f4834d46c3d68bd09e7792d8f571ef04" uuid = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d" -version = "0.1.11" +version = "0.1.12" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] -git-tree-sha1 = "9a6ae7ed916312b41236fcef7e0af564ef934769" +git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.9.13" +version = "0.11.0" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.Transducers]] -deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] -git-tree-sha1 = "25358a5f2384c490e98abd565ed321ffae2cbb37" +deps = ["Accessors", "Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "ConstructionBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "SplittablesBase", "Tables"] +git-tree-sha1 = "5215a069867476fc8e3469602006b9670e68da23" uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" -version = "0.4.76" +version = "0.4.82" + + [deps.Transducers.extensions] + TransducersBlockArraysExt = "BlockArrays" + TransducersDataFramesExt = "DataFrames" + TransducersLazyArraysExt = "LazyArrays" + TransducersOnlineStatsBaseExt = "OnlineStatsBase" + TransducersReferenceablesExt = "Referenceables" + + [deps.Transducers.weakdeps] + BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02" + OnlineStatsBase = "925886fa-5bf2-5e8e-b522-a9147a512338" + Referenceables = "42d2dcc6-99eb-4e98-b66c-637b7d73030e" [[deps.Tricks]] -git-tree-sha1 = "aadb748be58b492045b4f56166b5188aa63ce549" +git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.7" +version = "0.1.8" [[deps.URIs]] -git-tree-sha1 = "074f993b0ca030848b897beff716d93aca60f06a" +git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.4.2" +version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -672,26 +804,26 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "dbc7f1c0012a69486af79c8bcdb31be820670ba2" +git-tree-sha1 = "80c3218f29cbc47111ac87e7be5e69cc05c6dd36" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.8" +version = "0.4.11" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" diff --git a/pluto-deployment-environment/Project.toml b/pluto-deployment-environment/Project.toml index 8c7f90a..0f996b5 100644 --- a/pluto-deployment-environment/Project.toml +++ b/pluto-deployment-environment/Project.toml @@ -13,6 +13,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" PlutoHooks = "0ff47ea0-7a50-410d-8455-4348d5de0774" PlutoLinks = "0ff47ea0-7a50-410d-8455-4348d5de0420" +PlutoPages = "d5dc3dd1-4774-47c7-8860-0a1ad9e34b8c" PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c" diff --git a/src/mod1_setup_website/working_locally.md b/src/mod1_setup_website/working_locally.md index 201adff..ec3a7f4 100644 --- a/src/mod1_setup_website/working_locally.md +++ b/src/mod1_setup_website/working_locally.md @@ -12,10 +12,26 @@ tags: ["module1", "track_setup", "track_julia", "PlutoSliderServer", "pluto"] Open this repository in VS Code, and install the recommended extensions. +### Running from VSCode + To start running the development server, open the VS Code *command palette* (press `Cmd+Shift+P`), and search for **`Tasks: Run Task`**, then **`PlutoPages: run development server`**. The first run can take some time, as it builds up the notebook outputs cache. Leave it running. This will start two things in parallel: the PlutoPages.jl notebook (which generates the website), and a static file server (with Deno_jll). It will open two tabs in your browser: one is the generation dashboard (PlutoPages), the other is the current site preview (Deno_jll). Whenever you edit a file, PlutoPages will automatically regenerate! Refresh your browser tab. If it does not pick up the change, go to the generation dashboard and click the "Read input files again" button. -**Note!**: This workflow is recommended for writing static content, styles, and for site maintenance. But for writing Pluto notebooks, it's best to prepare the notebook first, and then run the site (because it re-runs the entire notebook on any change). \ No newline at end of file +**Note!**: This workflow is recommended for writing static content, styles, and for site maintenance. But for writing Pluto notebooks, it's best to prepare the notebook first, and then run the site (because it re-runs the entire notebook on any change). + +### Running from the terminal + +If you are not using VS code, you can start the development mode from the terminal with + +``` +julia --project=pluto-deployment-environment +``` + +and then + +```julia +julia> using PlutoPages; PlutoPages.develop(pwd()) +``` \ No newline at end of file