This guide explains how to build and run the DISCOVER-Cookbook site on your local machine.
You will need either Conda or pip (Python 3.x) installed.
-
Create the Conda environment
conda env create -f environment.yml
-
Activate the environment
conda activate DISCOVER-Cookbook
-
Build the book
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
-
Create a virtual environment (optional but recommended)
python -m venv .venv
-
Activate the virtual environment
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install dependencies
pip install -r requirements.txt
-
Build the book
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
After building, you can view the book in one of two ways:
python -m http.server 8000 --directory DISCOVER/_build/html/Then open http://localhost:8000 in your browser.
Navigate to:
DISCOVER/_build/html/index.html
and open it in your browser.
Note: Make sure you rebuild the book after making any changes before viewing.