You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,40 +12,41 @@ The portal site is built with [Sphinx](https://www.sphinx-doc.org/).
12
12
13
13
When testing new content is important to build and view the site. Read the Docs automatically builds the site for you when each Pull Request is checked. You can also build it locally on your machine.
14
14
15
-
16
15
### Building the site
17
16
18
17
- After checking out a local copy of the site, in your favorite terminal, navigate to the `content` directory of the source repository
19
18
```bash
20
19
cd projectpythia.github.io/content
21
20
```
22
21
- Use [conda](https://docs.conda.io/) to set up a build environment:
23
-
```bash
22
+
```bash
24
23
conda env create -f ../ci/environment.yml
25
24
conda activate pythia
26
25
```
27
26
- Build the site locally using Sphinx (which you just installed in the `pythia` environment, along with all necessary dependencies):
28
-
```bash
27
+
```bash
29
28
make html
30
29
```
31
30
- The newly rendered site is now available in `content/_build/html/index.html`.
32
-
Open with your web browser, or from the terminal:
33
-
```bash
31
+
Open with your web browser, or from the terminal:
32
+
```bash
34
33
open _build/html/index.html
35
34
```
36
35
- However, many of the links will not work. For all of the links
37
-
found in the portal to work properly, you'll need to set up a local
38
-
testing server. This can be done with Python's http.server by running
39
-
the following command from within the content directory:
36
+
found in the portal to work properly, you'll need to set up a local
37
+
testing server. This can be done with Python's http.server by running
38
+
the following command from within the content directory:
39
+
40
40
```
41
41
python -m http.server --directory _build/html/
42
42
```
43
+
43
44
- and then pointing your browser at the URL: localhost:8000.
44
45
45
46
- More information on setting up a local test server is available from [here](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server)
46
47
47
48
- When you're done, you can deactivate the dedicated build environment with
48
-
```bash
49
+
```bash
49
50
conda deactivate
50
51
```
51
52
- You can re-activate the `pythia` conda environment at any time with `conda activate pythia`.
Finally, create a new branch in your local repository:
275
272
276
273
```
277
-
$ git checkout -b YOUR_BRANCH_NAME
274
+
$ git checkout -b YOUR_BRANCH_NAME
278
275
```
279
276
280
277
Where `YOUR_BRANCH_NAME` is the name that you want to give your local
281
278
branch. What name should you choose? If the work that you are doing
282
279
is associated with a GitHub issue you should follow the convention:
283
280
284
-
*issue_XXX*
281
+
_issue_XXX_
285
282
286
-
Where *XXX* is the GitHub issue number. If it is not associated with a Pythia GitHub issue, pick something short and meaningful, e.g. “documentation_cleanup”.
283
+
Where _XXX_ is the GitHub issue number. If it is not associated with a Pythia GitHub issue, pick something short and meaningful, e.g. “documentation_cleanup”.
287
284
288
285
You can now make changes to your local copy of the Pythia repo
289
286
without having those changes affect either the remote Pythia GitHub
@@ -301,7 +298,6 @@ any of the contents. Once you are ready to contribute your changes
301
298
back to the Pythia repository you will need to submit a Pull Request
302
299
(PR), described later.
303
300
304
-
305
301
### Make your local changes
306
302
307
303
At this point you should be able to make your desired changes to
0 commit comments