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
* Clean up Addons & Flyout menu docs
This cleans up the copy here,
adds the DocDiff page,
and clarifies as bit more the Custom event language.
* Update docs/user/flyout-menu.rst
Co-authored-by: Manuel Kaufmann <[email protected]>
---------
Co-authored-by: Manuel Kaufmann <[email protected]>
**Read the Docs Addons** is a group of features for documentation readers and maintainers that you can add to any documentation set hosted on Read the Docs:
4
+
**Read the Docs Addons** is a group of features for documentation readers and maintainers that you can add to any documentation set hosted on Read the Docs.
5
+
They are used in the rendered documentation,
6
+
and can be accessed via hotkeys or on screen UI elements.
5
7
6
8
:doc:`DocDiff </pull-requests>`
7
-
highlight changed output from pull requests
9
+
Highlight changed output from pull requests
8
10
9
11
:doc:`Pull request notification </pull-requests>`
10
-
notify readers that they are reading docs from a pull request
12
+
Notify readers that they are reading docs from a pull request
11
13
12
14
:doc:`Flyout </flyout-menu>`
13
-
easily switch between versions and translations
15
+
Easily switch between versions and translations
14
16
15
17
:doc:`Non-stable notification </versions>`
16
-
notify readers that they are reading docs from a non stable release
18
+
Notify readers that they are reading docs from a non stable release
17
19
18
20
:doc:`Latest version notification </versions>`
19
-
notify readers that they are reading docs from a development version
21
+
Notify readers that they are reading docs from a development version
20
22
21
23
:doc:`Search as you type </server-side-search/index>`
22
-
get search results faster
24
+
Get search results faster
23
25
24
-
Enabling Read the Docs Addons
25
-
-----------------------------
26
-
27
-
All projects using ``mkdocs`` :ref:`mkdocs <config-file/v2:mkdocs>` or the ``build.command`` :ref:`build command <config-file/v2:build.commands>` are already using the Addons, other projects can enable them by following these steps:
28
-
29
-
#. Go to the new dashboard:
30
-
31
-
* `Community <https://app.readthedocs.org>`_
32
-
* `Business <https://app.readthedocs.com>`_
33
-
34
-
#. Click on a project name.
35
-
#. Go to :guilabel:`Settings`, then in the left bar, go to :guilabel:`Addons`.
36
-
#. Check :guilabel:`Enable Addons`, and then configure each Addon individually.
26
+
:doc:`DocDiff </pull-requests>`
27
+
Highlight changed output from pull requests
37
28
38
-
.. note::
29
+
:doc:`Traffic analytics </traffic-analytics>`
30
+
See what pages your users are reading
39
31
40
-
Read the Docs Addons will be enabled by default for all Read the Docs projects on October 7th.
41
-
Read the full announcement in our `blog post <https://about.readthedocs.com/blog/2024/07/addons-by-default/>`_.
32
+
:doc:`Search analytics </search-analytics>`
33
+
Understand what your users are searching for
42
34
43
35
Configuring Read the Docs Addons
44
36
--------------------------------
@@ -51,5 +43,19 @@ Individual configuration options for each addon are available in :guilabel:`Sett
51
43
* `Business <https://app.readthedocs.com>`_
52
44
53
45
#. Click on a project name.
54
-
#. Go to :guilabel:`Settings`, then in the left bar, go to :guilabel:`Addons`.
46
+
#. Go to :guilabel:`Settings`
47
+
#. In the left bar, go to :guilabel:`Addons`.
55
48
#. Configure each Addon individually.
49
+
50
+
Addons data and customization
51
+
-----------------------------
52
+
53
+
If you'd like to do a custom integration with the data used to render Addons,
54
+
you can learn more about this in our :ref:`flyout-menu:custom event integration` docs.
55
+
56
+
Diving deeper
57
+
-------------
58
+
59
+
You can read more about all of the Addons functionality by diving into each Addon above.
60
+
If you are a developer and would like to integrate with our Addons or use our existing data,
61
+
you can :doc:`reach out </support>` to us and we would love to work with you.
DocDiff allows you to see a visual :term:`diff` on a documentation page,
5
+
showing what has changed between the ``latest`` version and the active :doc:`pull request </pull-requests>`.
6
+
7
+
DocDiff allows you to quickly review changes visually,
8
+
and focus your review on what has changed in the current page.
9
+
10
+
.. figure:: /img/addons-docdiff.gif
11
+
:width:80%
12
+
13
+
Example of DocDiff
14
+
15
+
Enabling DocDiff
16
+
----------------
17
+
18
+
DocDiff is only enabled on pull request builds,
19
+
and can be toggled on and off with the ``d`` hotkey.
20
+
21
+
Troubleshooting DocDiff
22
+
-----------------------
23
+
24
+
DocDiff only works if there are changes on the page,
25
+
so ensure you are on a page that has changed in the current pull request.
26
+
27
+
There are also some known issues that currently don't display properly:
28
+
29
+
* **Tables** are shown to have changes when they may not have changed. This is due to do subtly in how HTML tables are rendered, and will be fixed in a future version.
Copy file name to clipboardExpand all lines: docs/user/flyout-menu.rst
+38-29Lines changed: 38 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,27 @@
3
3
Flyout menu
4
4
===========
5
5
6
-
When you are using a Read the Docs site,
7
-
you will likely notice that we embed a menu on all the documentation pages we serve.
8
-
This is a way to expose the functionality of Read the Docs on the page,
6
+
When you use a Read the Docs site,
7
+
there is a flyout menu embedded on all the documentation pages.
8
+
The flyout menu is a way to expose the functionality of Read the Docs on the page,
9
9
without having to have the documentation theme integrate it directly.
10
10
11
-
There are two versions of the flyout menu:
12
-
13
-
- :ref:`flyout-menu:Addons flyout menu`
14
-
- :ref:`flyout-menu:Original flyout menu`
11
+
.. tip::
12
+
The flyout menu is a default implementation that works for every site.
13
+
You can access the full data used to construct the flyout,
14
+
and use that to integrate the data directly into your documentation theme for a nicer user experience.
15
+
See the :ref:`Custom event integration` for more information.
15
16
16
17
Addons flyout menu
17
18
------------------
18
19
19
-
The updated :doc:`addons` flyout menu lists available documentation versions and translations, as well as useful links,
20
-
offline formats, and a search bar.
20
+
The :doc:`addons` flyout provides a place for a number of Read the Docs features:
21
+
22
+
* A :doc:`version switcher </versions>` that shows users all of the active versions they have access to.
23
+
* A :doc:`translation switcher </internationalization>` that shows all the documentation languages provided.
24
+
* A list of :doc:`offline formats </downloadable-documentation>` for the current version, including HTML & PDF downloads.
25
+
* Links to the Read the Docs dashboard for the project.
26
+
* A search bar that gives users access to the :doc:`/server-side-search/index` of the current version.
21
27
22
28
.. figure:: /_static/images/flyout-addons.png
23
29
:align:center
@@ -27,31 +33,34 @@ offline formats, and a search bar.
27
33
Customizing the flyout menu
28
34
~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
35
30
-
In your dashboard, you can configure flyout menu options in :guilabel:`Settings`, under :guilabel:`Addons`.
36
+
In your dashboard, you can configure flyout menu options in :guilabel:`Settings > Addons > Flyout Menu`.
31
37
32
-
Sort your versions :guilabel:`Alphabetically`, by :guilabel:`SemVer`, by :guilabel:`Python Packaging`,
33
-
by :guilabel:`CalVer`, or define your own pattern.
38
+
Version sorting
39
+
^^^^^^^^^^^^^^^
34
40
35
-
Choose whether to list stable versions first or not.
41
+
The primary customization currently is the ability to sort versions.
42
+
You can sort by:
36
43
37
-
Customizing the look of the addons flyout menu
38
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
+
.. TODO: Define how these work better..
39
45
40
-
The addons flyout exposes all the required data to build the flyout menu via a JavaScript ``CustomEvent``.
41
-
Take a look at an example of this approach at https://github.com/readthedocs/sphinx_rtd_theme/pull/1526.
46
+
* :guilabel:`SemVer (Read the Docs)` - **Default**. Read the Docs custom implementation of semver.org.
47
+
* :guilabel:`Python Packaging` - Sort by Python packaging sorting.
48
+
* :guilabel:`CalVer` - Sort by calendar date.
49
+
* :guilabel:`Alphabetically` - Only useful if you aren't using numeric versions.
50
+
* Or you can define a custom pattern
42
51
43
-
Original flyout menu
44
-
--------------------
52
+
You can also choose whether ``latest`` and ``stable`` should be sorted first,
53
+
as those are special versions that Read the Docs uses.
45
54
46
-
The flyout menu provides access to the following bits of Read the Docs functionality:
55
+
Custom event integration
56
+
------------------------
47
57
48
-
* A :doc:`version switcher </versions>` that shows users all of the active, unhidden versions they have access to.
49
-
* :doc:`Offline formats </downloadable-documentation>` for the current version, including HTML & PDF downloads that are enabled by the project.
50
-
* Links to the Read the Docs dashboard for the project.
51
-
* Links to your :doc:`Git provider </reference/git-integration>` that allow the user to quickly find the exact file that the documentation was rendered from.
52
-
* A search bar that gives users access to our :doc:`/server-side-search/index` of the current version.
53
-
54
-
.. figure:: /_static/images/flyout-open.png
55
-
:align:center
58
+
Read the Docs Addons exposes all the data used to construct the flyout menu via a JavaScript ``CustomEvent``.
59
+
If you'd like to integrate the data,
60
+
you can use the :ref:`mkdocs:Integrate the Read the Docs version menu into your site navigation` example as a starting point.
56
61
57
-
The opened flyout
62
+
.. warning::
63
+
We have not formally documented the API response returned from the Addons API,
64
+
but you can view the JSON data returned there as a starting point.
65
+
Once we document it,
66
+
we will commit to supporting that version of the API response going forward.
Copy file name to clipboardExpand all lines: docs/user/pull-requests.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Pull request notifications
28
28
A pull request notifications is shown at the top of preview pages,
29
29
which let readers know they aren't viewing an active version of the project.
30
30
31
-
DocDiff
31
+
:doc:`DocDiff</doc-diff>``
32
32
DocDiff shows proposed changes by visually highlighting the differences between the current pull request and the latest version of the project's documentation.
33
33
34
34
Press ``d`` to toggle between DocDiff and normal pull request preview.
0 commit comments