JuliaDocs / Documenter.jl

A documentation generator for Julia.

Home Page:https://documenter.juliadocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow setting a global `DocTestSetup` block for all `.md` files in one place

fingolfin opened this issue · comments

we currently have this in every single .md file for our packages:

DocTestSetup = quote
  using MyPackage
end

so that jldoctest work as desired. For the docstrings, a single invocation

DocMeta.setdocmeta!(MyPackage, :DocTestSetup, quote using MyPackage end; recursive=true)

sufficed to take care of them.

It would be great if there was a similar way to tell Documenter once, in one place, to use some code as DocTestSetup for all the .md files.