A simple shortcode to add tags for Hugo.
- Put the short code in the
/layouts/shortcode/
folder (If this folder does not exist, create it.). - Add the
tag.css
file in the/static/css
folder (If this folder does not exist, create it.). - Add
<link rel="stylesheet" type="text/css" href="/css/tag.css">
in your<head> </head>
Just add shortcode in your .md
(example with emojis)
- {{< tag fixed >}}๐ฉน Fixed{{< /tag >}}
- {{< tag update >}}๐ Update{{< /tag >}}
- {{< tag removed >}}๐งป Remove{{< /tag >}}
- {{< tag add >}}๐ Add{{< /tag >}}
- {{< tag changed >}}๐ฉ Changed{{< /tag >}}
- {{< tag warning >}}๐ฃ Warning{{< /tag >}}
- {{< tag deprecated >}}๐ป Deprecated{{< /tag >}}
There are seven basic styles, you can add more simply by adding this line to the tag.css
.
.tag-name {
background:#your-color;
}