DocumenterTools.generate
— FunctionDocumenterTools.generate(path::String = "docs"; name = nothing, format = :html)
Create a documentation stub in path
, which is usually a sub folder in the package root. The name of the package is determined automatically, but can be given with the name
keyword argument.
generate
can also be called without any arguments, in which case it simply puts all the generated files into a docs
directory in the current working directory. This way, if you are already in the root directory of your package, you generally only need to call generate()
to generate the documentation stub.
generate
creates the following files in path
:
.gitignore
src/index.md
make.jl
mkdocs.yml
Project.toml
Arguments
path
file path to the documentation directory to be created (default is "docs"
).
Keywords Arguments
name
is the name of the package (without .jl
). If name
is not given generate
tries to detect it automatically.
format
can be either :html
(default), :markdown
or :pdf
corresponding to the format
keyword to Documenter's makedocs
function, see Documenter's manual.
Examples
julia> using DocumenterTools
julia> DocumenterTools.generate("path/to/MyPackage/docs")
[ ... output ... ]
DocumenterTools.generate
— MethodDocumenterTools.generate(pkg::Module; dir = "docs", format = :html)
Same as generate(path::String)
but the path
and name is determined automatically from the module.
The package must be in development mode. Make sure you run pkg> develop pkg
from the Pkg REPL, or Pkg.develop("pkg")
before generating docs.
Examples
julia> using DocumenterTools
julia> using MyPackage
julia> DocumenterTools.generate(MyPackage)
[ ... output ... ]
DocumenterTools.genkeys
— Methodgenkeys(package::Module; remote="origin")
Like the other method, this generates the SSH keys necessary for the automatic deployment of documentation with Documenter from a builder to GitHub Pages, but attempts to guess the package URLs from the Git remote.
package
needs to be the top level module of the package. The remote
keyword argument can be used to specify which Git remote is used for guessing the repository's GitHub URL.
This method requires the following command lines programs to be installed:
which
(Unix) orwhere
(Windows)git
ssh-keygen
The package must be in development mode. Make sure you run pkg> develop pkg
from the Pkg REPL, or Pkg.develop("pkg")
before generating the SSH keys.
Examples
julia> using DocumenterTools
julia> DocumenterTools.genkeys(DocumenterTools)
[Info: add the public key below to https://github.com/JuliaDocs/DocumenterTools.jl/settings/keys with read/write access:
ssh-rsa AAAAB3NzaC2yc2EAAAaDAQABAAABAQDrNsUZYBWJtXYUk21wxZbX3KxcH8EqzR3ZdTna0Wgk...jNmUiGEMKrr0aqQMZEL2BG7 username@hostname
[ Info: add a secure environment variable named 'DOCUMENTER_KEY' to https://travis-ci.com/JuliaDocs/DocumenterTools.jl/settings (if you deploy using Travis CI) or https://github.com/JuliaDocs/DocumenterTools.jl/settings/secrets (if you deploy using GitHub Actions) with value:
LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBNnpiRkdXQVZpYlIy...QkVBRWFjY3BxaW9uNjFLaVdOcDU5T2YrUkdmCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
DocumenterTools.genkeys
— MethodDocumenterTools.genkeys(; user="$USER", repo="$REPO")
Generates the SSH keys necessary for the automatic deployment of documentation with Documenter from a builder to GitHub Pages.
By default the links in the instructions need to be modified to correspond to actual URLs. The optional user
and repo
keyword arguments can be specified so that the URLs in the printed instructions could be copied directly. They should be the name of the GitHub user or organization where the repository is hosted and the full name of the repository, respectively.
This method of genkeys
requires the following command lines programs to be installed:
which
(Unix) orwhere
(Windows)ssh-keygen
Examples
julia> using DocumenterTools
julia> DocumenterTools.genkeys()
[ Info: add the public key below to https://github.com/$USER/$REPO/settings/keys with read/write access:
ssh-rsa AAAAB3NzaC2yc2EAAAaDAQABAAABAQDrNsUZYBWJtXYUk21wxZbX3KxcH8EqzR3ZdTna0Wgk...jNmUiGEMKrr0aqQMZEL2BG7 username@hostname
[ Info: add a secure environment variable named 'DOCUMENTER_KEY' to https://travis-ci.com/$USER/$REPO/settings (if you deploy using Travis CI) or https://github.com/$USER/$REPO/settings/secrets (if you deploy using GitHub Actions) with value:
LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBNnpiRkdXQVZpYlIy...QkVBRWFjY3BxaW9uNjFLaVdOcDU5T2YrUkdmCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
julia> DocumenterTools.genkeys(user="JuliaDocs", repo="DocumenterTools.jl")
[Info: add the public key below to https://github.com/JuliaDocs/DocumenterTools.jl/settings/keys with read/write access:
ssh-rsa AAAAB3NzaC2yc2EAAAaDAQABAAABAQDrNsUZYBWJtXYUk21wxZbX3KxcH8EqzR3ZdTna0Wgk...jNmUiGEMKrr0aqQMZEL2BG7 username@hostname
[ Info: add a secure environment variable named 'DOCUMENTER_KEY' to https://travis-ci.com/JuliaDocs/DocumenterTools.jl/settings (if you deploy using Travis CI) or https://github.com/JuliaDocs/DocumenterTools.jl/settings/secrets (if you deploy using GitHub Actions) with value:
LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBNnpiRkdXQVZpYlIy...QkVBRWFjY3BxaW9uNjFLaVdOcDU5T2YrUkdmCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
DocumenterTools.package_devpath
— Methodpackage_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
.