Skip to content

Commit 59e1faf

Browse files
committed
updating local build instructions
1 parent 09f8580 commit 59e1faf

1 file changed

Lines changed: 26 additions & 16 deletions

File tree

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ Repository for the sources and published documentation set, versioned for each S
88
* The CmdStan Guide - guide to the reference command-line interface.
99

1010

11-
## Submodule `quarto-config`
12-
13-
Both the Stan website (repository: stan-dev.github.io) and the docs use the same quarto theming from
14-
the repository quarto-config. To build the docs locally, from the `src` subdirectory, clone this repo:
15-
16-
```sh
17-
cd src
18-
git clone https://github.com/stan-dev/quarto-config
19-
```
20-
2111
## Repository directory structure
2212

2313
* `src` : directory of source files for Stan and CmdStan guides and reference manuals, each in its own named subdirectory:
@@ -39,23 +29,43 @@ To build the pdf version of the docs, you will need to [install LaTeX](https://w
3929
Quarto accepts [`.qmd`](https://quarto.org/docs/authoring/markdown-basics.html) source files
4030
and uses the [Pandoc](https://pandoc.org) conversion engine.
4131

32+
Both the Stan website (repository: stan-dev.github.io) and the docs use the same quarto theming from
33+
the repository [quarto-config](https://github.com/stan-dev/quarto-config).
34+
4235
## Scripts to build and maintain the docset
4336

37+
### Check out submodule `quarto-config` into the `src` subdirectory
38+
39+
To build the docs locally, you must first clone the quarto-config repo into the `src` subdirectory.
40+
41+
```sh
42+
cd src
43+
git clone https://github.com/stan-dev/quarto-config
44+
```
45+
46+
4447
**`build.py`**
4548

46-
The program `build.py` convert the markdown files under `src` to html and pdf and populates the `docs` dir with the generated documentation.
49+
The program `build.py` convert the markdown files under `src` to html and pdf and populates the
50+
`docs` dir with the generated documentation.
51+
This script should be run from the top-level directory of this repository.
52+
53+
54+
4755
Requires Python 3.7 or higher, due to call to `subprocess.run`, kwarg `capture_output`.
4856
+ 2 required arguments: <Major> <minor> Stan version, expecting 2 positive integer arguments, e.g. `2 28`
4957
+ 2 optional arguments: <format> <document>. The output format is either `website` or `pdf`. The document name corresponds to the name of the `src` subdirectory or `all`.
5058

5159

5260
**Build script examples**
5361

54-
* `python build.py 2 35` - creates directory `docs/2_42` as needed; populates it will all generated documentation.
55-
* `python build.py 2 35 website` - builds the docs website in `docs/2_42`.
56-
* `python build.py 2 35 pdf functions-reference` - builds only the pdf version of the Stan functions reference, resulting document is `docs/2_35/functions-reference-2_35.pdf`
57-
* `python build.py 2 35 pdf all` - builds all pdfs from the Stan documentation set, resulting pdfs are in `docs/2_35`.
58-
62+
```sh
63+
pwd # check that you're in the top-level directory of this repository, path should end in "/stan-dev/docs"
64+
python build.py 2 35 # creates directory docs/2_35 as needed; populates it will all generated documentation
65+
python build.py 2 35 website # builds the docs website in docs/2_35
66+
python build.py 2 35 pdf functions-reference # builds only the pdf version of the Stan functions reference, resulting document is docs/2_35/functions-reference-2_35.pdf
67+
python build.py 2 35 pdf all # builds all pdfs from the Stan documentation set, resulting pdfs are in docs/2_35
68+
```
5969

6070
**Additional scripts**
6171

0 commit comments

Comments
 (0)