If you just want to modify or add an example, you can build just the example without having to build the full documentation locally.
If you want to build the documentation, navigate to this (docs/) directory and open a Julia REPL.
First activate the documentation environment:
julia> ] activate .
Alternatively, you can start Julia with julia --project=.
.
Then install all packages:
julia> ] instantiate
By default, this will use the development version of KernelFunctions in the parent directory.
To build the documentation, run (after activating the documentation environment)
julia> include("make.jl")
You can speed up the process if you do not execute the examples and comment out the
relevant sections in docs/make.jl
.
The output is in the docs/build/
directory and best viewed in a browser.
The documentation uses pretty URLs which can be a hindrance if you browse the documentation locally.
The Documenter documentation suggests that
You can run a local web server out of the
docs/build
directory. One way to accomplish this is to install the LiveServer Julia package. You can then start the server withjulia -e 'using LiveServer; serve(dir="docs/build")'
. Alternatively, if you have Python installed, you can start one withpython3 -m http.server --bind localhost
(orpython -m SimpleHTTPServer
with Python 2).
If you make any changes, you can run
julia> include("make.jl")
again to rebuild the documentation.
To add additional dependencies, run (after activating the documentation environment)
julia> ] add NewDependency
or, as a shell one-liner:
julia --project=. -e 'using Pkg; Pkg.add("NewDependency")'
and commit the changes to Project.toml and Manifest.toml.
See ../examples