Skip to content

Docs: Add $READTHEDOCS_OUTPUT to environment variable reference #10407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2023
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
17 changes: 17 additions & 0 deletions docs/user/reference/environment-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ All :doc:`build processes </builds>` have the following environment variables au

:Example: ``/home/docs/checkouts/readthedocs.org/user_builds/project/envs/version``

.. envvar:: READTHEDOCS_OUTPUT

Base path for well-known output directories. Files in these directories will automatically be found, uploaded and published.

You need to concatenate an output format to this variable.
Currently valid formats are ``html``, ``pdf``, ``htmlzip`` and ``epub``.
(e.g. ``$READTHEDOCS_OUTPUT/html/`` or ``$READTHEDOCS_OUTPUT/pdf/``)
You also need to create the directory before moving outputs into the destination.
You can create it with the following command ``mkdir -p $READTHEDOCS_OUTPUT/html/``.
Note that only ``html`` supports multiple files,
the other formats should have one and only one file to be uploaded.

.. seealso::

:ref:`build-customization:where to put files`
Information about using custom commands to generate output that will automatically be published once your build succeeds.

.. envvar:: READTHEDOCS_CANONICAL_URL

Canonical base URL for the version that is built.
Expand Down