From 9b5f3fad7068298265dbbc8a65077f7917a090a5 Mon Sep 17 00:00:00 2001 From: aethrvmn Date: Sun, 21 Sep 2025 00:27:35 +0200 Subject: updated hugo-book theme --- .../content.en/docs/shortcodes/badges.md | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md (limited to 'themes/hugo-book/exampleSite/content.en/docs/shortcodes/badges.md') 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="success" title="Build" value="Passing" >}} | +| `{{}}` | {{< badge style="warning" title="Coverage" value="25%" >}} | +| `{{}}` | {{< badge style="danger" title="Issues" value="120" >}} | +| | | +| `{{}}` | {{< badge style="info" title="Title" >}} | +| `{{}}` | {{< badge style="info" value="Value" >}} | +| `{{}}` | {{< 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 +[{{}}](https://github.com/gohugoio/hugo/releases/tag/v0.147.6) +``` -- cgit v1.2.3