Skip to content

Commit

Permalink
re-apply changes about sphinx and docker IQSS#10531
Browse files Browse the repository at this point in the history
These changes were in 853965e as part of PR IQSS#10565 but were lost during
resolution of a merge conflict.
  • Loading branch information
pdurbin committed Jul 1, 2024
1 parent b2c451a commit 9bd0ccf
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions doc/sphinx-guides/source/contributor/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To edit the existing documentation:

Once you are done, you can preview the changes by building the guides locally. As explained, you can build the guides with Sphinx locally installed, or with a Docker container.

#### Building the Guides with Sphinx Locally Installed
#### Building the Guides with Sphinx Installed Locally

Open a terminal, change directories to `doc/sphinx-guides`, activate (or reactivate) your Python virtual environment, and build the guides.

Expand All @@ -99,11 +99,20 @@ Open a terminal, change directories to `doc/sphinx-guides`, activate (or reactiv

`make html`

#### Building the Guides with a Sphinx Docker Container
#### Building the Guides with a Sphinx Docker Container and a Makefile

We have added a Makefile to simplify the process of building the guides using a Docker container, you can use the following commands from the repository root:

- `make docs-html`
- `make docs-pdf`
- `make docs-epub`
- `make docs-all`

#### Building the Guides with a Sphinx Docker Container and CLI

If you want to build the guides using a Docker container, execute the following command in the repository root:

`docker run -it --rm -v $(pwd):/docs sphinxdoc/sphinx:3.5.4 bash -c "cd doc/sphinx-guides && pip3 install -r requirements.txt && make html"`
`docker run -it --rm -v $(pwd):/docs sphinxdoc/sphinx:7.2.6 bash -c "cd doc/sphinx-guides && pip3 install -r requirements.txt && make html"`

#### Previewing the Guides

Expand Down Expand Up @@ -157,7 +166,7 @@ The HTML version of the guides is the official one. Any other formats are mainta

If you would like to build a PDF version of the guides and have Docker installed, please try the command below from the root of the git repo:

`docker run -it --rm -v $(pwd):/docs sphinxdoc/sphinx-latexpdf:3.5.4 bash -c "cd doc/sphinx-guides && pip3 install -r requirements.txt && make latexpdf LATEXMKOPTS=\"-interaction=nonstopmode\"; cd ../.. && ls -1 doc/sphinx-guides/build/latex/Dataverse.pdf"`
`docker run -it --rm -v $(pwd):/docs sphinxdoc/sphinx-latexpdf:7.2.6 bash -c "cd doc/sphinx-guides && pip3 install -r requirements.txt && make latexpdf LATEXMKOPTS=\"-interaction=nonstopmode\"; cd ../.. && ls -1 doc/sphinx-guides/build/latex/Dataverse.pdf"`

A few notes about the command above:

Expand Down

0 comments on commit 9bd0ccf

Please sign in to comment.