1. Posts/

Shortcodes

·1 min·

In addition to all the default Hugo shortcodes , Compost adds a few extras for additional functionality.

Alert

alert outputs its contents as a stylised message box within your article. It’s useful for drawing attention to important information that you don’t want the reader to miss.

The input is written in Markdown so you can format it however you please.

Example:

{{< alert >}}
**Warning!** This action is destructive!
{{< /alert >}}
Warning! This action is destructive!

Badge

badge outputs a styled badge component which is useful for displaying metadata.

Example:

{{< badge >}}
New article!
{{< /badge >}}
New article!

Button