Skip to content

Commit 6baaac3

Browse files
committed
Add contributing section to README
1 parent 2db7bb0 commit 6baaac3

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

README.md

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,66 @@
1-
# Documentation and Tutorials for Turing.jl
1+
# Turing.jl Documentation and Tutorials
22

3-
This repository hosts the code for the main Turing.jl documentation `https://turinglang.org/docs/`.
4-
It contains the Turing.jl documentation and tutorials.
3+
**https://turinglang.org/docs/**
54

6-
- The `main` branch contains the Quarto source.
7-
- The `gh-pages` branch contains the `html` version of these documents compiled from the `main` branch.
5+
## Contributing
86

9-
## Local development
7+
The easiest way to contribute to the documentation is to simply open a pull request.
8+
A preview version of the documentation is built for PRs, so you can see how your changes look without having to build the entire site locally.
9+
(Note that if you are editing a tutorial that takes a long time to run, this feedback may take a while.)
10+
11+
The `main` branch contains the Quarto source code.
12+
The HTML documentation is automatically built using GitHub Actions, and deployed to the `gh-pages` branch, so you do not have to build and commit the HTML files yourself.
1013

11-
To get started with the docs website locally, you'll need to have [Quarto](https://quarto.org/docs/download/) installed.
12-
Make sure you have at least version 1.6.31 of Quarto installed, as this version contains a fix for [a bug where random number generation in different cells was not deterministic](https://github.com/TuringLang/docs/issues/533).
14+
## Local development
1315

14-
Once you have Quarto installed, you can follow these steps:
16+
If you wish to render the docs website locally, you'll need to have [Quarto](https://quarto.org/docs/download/) installed (at least version 1.6.31) on your computer.
17+
Then:
1518

1619
1. Clone this repository:
1720

18-
```bash
19-
git clone https://github.com/TuringLang/docs
20-
```
21+
```bash
22+
git clone https://github.com/TuringLang/docs
23+
```
2124

2225
2. Navigate into the cloned directory:
2326

24-
```bash
25-
cd docs
26-
```
27+
```bash
28+
cd docs
29+
```
2730

2831
3. Instantiate the project environment:
2932

30-
```bash
31-
julia --project=. -e 'using Pkg; Pkg.instantiate()'
32-
```
33+
```bash
34+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
35+
```
3336

3437
4. Preview the website using Quarto.
3538

36-
> [!WARNING]
37-
> This will take a _very_ long time, as it will build every tutorial from scratch. See below for ways to speed this up.
39+
> [!WARNING]
40+
>
41+
> This will take a _very_ long time, as it will build every tutorial from scratch. See [below](#faster-rendering) for ways to speed this up.
3842
39-
```bash
40-
quarto preview
41-
```
43+
```bash
44+
quarto preview
45+
```
4246

43-
This will launch a local server at http://localhost:4200/, which you can view in your web browser by navigating to the link shown in your terminal.
44-
Note: Avoid clicking links in the navbar while previewing locally because they will eventually lead to https links online!
47+
This will launch a local server at http://localhost:4200/, which you can view in your web browser by navigating to the link shown in your terminal.
4548

4649
5. Render the website locally:
4750

48-
```bash
49-
quarto render
50-
```
51+
```bash
52+
quarto render
53+
```
5154

52-
This will build the entire documentation and place the output in the `_site` folder.
53-
You can then view the rendered website by launching a HTTP server from that directory, e.g. using Python:
55+
This will build the entire documentation and place the output in the `_site` folder.
56+
You can then view the rendered website by launching a HTTP server from that directory, e.g. using Python:
5457

55-
```bash
56-
cd _site
57-
python -m http.server 8000
58-
```
58+
```bash
59+
cd _site
60+
python -m http.server 8000
61+
```
5962

60-
Then, navigate to http://localhost:8000/ in your web browser.
63+
Then, navigate to http://localhost:8000/ in your web browser.
6164

6265
## Faster rendering
6366

0 commit comments

Comments
 (0)