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/user/versions.rst
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,39 @@ all of the artifacts of your version will be deleted and a ``404 Not Found`` pag
88
88
89
89
You can change the state for each version of your documentation in the :guilabel:`Versions` tab of your project.
90
90
91
+
Version URL identifier (slug)
92
+
-----------------------------
93
+
94
+
Each version of your project has a unique URL identifier (slug).
95
+
This identifier is used to reference the version in your documentation, :term:`dashboard`, and :doc:`API </api/index>`.
96
+
97
+
A version slug is automatically generated from the name of the branch or tag in your repository,
98
+
some special characters like spaces and ``/`` are replaced with a dash (``-``), and the name is lowercased.
99
+
If the resulting slug collides with another one, a suffix is added (``_a``, ``_b``, etc.).
100
+
101
+
You can change the slug of a version in :ref:`the versions tab of your project <versions:Managing your versions>`,
102
+
but you should take the following into account:
103
+
104
+
- Changing the slug of an active version will result on its previous documentation being deleted, and a new build being triggered.
105
+
Be careful when renaming active versions, specially old ones that might not build anymore.
106
+
- Any URL referencing your version with the old slug will return a ``404 Not Found`` page.
107
+
You can use :ref:`an exact redirect <user-defined-redirects:Redirecting an old version to a new one>` to redirect users to the new URL,
108
+
- You may still see the original name of the version in some places,
109
+
as changing the slug only affects the URL used in your documentation and how the APIs identify that version.
110
+
`We are considering adding another field to be used for display in the future <https://github.com/readthedocs/readthedocs.org/issues/11979>`__.
111
+
- Sorting of versions in the version selector is done based on the slug,
112
+
changing the slug of a version may change the order in which they are shown to your users.
113
+
`We are considering adding another field to be used for sorting in the future <https://github.com/readthedocs/readthedocs.org/issues/11979>`__.
114
+
- You can't change the slug of versions that are managed by Read the Docs, like ``latest`` and ``stable``.
115
+
- Slugs must be unique for each version of your project.
116
+
- The slug can contain lowercase letters, numbers, dashes (``-``), underscores (``_``) and dots (``.``).
117
+
If you try to use a slug that contains any other character, you'll get an error message with a suggestion of a valid slug.
118
+
119
+
.. warning::
120
+
121
+
Changing the slug of an active version will result on its previous documentation being deleted, and a new build being triggered.
122
+
Be careful when renaming active versions, specially old ones that might not build anymore.
0 commit comments