6. Interaction with Documenter.jl
Examples.jl can be used for any purpose, it spits out regular markdown files, and notebooks. Typically, though, these files will be used to render documentation for your package. The generators (Examples.markdown, Examples.notebook and Examples.script) supports a keyword argument documenter that lets the generator perform some extra things, keeping in mind that the generated files will, eventually, be used with Documenter.jl. So lets take a look at what will happen if we set documenter = true:
- The default code fence will change from
to Documenters```julia # code ```@exampleblocks:```@examples $(name) # code ``` - The following
@metablock will be added to the top of the markdown page, which redirects the "Edit on GitHub" link on the top of the page to the source file rather than the generated.mdfile:```@meta EditURL = "$(relpath(inputfile, outputdir))" ```
- Documenter style
@refs and@idwill be removed. This means that you can use@refand@idin the source file without them leaking to the notebook.