Reproducible examples in blog posts
When migrating this blog recently from Hugo to Franklin.jl, the main difficulty I faced was reproducing old examples (so effectively I didn't rerun anything, and just moved the old generated HTML pages). I have been bothered by this for a long time, so I wrote a quick hack which I packaged up in ReproducibleLiteratePage.jl.
This page was processed using that package. Here is how it works:
take a Julia code file marked up with Literate.jl,
Manifest.toml(eg activate the directory as a project and add packages)
produce a markdown file using
Here is some code:
using UnPack # the lightest package I could think of struct Foo a b end a, b = Foo(1, 2) a, b
The Julia source (again, marked up with Literate.jl),
Manifest.toml should be available as a
tar archive at the bottom of the page.