summaryrefslogtreecommitdiff
path: root/themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md')
-rw-r--r--themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md b/themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md
new file mode 100644
index 0000000..9ce552a
--- /dev/null
+++ b/themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md
@@ -0,0 +1,29 @@
+# Badges
+
+{{< badge title="Title" value="Value" >}}
+{{< badge style="info" title="Hugo" value="0.147.6" >}}
+{{< badge style="success" title="Build" value="Passing" >}}
+{{< badge style="warning" title="Coverage" value="25%" >}}
+{{< badge style="danger" title="Issues" value="120" >}}
+
+Badges can be used to annotate your pages with additional information or mark specific places in markdown content.
+
+## Examples
+
+| Shortcode | Output |
+| -- | -- |
+| `{{</* badge style="info" title="hugo" value="0.147.6" */>}}` | {{< badge style="info" title="Hugo" value="0.147.6" >}} |
+| `{{</* badge style="success" title="Build" value="Passing" */>}}` | {{< badge style="success" title="Build" value="Passing" >}} |
+| `{{</* badge style="warning" title="Coverage" value="25%" */>}}` | {{< badge style="warning" title="Coverage" value="25%" >}} |
+| `{{</* badge style="danger" title="Issues" value="120" */>}}` | {{< badge style="danger" title="Issues" value="120" >}} |
+| | |
+| `{{</* badge style="info" title="Title" */>}}` | {{< badge style="info" title="Title" >}} |
+| `{{</* badge style="info" value="Value" */>}}` | {{< badge style="info" value="Value" >}} |
+| `{{</* badge title="Default" */>}}` | {{< badge value="Default" >}} |
+
+## Use in links
+
+A badge can be wrapped in markdown link producing following result: [{{< badge title="Hugo" value="0.147.6" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.147.6)
+```tpl
+[{{</* badge title="Hugo" value="0.147.6" */>}}](https://github.com/gohugoio/hugo/releases/tag/v0.147.6)
+```
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.