I would like to add some full-feature examples on my package documentation, but rather than copy/pasting in the example block I would like to keep each example on its own file.
In general markdown this is not possible, but maybe using Documenter it is ??
There is an open issue for this kind of feature. You have a few options for a workaround though:
As suggested by Kristoffer, you can do something like
Another option is to use Literate.jl to convert the script into a
.md file for Documenter. You can look at how
examples/example.jl is included in the Literate docs (basically, you just need to add a
Literate.markdown call to
Finally, you can always do your own pre-processing or generation of the
.md files in
JuMP embeds all of our examples with literate. It works excellently.
There is a link at the bottom to the source file