diff --git a/docs/README.md b/docs/README.md index fbc9c49394a..74798d131f7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,20 +1,39 @@ -JuMP.jl Documentation README -================================ +# JuMP Documentation README -JuMP.jl's documentation is written with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl). To install it, run the following command in a Julia session: +**The documentation currently requires Julia 1.0.x to build.** -```julia -Pkg.add("Documenter") +JuMP's documentation is written with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl). + +## Initial setup + +To build the documentation, you need to do a series of initialization steps. +However, you only need to do this once! + +First, you will need a local copy of JuMP. If you don't have one already, run: +``` +$ julia -e 'import Pkg; Pkg.develop("JuMP")' +``` + +This will create a copy of JuMP at `~/.julia/dev/JuMP`. (On Windows, this will +be located at `C:\\Users\\\\.julia\\dev\\JuMP`.) Open a terminal, +and `cd` to that directory: +``` +$ cd ~/.julia/dev/JuMP ``` +The next step is to setup the `docs` environment. +``` +$ julia --project=docs -e 'import Pkg; Pkg.instantiate(); Pkg.develop(Pkg.PackageSpec(path="."))' +``` -Building the documentation --------------------------- +Now you're ready to build the documentation. -The documentation is built using the following command: +## Building the docs -```julia -julia --project=. --color=yes make.jl +Build the docs as follows: +``` +$ cd ~/.julia/dev/JuMP +$ julia --project=docs docs/make.jl ``` -The compiled documents can be viewed at `build/index.html`. +The compiled documents can be viewed at `~/.julia/dev/JuMP/docs/build/index.html`.