You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/configuration/multiversion.rst
+35-8Lines changed: 35 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Multiversion Options
4
4
5
5
The toolchain adds by default the extension `sphinx-multiversion <https://github.com/dgarcia360/sphinx-multiversion>`_ for building self-hosted versioned documentation.
6
6
7
-
On this page, you’ll learn:
7
+
On this page, you will learn:
8
8
9
9
- How to list new versions.
10
10
- How to define a stable url.
@@ -23,19 +23,16 @@ The settings ``TAGS`` and ``BRANCHES`` in ``conf.py`` defines which versions are
23
23
24
24
.. tip:: If you maintain a branch for each minor release (e.g. ``branch-3.22``), we recommended building docs for the **branch** and not for tags. This will allow you to backport documentation changes if needed without having to update the tag reference.
25
25
26
-
The setting ``smv_latest_version`` in ``conf.py`` defines which branch or tag is considered the latest.
26
+
The setting ``LATEST_VERSION`` in ``conf.py`` defines which branch or tag is considered the latest.
27
27
This is used to redirect users to the latest version of the docs automatically once they open the main project URL.
28
28
29
-
For example, if you want to build docs for the tags ``3.22.0`` and ``3.21.0``, ``master`` branch, the configuration file conf.py should look like this:
29
+
For example, if you want to build docs for the tags ``3.22.0`` and ``3.21.0``, ``master`` branch, the configuration file ``conf.py`` should look like this:
The extension allows configuring additional settings.
41
38
To know more about them, refer to `sphinx-multiversion documentation <https://holzhaus.github.io/sphinx-multiversion/master/configuration.html>`_.
@@ -50,9 +47,39 @@ You can override the latest version output directory via the configuration file
50
47
51
48
.. code:: python
52
49
53
-
smv_latest_version ='x.y.z'# Use the branch/tag name
50
+
smv_latest_version =LATEST_VERSION# Use the branch/tag name
54
51
smv_rename_latest_version ='stable'# Use the commit hash
55
52
53
+
Defining unstable versions
54
+
--------------------------
55
+
56
+
Suppose you want to build docs for a version of the software you have not released yet (e.g. ``master``).
57
+
In this case, you can mark the version as unstable in the ``conf.py`` file.
58
+
59
+
.. code:: python
60
+
61
+
BRANCHES= ['master']
62
+
UNSTABLE_VERSIONS= ['master']
63
+
64
+
By doing so, the warning message that appears at the top of the page will change to:
65
+
66
+
.. image:: images/unstable.png
67
+
68
+
Defining deprecated versions
69
+
----------------------------
70
+
71
+
Suppose you want to build docs for a version of the software you don't support anymore.
72
+
In this case, you can mark the version as deprecated in the ``conf.py`` file.
73
+
74
+
.. code:: python
75
+
76
+
TAGS= ['3.2.0']
77
+
DEPRECATED_VERSIONS= ['3.2.0']
78
+
79
+
By doing so, the warning message that appears at the top of the page will change to:
Copy file name to clipboardExpand all lines: docs/source/examples/hero-box.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The ``hero-box`` directive supports the following options:
31
31
- Description
32
32
* - ``title``
33
33
- string
34
-
- Y
34
+
- |v|
35
35
- Lorem ipsum
36
36
- Hero box title.
37
37
* - ``button_icon``
@@ -46,9 +46,9 @@ The ``hero-box`` directive supports the following options:
46
46
- Text for the call to action.
47
47
* - ``button_url``
48
48
- string
49
+
-
50
+
-
49
51
- Relative link or external URL for the call to action. Do not use leading and trailing ("/") symbols to define relative links. (e.g. instead of ``/getting-started/``, use ``getting-started``).
Copy file name to clipboardExpand all lines: docs/source/examples/toc.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ The :abbr:`TOC (Table of Contents)` is automatically generated in sphinx when yo
10
10
11
11
Each index.rst needs to have a toctree directive in order to build the left side nav menu.
12
12
13
-
See the template for more details.
14
-
15
13
.. code-block:: rst
16
14
17
15
.. toctree::
18
16
:maxdepth: 2
19
17
18
+
For more details, see `toctree documentation <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree>`_.
0 commit comments