1
- Badges
2
- ======
1
+ Status Badges
2
+ =============
3
3
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.
5
6
They are great for embedding in your README,
6
7
or putting inside your actual doc pages.
7
8
8
- Status Badges
9
- -------------
9
+ You can see a badge in action in the `Read the Docs README `_.
10
10
11
- They will display in green for passing,
12
- red for failing,
13
- and yellow for unknown states.
11
+ Display states
12
+ --------------
14
13
15
- Here are a few examples :
14
+ Badges have the following states which can be shown to users :
16
15
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.
18
19
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 |
21
23
22
24
Style
23
25
-----
24
26
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.
28
30
29
31
+---------------+---------------------+
30
- | STYLE | BADGE |
32
+ | Style | Badge |
31
33
+===============+=====================+
32
- | flat | |Flat Badge | |
34
+ | flat - default | |Flat Badge | |
33
35
+---------------+---------------------+
34
36
| flat-square | |Flat-Square Badge | |
35
37
+---------------+---------------------+
@@ -47,30 +49,27 @@ If no argument is passed, ``flat`` is used as default.
47
49
.. |Social Badge | image :: https://readthedocs.org/projects/pip/badge/?version=latest&style=social
48
50
49
51
50
- Project Pages
51
- -------------
52
+ Version-specific badges
53
+ -----------------------
52
54
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.
56
58
57
- https://readthedocs.org/projects/pip/badge/?version=latest&style=plastic
59
+ The badge URL looks like this::
58
60
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
63
62
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::
68
63
69
- https://readthedocs.org/projects/pip/badge/
64
+ Badges on dashboard pages
65
+ -------------------------
70
66
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.
71
71
72
72
.. _Read the Docs README : https://github.com/readthedocs/readthedocs.org/blob/main/README.rst
73
- .. _project page : https://readthedocs.org/projects/pip/
74
73
.. |green | image :: https://assets.readthedocs.org/static/projects/badges/passing-flat.svg
75
74
.. |red | image :: https://assets.readthedocs.org/static/projects/badges/failing-flat.svg
76
75
.. |yellow | image :: https://assets.readthedocs.org/static/projects/badges/unknown-flat.svg
0 commit comments