-
Notifications
You must be signed in to change notification settings - Fork 97
How to build the documentation locally
We use Documenter.jl julia package as documentation generation system..
Assuming that your local project MyPackage clone is hosted in $MYPACKAGE_DIR
directory, the documentation source code is located in $MYPACKAGE_DIR/docs
.
The documentation directory ($MYPACKAGE_DIR/docs
) is itself a julia project. It contains its own Project.toml
file, a make.jl
julia file and some more content under $MYPACKAGE_DIR/docs/src
directory.
Assuming also that you already have a Julia version available in your local machine, to generate the documentation locally, you need to start Julia REPL from the package directory::
$ cd $MYPACKAGE_DIR
$ julia --project=docs/
Inside the Julia REPL you need to load the required dependencies and run the documentation generation script:
pkg> develop . # (1)
pkg> instantiate # (2)
julia> include("docs/make.jl") # (3)
These commands generate the documentation in $MYPACKAGE_DIR/docs/build
directory. In particular
- Make MyPackage project available for development.
- Resolve and install all required dependencies.
- Generate the documentation.
After that process, you should be able to dive into your locally generated documentation.
Please, open $MYPACKAGE_DIR/docs/build/index.html
, using your preferred browser, to start exploring the docs.