Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 1.47 KB

File metadata and controls

79 lines (56 loc) · 1.47 KB

Setting Up DISCOVER-Cookbook Locally

This guide explains how to build and run the DISCOVER-Cookbook site on your local machine.

Prerequisites

You will need either Conda or pip (Python 3.x) installed.


Option 1: Using Conda

  1. Create the Conda environment

    conda env create -f environment.yml
  2. Activate the environment

    conda activate DISCOVER-Cookbook
  3. Build the book

    sphinx-build -b html DISCOVER/ DISCOVER/_build/html

Option 2: Using pip

  1. Create a virtual environment (optional but recommended)

    python -m venv .venv
  2. Activate the virtual environment

    • On Windows:
      .venv\Scripts\activate
    • On macOS/Linux:
      source .venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Build the book

    sphinx-build -b html DISCOVER/ DISCOVER/_build/html

Viewing the Site Locally

After building, you can view the book in one of two ways:

Option A: Using a local server (recommended)

python -m http.server 8000 --directory DISCOVER/_build/html/

Then open http://localhost:8000 in your browser.

Option B: Opening the file directly

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.