Internal API
ExampleJuggler.replace_source_url
— Functionreplace_source_url(input, source_url)
Replace "@SOURCE_URL" marker with url of source. Used for preprocessing the input of Literate.markdown
in ExampleJuggler.docmodules
.
ExampleJuggler.replace_atat
— Functionreplace_atat(input)
Replace "@@" marker with "@". Used for postprocessing the output of Literate.markdown
in ExampleJuggler.docmodules
.
ExampleJuggler.testplutonotebook
— Functiontestplutonotebook(notebookname; pluto_project = nothing)
Test pluto notebook in a Pluto session. Core of testplutonotebooks
. Implemented in extension ExampleJugglerPlutoExt
.
ExampleJuggler.docplutostatichtml
— Functiondocplutostatichtml(example_dir, notebooks; pluto_project)
Document notebooks via PlutoStaticHTML.jl. Implemented in extension ExampleJugglerPlutoStaticHTMLExt
.
ExampleJuggler.docplutosliderserver
— Functiondocplutosliderserver(example_dir, notebooks; pluto_project, source_prefix, iframe_height, force)
Document notebooks via PlutoSliderServer.jl Implemented in extension ExampleJugglerPlutoSliderServerExt
.
ExampleJuggler.@testscript
— Macrotestscript(script)
Wrap script (or Pluto notebook seen as script) into a custom module and evaluate it in the context of the calling module. If the script contains a function runtests
, call it. It is assumed that the script uses Test.@test
to test correctness.
ExampleJuggler.@testmodule
— Macro@testmodule
Include script defining a module in the context of the calling module and call the runtests
method if it is defined in this module, passing kwargs...
.
ExampleJuggler.@plotmodule
— Macro@plotmodule(modules, kwargs...)
Include module into context of calling module and execute generateplots(;kwargs...)
if it exists.
ExampleJuggler.@plotmodules
— Macro@plotmodules(modules, kwargs...)
Plot several scripts defining modules via @plotmodule
.
ExampleJuggler.docmodules
— Function docmodules(example_dir, example_modules; kwargs...)
Generate markdown files for use with documenter from list of Julia code examples in example_dir
via Literate.jl in form of modules.
Keyword arguments:
use_module_titles
: use titles from module input files
See ExampleModule.jl for an example.
ExampleJuggler.startroot!
— Functionstartroot!(dir)
Assume dir
is the directory from which make.jl
has been invoked (normally, package root or the docs
subdirectory). Used in example_md_dir
.
ExampleJuggler.example_md_dir
— Function example_md_dir(subdir)
Return full path to the subdirectory of docs/src where the markdown files should be placed which later will be scanned by Documenter. Creates the directory if it doesn't already exist.