Documentation with interactive WGLMakie visualizations

I am trying to migrate all examples of Meshes.jl documentation to use WGLMakie.jl instead of CairoMakie.jl. When I generate the docs locally the visualizations show up and work nicely with interaction. However, on GitHub they don’t show up because there is no Julia process running.

I know that I need to create a Page with JSServe.jl but the tricky didn’t work in my experiments. My latest attempt is on the master branch of the Meshes.jl repo. What changes are needed to make it work? Appreciate any help.

What have you tried so far and how did error?

Hi @sdanisch, I added Page(offline=true, exportable=true) as explained in the docs, but the visualizations don’t show up on Github. I am not sure if these JSServe pages should be created on each example block or on the main make.jl file in the docs folder.

For example, the examples in src/index.md are not showing up even when I add Page in the first example block: Meshes.jl/index.md at master · JuliaGeometry/Meshes.jl · GitHub

Can you point to a PR that shows exactly what you did?
Page is a bit fragile, so it really needs to get displayed before anything else.
As the name suggest, it needs to be inserted for every page, and also make sure there is only one Page() per page :wink:

1 Like

Will try that and will report back if it doesn’t work. I think I didn’t display the Page object in any separate cell when I tried it the last time.

Everything is working nicely now after displaying the Page object in a separate cell at the top of each page with examples. :100:

1 Like