Badges#
Badges are colored pill-shapes containing text, like this. Used judiciously, they’re effective for conveying information at a glance. The Rubin user guide configuration enables your to use badges from the Sphinx Design extension.
Badge styles#
Example  | 
Syntax  | 
|---|---|
Plain badge  | 
  | 
Primary  | 
  | 
Primary line  | 
  | 
Secondary  | 
  | 
Secondary line  | 
  | 
Info  | 
  | 
Info line  | 
  | 
Warning  | 
  | 
Warning line  | 
  | 
Danger  | 
  | 
Danger line  | 
  | 
Light  | 
  | 
Light line  | 
  | 
Dark  | 
  | 
Dark line  | 
  | 
Reusable badges#
It’s a good idea to use badges consistently throughout your documentation. To do this, create substitutions for your badges in the rst epilog:
.. |done| replace:: :bdg-success:`Done`
.. |todo| replace:: :bdg-primary-line:`To-do`
.. |inprogress| replace:: :bdg-seconday-line:`To-do`
Now you can use those badges throughout your documentation project:
Project milestones
==================
- |done| Task 1
- |todo| Task 2
- |inprogress| Task 2
See Using the rst epilog for common links and substitutions for configuration details.
Link and reference badges#
Badges can also serve as links, both external and internal to the documentation project.
External links are bdg-link-* variants of the above link styles.
Explicit titles can be set using the normal <> syntax.
:bdg-link-primary:`https://www.lsst.io`
:bdg-link-primary:`Rubin Documentation <https://www.lsst.io>`
You can reference targets (ref) in a badge using bdg-ref-* variants of badges:
:bdg-ref-primary:`a-target`
:bdg-ref-primary:`Title <a-target>`