6. Interaction with Documenter.jl
TBW
diff --git a/latest/documenter.html b/latest/documenter.html index 12c70a3..40a9243 100644 --- a/latest/documenter.html +++ b/latest/documenter.html @@ -1,2 +1,8 @@ -
TBW
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:
```julia
+# code
+```to Documenters @example blocks:```@examples $(name)
+# code
+```@meta block 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 .md file:```@meta
+EditURL = "$(relpath(inputfile, outputdir))"
+```@refs and @id will be removed. This means that you can use @ref and @id in the source file without them leaking to the notebook.Examples.markdown — Function.Examples.markdown(inputfile, outputdir; kwargs...)Generate a markdown file from inputfile and write the result to the directoryoutputdir.
Keyword arguments:
name: name of the output file, excluding .md. name is also used to name all the @example blocks. Defaults to the filename of inputfile.preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.codefence: A Pair of opening and closing code fence. Defaults to"```@example $(name)" => "```"documenter: boolean that says if the output is intended to use with Documenter.jl. Defaults to false. See the the manual section on Interaction with Documenter.Examples.notebook — Function.Examples.notebook(inputfile, outputdir; kwargs...)Generate a notebook from inputfile and write the result to outputdir.
Keyword arguments:
name: name of the output file, excluding .ipynb. Defaults to the filename of inputfile.preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.execute: a boolean deciding if the generated notebook should also be executed or not. Defaults to false.documenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to false. See the the manual section on Interaction with Documenter.Examples.script — Function.Examples.script(inputfile, outputdir; kwargs...)Generate a plain script file from inputfile and write the result to outputdir.
Keyword arguments:
name: name of the output file, excluding .jl. Defaults to the filename of inputfile.preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.