feat: add badge shortcode (#457)

* feat: move badge to a separate partial

* feat: badge shortcode

* docs: add badge shortcode examples

* chore: generate css

* docs: add spaces between badges
This commit is contained in:
Xin
2024-09-22 22:12:22 +01:00
committed by GitHub
parent cabdb421e3
commit c70900c25f
9 changed files with 104 additions and 12 deletions

View File

@ -10,6 +10,41 @@ sidebar:
These shortcodes are considered less stable and may be changed anytime.
{{< /callout >}}
## Badge
```
{{</* badge "Badge" */>}}
```
Result:
{{< badge "Badge" >}}
Variants:
```
{{</* badge content="info" type="info" */>}}
{{</* badge content="warning" type="warning" */>}}
{{</* badge content="error" type="error" */>}}
```
Result:
{{< badge content="info" type="info" >}} &nbsp;
{{< badge content="warning" type="warning" >}} &nbsp;
{{< badge content="error" type="error" >}}
With link:
```
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" */>}}
```
Result:
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" >}}
## YouTube
Embed a YouTube video.