@@ -16,22 +16,16 @@ Deprecating versions
16
16
17
17
If you have multiple versions of your project,
18
18
it makes sense to have its :doc: `documentation versioned </versions >` as well.
19
- For example, if you have the following versions and want to deprecate V1 .
19
+ For example, if you have the following versions and want to deprecate v1 .
20
20
21
- - project.readthedocs.io/en/v1/
22
- - project.readthedocs.io/en/v2/
23
- - project.readthedocs.io/en/v3/
21
+ - `` https:// project.readthedocs.io/en/v1/``
22
+ - `` https:// project.readthedocs.io/en/v2/``
23
+ - `` https:// project.readthedocs.io/en/v3/``
24
24
25
25
For cases like this you can *hide * a version.
26
26
Hidden versions won't be listed in the versions menu of your docs,
27
27
and they will be listed in a :ref: `robots.txt file <hosting:custom robots.txt pages >`
28
- to stop search engines of showing results for that version::
29
-
30
- # project.readthedocs.io/robots.txt
31
-
32
- User-agent: *
33
-
34
- Disallow: /en/v1/ # Hidden version
28
+ to stop search engines of showing results for that version.
35
29
36
30
Users can still see all versions in the dashboard of your project.
37
31
To hide a version go to your project and click on :guilabel: `Versions ` > :guilabel: `Edit `,
@@ -50,10 +44,10 @@ Deprecating content
50
44
-------------------
51
45
52
46
You may not always want to deprecate a version, but deprecate some pages.
53
- For example, if you have documentation about two APIs and you want to deprecate V1 :
47
+ For example, if you have documentation about two APIs and you want to deprecate v1 :
54
48
55
- - project.readthedocs.io/en/latest/api/v1.html
56
- - project.readthedocs.io/en/latest/api/v2.html
49
+ - `` https:// project.readthedocs.io/en/latest/api/v1.html``
50
+ - `` https:// project.readthedocs.io/en/latest/api/v2.html``
57
51
58
52
A simple way is just adding a warning at the top of the page,
59
53
this will warn users visiting that page,
@@ -84,6 +78,13 @@ This wont hide results from that page, but it will give priority to results from
84
78
85
79
.. TODO: mention search.ignore when it's implemented.
86
80
81
+
82
+ .. tip ::
83
+
84
+ If you are using Sphinx with reStructuredText,
85
+ you can make use of some :doc: `directives <sphinx:usage/restructuredtext/directives >`
86
+ like ``warning ``, ``deprecated ``, ``versionchanged `` to warn your users about deprecated content.
87
+
87
88
Moving and deleting pages
88
89
-------------------------
89
90
@@ -94,6 +95,6 @@ But be aware that users may have links of that page saved,
94
95
and it will be frustrating and confusing for them to get a 404.
95
96
96
97
To solve that problem you can create a redirect to a page with a similar feature/content,
97
- like redirecting to the docs of the V2 of your API when your users visit the deleted docs from V1 ,
98
+ like redirecting to the docs of the v2 of your API when your users visit the deleted docs from v1 ,
98
99
this is a :ref: `page redirect <user-defined-redirects:page redirects >` from ``/api/v1.html `` to ``/api/v2.html ``.
99
100
See :doc: `/user-defined-redirects `.
0 commit comments