Skip to content

Commit

Permalink
frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Nov 21, 2023
1 parent c65f789 commit f82a086
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
21 changes: 13 additions & 8 deletions PlutoPages.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.17
# v0.19.25

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -181,6 +181,9 @@ 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(
Expand Down Expand Up @@ -518,13 +521,9 @@ end
# ╔═╡ 1c269e16-65c7-47ae-aeab-001f1b205e14
ishtml(output::TemplateOutput) = output.file_extension == "html"

# ╔═╡ 5649e688-d602-4baa-b204-551c7d74b9a7
ishtml(input::TemplateInput) =
lstrip(isequal('.'), splitext(input.relative_path)[2]) == "html"

# ╔═╡ 898eb093-444c-45cf-88d7-3dbe9708ae31
function final_url(input::TemplateInput, output::TemplateOutput)::String
if ishtml(output) && !ishtml(input)
if ishtml(output)
# Examples:
# a/b.jl -> a/b/index.html
# a/index.jl -> a/index.html
Expand Down Expand Up @@ -698,7 +697,13 @@ function template_handler(

# TODO these relative paths can't be right...
h = @htl """
<pluto-editor statefile=$(reg_s.url) notebookfile=$(reg_n.url) disable_ui>
<pluto-editor
statefile=$(reg_s.url)
notebookfile=$(reg_n.url)
slider_server_url=$(pluto_deploy_settings.Export.slider_server_url)
binder_url=$(pluto_deploy_settings.Export.binder_url)
disable_ui
>
"""

frontmatter = Pluto.frontmatter(input.absolute_path)
Expand Down Expand Up @@ -950,6 +955,7 @@ end
# ╠═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
Expand Down Expand Up @@ -995,7 +1001,6 @@ end
# ╠═898eb093-444c-45cf-88d7-3dbe9708ae31
# ╟─a510857f-528b-43e8-be78-69e554d165a6
# ╟─1c269e16-65c7-47ae-aeab-001f1b205e14
# ╟─5649e688-d602-4baa-b204-551c7d74b9a7
# ╟─318dc59e-15f6-4b25-bcf5-1ab6b0d87af7
# ╟─76193b12-842c-4b82-a23e-fb7403274234
# ╠═4f563136-fc7b-4322-92ba-78c0183c40cc
Expand Down
18 changes: 18 additions & 0 deletions src/docs/AbstractPlutoDingetjes.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
### A Pluto.jl notebook ###
# v0.19.32

#> [frontmatter]
#> image = "https://media.giphy.com/media/l3vRfDn9ca5PVkHv2/giphy.gif"
#> layout = "layout.jlhtml"
#> tags = ["docs", "widgets", "AbstractPlutoDingetjes", "advanced"]
#> date = "2023-11-21"
#> description = "AbstractPlutoDingetjes allows you to write more advanced widgets to be used inside Pluto.jl."
#> license = "Unlicense"
#>
#> [[frontmatter.author]]
#> name = "Pluto.jl"
#> url = "https://github.com/JuliaPluto"

using Markdown
using InteractiveUtils

Expand All @@ -10,6 +22,11 @@ using AbstractPlutoDingetjes
# ╔═╡ 16877f32-8879-11ee-0554-01ef8951f596
Docs.Binding(AbstractPlutoDingetjes, :AbstractPlutoDingetjes)

# ╔═╡ 13a37a8e-023a-45da-8364-fd69ff76285b
md"""
![](https://media.giphy.com/media/l3vRfDn9ca5PVkHv2/giphy.gif)
"""

# ╔═╡ 39680ebf-8cca-4c64-80aa-afdb261344e7
md"""
# AbstractPlutoDingetjes.Bonds
Expand Down Expand Up @@ -368,6 +385,7 @@ version = "17.4.0+0"
# ╔═╡ Cell order:
# ╟─5b3d4dfa-f93a-4854-950f-6b93f6ff42fe
# ╟─16877f32-8879-11ee-0554-01ef8951f596
# ╟─13a37a8e-023a-45da-8364-fd69ff76285b
# ╟─39680ebf-8cca-4c64-80aa-afdb261344e7
# ╟─a0acd455-b1d2-4580-9607-119ec882315f
# ╟─c3e83475-6ab0-4aa8-9a57-c2f25772cc75
Expand Down

0 comments on commit f82a086

Please sign in to comment.