Docs: make it easy to copy/pasta examples
@@ -8,6 +8,10 @@ We recommend the filename ``.readthedocs.yml``.
All options are applied to the version containing this file.
Below is an example YAML file which shows the most common configuration options:
+.. tabs::
+
+ .. tab:: Sphinx
+
.. code:: yaml
# .readthedocs.yml
@@ -21,10 +25,6 @@ Below is an example YAML file which shows the most common configuration options:
sphinx:
configuration: docs/conf.py
- # Build documentation with MkDocs
- #mkdocs:
- # configuration: mkdocs.yml
-
# Optionally build your docs in additional formats such as PDF
formats:
- pdf
@@ -35,6 +35,29 @@ Below is an example YAML file which shows the most common configuration options:
install:
- requirements: docs/requirements.txt
+ .. tab:: MkDocs
+
+ .. code:: yaml
+
+ # .readthedocs.yml
+ # Read the Docs configuration file
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+ # Required
+ version: 2
+
+ mkdocs:
+ configuration: mkdocs.yml
+
+ # Optionally build your docs in additional formats such as PDF
+ formats:
+ - pdf
+
+ # Optionally set the version of Python and requirements required to build your docs
+ python:
+ version: 3.7
+ install:
+ - requirements: docs/requirements.txt
Supported settings
------------------
@@ -551,6 +574,22 @@ Patterns can include some special characters:
# Ignore all files that end with ref.html
- '*/ref.html'
+.. code-block:: yaml
+
+ version: 2
+
+ search:
+ ignore:
+ # Custom files to ignore
+ - file.html
+ - api/v1/*
+
+ # Defaults
+ - search.html
+ - search/index.html
+ - 404.html
+ - 404/index.html'
+
.. note::
Since Read the Docs fallbacks to the original search engine when no results are found,
