From 26ebab2ef68c94b1834ac9c61196ac3dba52caf3 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Wed, 7 Jun 2023 21:54:33 +0200 Subject: [PATCH 1/3] Add $READTHEDOCS_OUTPUT to environment variable reference --- docs/user/reference/environment-variables.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/user/reference/environment-variables.rst b/docs/user/reference/environment-variables.rst index 9fdfd684d6e..261fa704217 100644 --- a/docs/user/reference/environment-variables.rst +++ b/docs/user/reference/environment-variables.rst @@ -51,6 +51,19 @@ All :doc:`build processes ` have the following environment variables au :Example: ``/home/docs/checkouts/readthedocs.org/user_builds/project/envs/version`` +.. envvar:: READTHEDOCS_OUTPUT + + Base path for output formats when using custom :doc:`build.commands ` to generate output. + You need to concatenate an output format, + for instance ``$READTHEDOCS_OUTPUT/html/`` or ``$READTHEDOCS_OUTPUT/pdf/``. + You also need to create the directory, + for instance by adding a command ``mkdir -p $READTHEDOCS_OUTPUT/html/`` before moving outputs into the destination. + + .. 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. From 3a804606dc13b403ea7b57c6a787c7aa75953818 Mon Sep 17 00:00:00 2001 From: Benjamin Balder Bach Date: Fri, 9 Jun 2023 13:21:00 +0200 Subject: [PATCH 2/3] Update docs/user/reference/environment-variables.rst --- docs/user/reference/environment-variables.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/user/reference/environment-variables.rst b/docs/user/reference/environment-variables.rst index 261fa704217..61a6ab47a49 100644 --- a/docs/user/reference/environment-variables.rst +++ b/docs/user/reference/environment-variables.rst @@ -53,7 +53,8 @@ All :doc:`build processes ` have the following environment variables au .. envvar:: READTHEDOCS_OUTPUT - Base path for output formats when using custom :doc:`build.commands ` to generate 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, for instance ``$READTHEDOCS_OUTPUT/html/`` or ``$READTHEDOCS_OUTPUT/pdf/``. You also need to create the directory, From 0d8012001ab15ae474d733a28f5827c1cddd0065 Mon Sep 17 00:00:00 2001 From: Benjamin Balder Bach Date: Fri, 9 Jun 2023 13:23:25 +0200 Subject: [PATCH 3/3] Update docs/user/reference/environment-variables.rst Co-authored-by: Manuel Kaufmann --- docs/user/reference/environment-variables.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/user/reference/environment-variables.rst b/docs/user/reference/environment-variables.rst index 61a6ab47a49..e18ccbacf10 100644 --- a/docs/user/reference/environment-variables.rst +++ b/docs/user/reference/environment-variables.rst @@ -55,10 +55,13 @@ All :doc:`build processes ` have the following environment variables au 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, - for instance ``$READTHEDOCS_OUTPUT/html/`` or ``$READTHEDOCS_OUTPUT/pdf/``. - You also need to create the directory, - for instance by adding a command ``mkdir -p $READTHEDOCS_OUTPUT/html/`` before moving outputs into the destination. + 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::