Update: I’ve had good success using Documenter to iterate on Literate.jl scripts, to generate notebook-like analyses. Combined with julia-repl + Revise, I get fairly snappy updates to my reports.
The idea is to setup Documenter.jl normally, and tell the agent to write its Literate.jl scripts in /docs/src/notebooks. The agent can then call this function:
# For fast interactive iteration: include("docs/make.jl") once, then call
# preview_page("my_notebook") to rebuild just that page.
function preview_page(page::String)
outdir = joinpath(DOCS_DIR, "src", "generated")
mkpath(outdir)
Literate.markdown(joinpath(DOCS_DIR, "src", "notebooks", "$(page).jl"), outdir; documenter=true)
makedocs(
root = DOCS_DIR,
sitename = "Documentation",
pages = ["Home" => "index.md", titlecase(replace(page, '_' => ' ')) => "generated/$(page).md"],
)
end
to run that and generate the corresponding HTML, which it can then show in the browser. As a bonus point, those Literate.jl scripts are now ready to be included in the permanent documentation.