DocumenterTools
DocumenterTools.package_devpath
— Functionpackage_devpath(pkg)
Returns the path to the top level directory of a devved out package source tree. The package is identified by its top level module pkg
.
Generator
DocumenterTools.Generator
— ModuleProvides the functions related to generating documentation stubs.
DocumenterTools.Generator.gitignore
— Methodgitignore()
Contents of the default .gitignore
file.
DocumenterTools.Generator.index
— Methodindex(pkgname)
Contents of the default src/index.md
file.
DocumenterTools.Generator.make
— Methodmake(pkgname; format)
Contents of the default make.jl
file.
DocumenterTools.Generator.mkdocs
— Methodmkdocs(pkgname; description, author, url)
Contents of the default mkdocs.yml
file.
DocumenterTools.Generator.project
— Methodproject(; format)
Contents of the default Project.toml
file.
DocumenterTools.Generator.savefile
— Methodsavefile(f, root, filename)
Attempts to save a file at $(root)/$(filename)
. f
will be called with file stream (see open
).
filename
can also be a file in a subdirectory (e.g. src/index.md
), and then then subdirectories will be created automatically.
Themes
The theming API in DocumenterTools is very experimental and may change without notice.
DocumenterTools.Themes
— ModuleThe Themes
module contains APIs to more easily compile the Documenter Sass themes into CSS files.
To compile an Sass file into a Documenter theme, you can use the Themes.compile
function:
julia> using DocumenterTools: Themes
julia> Themes.compile("mytheme.scss")
When working on the Documenter built-in themes, the Themes.themewatcher
function can be used to automatically update all the built-in themes when any of the Sass files are modified. To enable it, just run
julia> using DocumenterTools: Themes
julia> Themes.themewatcher()
Note that it will read and overwrite the Sass and CSS files of the Documenter of the environment DocumenterTools is loaded in — make sure that you have Documenter added as a development dependency to that environment.
DocumenterTools.Themes.compile
— Functioncompile(src[, dst])
Compile an input Sass/SCSS file src
into a CSS file. The standard Documenter Sass/SCSS files are available in the include path.
The optional dst
argument can be used to specify the output file. Otherwise, the file extension of the src
file is simply replaced by .css
.
DocumenterTools.Themes.compile_native_theme
— Methodcompile_native_theme(name; dst=nothing)
Compiles a native Documenter theme and places it into Documenter's assets directory.
Optionally, the dst
keyword argument can be used to specify the output file.
DocumenterTools.Themes.themewatcher
— Methodthemewatcher()
Starts an asynchronous background task that checks for changes in the Documenter Sass files and recompiles all native themes whenever changes are detected.