Skip to content

Commit b7bf5d9

Browse files
Docs: improve "Badges" page (#9580)
* Docs: improve "Badges" page Clean it up a little and re-order the content. * A few updates to language * Cap colors * A few more clarity updates Co-authored-by: Eric Holscher <[email protected]>
1 parent 19791c7 commit b7bf5d9

File tree

1 file changed

+32
-33
lines changed

1 file changed

+32
-33
lines changed

docs/user/badges.rst

+32-33
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
Badges
2-
======
1+
Status Badges
2+
=============
33

4-
Badges let you show the state of your documentation to your users.
4+
Status badges let you show the state of your documentation to your users.
5+
They will show if the latest build has passed, failed, or is in an unknown state.
56
They are great for embedding in your README,
67
or putting inside your actual doc pages.
78

8-
Status Badges
9-
-------------
9+
You can see a badge in action in the `Read the Docs README`_.
1010

11-
They will display in green for passing,
12-
red for failing,
13-
and yellow for unknown states.
11+
Display states
12+
--------------
1413

15-
Here are a few examples:
14+
Badges have the following states which can be shown to users:
1615

17-
|green| |nbsp| |red| |nbsp| |yellow|
16+
* **Green**: ``passing`` - the last build was successful.
17+
* **Red**: ``failing`` - the last build failed.
18+
* **Yellow**: ``unknown`` - we couldn't figure out the status of your last build.
1819

19-
You can see it in action in the `Read the Docs README`_.
20-
They will link back to your project's documentation page on Read the Docs.
20+
An example of each is shown here:
21+
22+
|green| |nbsp| |red| |nbsp| |yellow|
2123

2224
Style
2325
-----
2426

25-
Now you can pass the ``style`` GET argument,
26-
to get custom styled badges same as you would for shields.io.
27-
If no argument is passed, ``flat`` is used as default.
27+
You can pass the ``style`` GET argument to get custom styled badges.
28+
This allows you to match the look and feel of your website.
29+
By default, the ``flat`` style is used.
2830

2931
+---------------+---------------------+
30-
| STYLE | BADGE |
32+
| Style | Badge |
3133
+===============+=====================+
32-
| flat | |Flat Badge| |
34+
| flat - default| |Flat Badge| |
3335
+---------------+---------------------+
3436
| flat-square | |Flat-Square Badge| |
3537
+---------------+---------------------+
@@ -47,30 +49,27 @@ If no argument is passed, ``flat`` is used as default.
4749
.. |Social Badge| image:: https://readthedocs.org/projects/pip/badge/?version=latest&style=social
4850

4951

50-
Project Pages
51-
-------------
52+
Version-specific badges
53+
-----------------------
5254

53-
You will now see badges embedded in your `project page`_.
54-
The default badge will be pointed at the *default version* you have specified for your project.
55-
The badge URLs look like this::
55+
You can change the version of the documentation your badge points to.
56+
To do this, you can pass the ``version`` GET argument to the badge URL.
57+
By default, it will point at the *default version* you have specified for your project.
5658

57-
https://readthedocs.org/projects/pip/badge/?version=latest&style=plastic
59+
The badge URL looks like this::
5860

59-
You can replace the version argument with any version that you want to show a badge for.
60-
If you click on the badge icon,
61-
you will be given snippets for RST, Markdown, and HTML;
62-
to make embedding it easier.
61+
https://readthedocs.org/projects/docs/badge/?version=latest
6362

64-
If you leave the version argument off,
65-
it will default to your latest version.
66-
This is probably best to include in your README,
67-
since it will stay up to date with your Read the Docs project::
6863

69-
https://readthedocs.org/projects/pip/badge/
64+
Badges on dashboard pages
65+
-------------------------
7066

67+
On each :term:`project home` page there is a badge that communicates the status of the default version.
68+
If you click on the badge icon,
69+
you will be given snippets for reStructuredText, Markdown, and HTML
70+
to make embedding it easier.
7171

7272
.. _Read the Docs README: https://github.com/readthedocs/readthedocs.org/blob/main/README.rst
73-
.. _project page: https://readthedocs.org/projects/pip/
7473
.. |green| image:: https://assets.readthedocs.org/static/projects/badges/passing-flat.svg
7574
.. |red| image:: https://assets.readthedocs.org/static/projects/badges/failing-flat.svg
7675
.. |yellow| image:: https://assets.readthedocs.org/static/projects/badges/unknown-flat.svg

0 commit comments

Comments
 (0)