Skip to content

Commit 52020e3

Browse files
authored
Give better instructions for building the docs (#2266)
1 parent 1d765fb commit 52020e3

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

docs/README.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
1-
JuMP.jl Documentation README
2-
================================
1+
# JuMP Documentation README
32

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.**
54

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
822
```
923

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+
```
1028

11-
Building the documentation
12-
--------------------------
29+
Now you're ready to build the documentation.
1330

14-
The documentation is built using the following command:
31+
## Building the docs
1532

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
1837
```
1938

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

Comments
 (0)