Skip to content

Commit 64d2720

Browse files
jbuseckeshoyer
authored andcommitted
Bugfix for docs build instructions (#2897)
1 parent fad6d62 commit 64d2720

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

doc/contributing.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,23 @@ How to build the *xarray* documentation
285285

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

289-
First, you need to have a development environment to be able to build xarray
290-
(see the docs on :ref:`creating a development environment above <contributing.dev_env>`).
291+
.. code-block:: none
291292
292-
Building the documentation
293-
~~~~~~~~~~~~~~~~~~~~~~~~~~
293+
# Create and activate the docs environment
294+
conda env create -f doc/environment.yml
295+
conda activate xarray-docs
294296
295-
In your development environment, install ``sphinx``, ``sphinx_rtd_theme``,
296-
``sphinx-gallery`` and ``numpydoc``::
297+
# or with older versions of Anaconda:
298+
source activate xarray-docs
297299
298-
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc
300+
# Build and install xarray
301+
pip install -e .
302+
303+
Building the documentation
304+
~~~~~~~~~~~~~~~~~~~~~~~~~~
299305

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

0 commit comments

Comments
 (0)