Browse Source

documenter to true by default

pull/1/head
Fredrik Ekre 8 years ago
parent
commit
6ca632ccd7
  1. 6
      docs/make.jl
  2. 22
      src/Examples.jl

6
docs/make.jl

@ -5,9 +5,9 @@ using Examples
EXAMPLE = joinpath(@__DIR__, "..", "examples", "example.jl") EXAMPLE = joinpath(@__DIR__, "..", "examples", "example.jl")
OUTPUT = joinpath(@__DIR__, "src/generated") OUTPUT = joinpath(@__DIR__, "src/generated")
Examples.markdown(EXAMPLE, OUTPUT; documenter = true) Examples.markdown(EXAMPLE, OUTPUT)
Examples.notebook(EXAMPLE, OUTPUT; documenter = true) Examples.notebook(EXAMPLE, OUTPUT)
Examples.script(EXAMPLE, OUTPUT; documenter = true) Examples.script(EXAMPLE, OUTPUT)
makedocs( makedocs(
modules = [Examples], modules = [Examples],

22
src/Examples.jl

@ -169,21 +169,21 @@ Keyword arguments:
- `preprocess`, `postprocess`: custom pre- and post-processing functions, - `preprocess`, `postprocess`: custom pre- and post-processing functions,
see the [Custom pre- and post-processing](@ref Custom-pre-and-post-processing) see the [Custom pre- and post-processing](@ref Custom-pre-and-post-processing)
section of the manual. Defaults to `identity`. section of the manual. Defaults to `identity`.
- `documenter`: boolean that tells if the output is intended to use with Documenter.jl.
Defaults to `true`. See the the manual section on
[Interaction with Documenter](@ref Interaction-with-Documenter).
- `codefence`: A `Pair` of opening and closing code fence. Defaults to - `codefence`: A `Pair` of opening and closing code fence. Defaults to
```` ````
"```julia" => "```" "```@example \$(name)" => "```"
```` ````
if `documenter = false` and if `documenter = true` and
```` ````
"```@example \$(name)" => "```" "```julia" => "```"
```` ````
if `documenter = true`. if `documenter = false`.
- `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](@ref Interaction-with-Documenter).
""" """
function markdown(inputfile, outputdir; preprocess = identity, postprocess = identity, function markdown(inputfile, outputdir; preprocess = identity, postprocess = identity,
name = filename(inputfile), documenter::Bool = false, name = filename(inputfile), documenter::Bool = true,
codefence::Pair = documenter ? "```@example $(name)" => "```" : "```julia" => "```", codefence::Pair = documenter ? "```@example $(name)" => "```" : "```julia" => "```",
kwargs...) kwargs...)
# normalize paths # normalize paths
@ -276,13 +276,13 @@ Keyword arguments:
see the [Custom pre- and post-processing](@ref Custom-pre-and-post-processing) see the [Custom pre- and post-processing](@ref Custom-pre-and-post-processing)
section of the manual. Defaults to `identity`. section of the manual. Defaults to `identity`.
- `execute`: a boolean deciding if the generated notebook should also - `execute`: a boolean deciding if the generated notebook should also
be executed or not. Defaults to `false`. be executed or not. Defaults to `true`.
- `documenter`: boolean that says if the source contains Documenter.jl specific things - `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 to filter out during notebook generation. Defaults to `true`. See the the manual
section on [Interaction with Documenter](@ref Interaction-with-Documenter). section on [Interaction with Documenter](@ref Interaction-with-Documenter).
""" """
function notebook(inputfile, outputdir; preprocess = identity, postprocess = identity, function notebook(inputfile, outputdir; preprocess = identity, postprocess = identity,
execute::Bool=false, documenter::Bool = false, execute::Bool=true, documenter::Bool=true,
name = filename(inputfile), kwargs...) name = filename(inputfile), kwargs...)
# normalize paths # normalize paths
inputfile = realpath(abspath(inputfile)) inputfile = realpath(abspath(inputfile))

Loading…
Cancel
Save