Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,23 @@ How to build the *xarray* documentation

Requirements
~~~~~~~~~~~~
Make sure to follow the instructions on :ref:`creating a development environment above <contributing.dev_env>`, but
to build the docs you need to use the environment file ``doc/environment.yml``.

First, you need to have a development environment to be able to build xarray
(see the docs on :ref:`creating a development environment above <contributing.dev_env>`).
.. code-block:: none

Building the documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~
# Create and activate the docs environment
conda env create -f doc/environment.yml
conda activate xarray-docs

In your development environment, install ``sphinx``, ``sphinx_rtd_theme``,
``sphinx-gallery`` and ``numpydoc``::
# or with older versions of Anaconda:
source activate xarray-docs

conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc
# Build and install xarray
pip install -e .

Building the documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~

Navigate to your local ``xarray/doc/`` directory in the console and run::

Expand Down