|
1 | | -JuMP.jl Documentation README |
2 | | -================================ |
| 1 | +# JuMP Documentation README |
3 | 2 |
|
4 | | -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: |
| 3 | +**The documentation currently requires Julia 1.0.x to build.** |
5 | 4 |
|
6 | | -```julia |
7 | | -Pkg.add("Documenter") |
| 5 | +JuMP's documentation is written with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl). |
| 6 | + |
| 7 | +## Initial setup |
| 8 | + |
| 9 | +To build the documentation, you need to do a series of initialization steps. |
| 10 | +However, you only need to do this once! |
| 11 | + |
| 12 | +First, you will need a local copy of JuMP. If you don't have one already, run: |
| 13 | +``` |
| 14 | +$ julia -e 'import Pkg; Pkg.develop("JuMP")' |
| 15 | +``` |
| 16 | + |
| 17 | +This will create a copy of JuMP at `~/.julia/dev/JuMP`. (On Windows, this will |
| 18 | +be located at `C:\\Users\\<your_user_name>\\.julia\\dev\\JuMP`.) Open a terminal, |
| 19 | +and `cd` to that directory: |
| 20 | +``` |
| 21 | +$ cd ~/.julia/dev/JuMP |
8 | 22 | ``` |
9 | 23 |
|
| 24 | +The next step is to setup the `docs` environment. |
| 25 | +``` |
| 26 | +$ julia --project=docs -e 'import Pkg; Pkg.instantiate(); Pkg.develop(Pkg.PackageSpec(path="."))' |
| 27 | +``` |
10 | 28 |
|
11 | | -Building the documentation |
12 | | --------------------------- |
| 29 | +Now you're ready to build the documentation. |
13 | 30 |
|
14 | | -The documentation is built using the following command: |
| 31 | +## Building the docs |
15 | 32 |
|
16 | | -```julia |
17 | | -julia --project=. --color=yes make.jl |
| 33 | +Build the docs as follows: |
| 34 | +``` |
| 35 | +$ cd ~/.julia/dev/JuMP |
| 36 | +$ julia --project=docs docs/make.jl |
18 | 37 | ``` |
19 | 38 |
|
20 | | -The compiled documents can be viewed at `build/index.html`. |
| 39 | +The compiled documents can be viewed at `~/.julia/dev/JuMP/docs/build/index.html`. |
0 commit comments