diff --git a/CHANGELOG.md b/CHANGELOG.md index c11414a3..b85c81ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Markdown images and `figure` shortcode now search the `assets/` directory if an image cannot be found in page bundle ([#126](https://github.com/jpanther/congo/issues/126)) - Markdown images and `figure` shortcode now fallback to static assets if an image is not provided as a Hugo resource ([#126](https://github.com/jpanther/congo/issues/126)) - Taxonomy term listings now honour the `groupByYear` parameter ([#145](https://github.com/jpanther/congo/pull/145)) +- The `alert` shortcode now allows its icon to be specified as a parameter ## [2.0.5] - 2022-02-20 diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 1ee7361f..8e34a339 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -15,17 +15,27 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag The input is written in Markdown so you can format it however you please. +By default, the alert is presented with an exclaimation triangle icon. To change the icon, include the icon name in the shortcode. Check out the [icon shortcode](#icon) for more details on using icons. + **Example:** ```md {{* alert */>}} **Warning!** This action is destructive! {{* /alert */>}} + +{{* alert "twitter" */>}} +Don't forget to [follow me](https://twitter.com/jpanther) on Twitter. +{{* /alert */>}} ``` {{< alert >}} **Warning!** This action is destructive! {{< /alert >}} + +{{< alert "twitter" >}} +Don't forget to [follow me](https://twitter.com/jpanther) on Twitter. +{{< /alert >}} ## Badge diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index 827cf46e..41d380d9 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -1,6 +1,6 @@