Skip to content

Commit d041905

Browse files
authored
Merge pull request #5485 from rtfd/davidfischer/simpler-config-promotion
Promote the YAML config
2 parents c6daefe + 2c65e1e commit d041905

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

docs/config-file/v2.rst

+30-15
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,40 @@ Configuration File V2
44
Read the Docs supports configuring your documentation builds with a YAML file.
55
:doc:`The Read the Docs file <index>` must be in the root directory of your project.
66

7-
Here is an example of how this file looks like:
7+
Below is an example YAML file which may require some changes for your project's configuration:
88

99
.. code:: yaml
1010
11-
# .readthedocs.yml
11+
# .readthedocs.yml
12+
# Read the Docs configuration file
13+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
1214
13-
version: 2
15+
# Required
16+
version: 2
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
configuration: docs/conf.py
21+
22+
# Build documentation with MkDocs
23+
#mkdocs:
24+
# configuration: mkdocs.yml
25+
26+
# Optionally build your docs in additional formats such as PDF and ePub
27+
formats: all
28+
29+
# Optionally set the version of Python and requirements required to build your docs
30+
python:
31+
version: 3.7
32+
install:
33+
- requirements: docs/requirements.txt
1434
15-
python:
16-
version: 3.7
17-
install:
18-
- method: pip
19-
path: .
2035
2136
Supported settings
2237
------------------
2338

2439
.. note::
25-
40+
2641
The presence of any other key that isn't documented here will make the build to fail.
2742
This is to avoid typos and provide feedback on invalid configurations.
2843

@@ -34,11 +49,11 @@ version
3449
Example:
3550

3651
.. code-block:: yaml
37-
52+
3853
version: 2
3954
4055
.. warning::
41-
56+
4257
If you don't provide the version, :doc:`v1 <v1>` will be used.
4358

4459
formats
@@ -329,13 +344,13 @@ VCS submodules configuration.
329344
Only Git is supported at the moment.
330345

331346
.. note::
332-
347+
333348
You can't use ``include`` and ``exclude`` settings for submodules at the same time.
334349

335350
Example:
336351

337352
.. code-block:: yaml
338-
353+
339354
submodules:
340355
include:
341356
- one
@@ -351,7 +366,7 @@ List of submodules to be included.
351366
:Default: ``[]``
352367

353368
.. note::
354-
369+
355370
You can use the ``all`` keyword to include all submodules.
356371

357372
.. code-block:: yaml
@@ -368,7 +383,7 @@ List of submodules to be excluded.
368383
:Default: ``[]``
369384

370385
.. note::
371-
386+
372387
You can use the ``all`` keyword to exclude all submodules.
373388
This is the same as ``include: []``.
374389

readthedocs/templates/projects/import_basics.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ <h3>{% trans "Project Details" %}</h3>
66

77
<p class="info">
88
{% blocktrans trimmed %}
9-
To import a project,
10-
start by entering a few details about your repository.
11-
More advanced project options can be configured
12-
if you select <b>Edit advanced project options</b>.
9+
To import a project, start by entering a few details about your repository.
10+
You can set additional configuration options for your documentation in a
11+
<a href="https://docs.readthedocs.io/en/stable/config-file/v2.html">.readthedocs.yml</a> file.
1312
{% endblocktrans %}
1413
</p>
1514

0 commit comments

Comments
 (0)