Reuse results from @example blocks

I’m writing some documentation using Documenter.jl and would like to create a sort of follow along guide (like a jupyter notebook).

Currently, I’m using @example blocks for showing the code and the results of that computation. As the computations can take quite some time, is there a way to keep the results for the next @example block?

Is there a better way of doing this?

Thanks,
Tom

If you mean sharing variables between at-example blocks within the same build, then yes, you can do that. You can give each block a name (see the “Named @example blocks” section) and then they’ll be share the scope (as long as they are on the same page anyhow).

2 Likes

Thanks, I completely missed that one in the documentation.