Make alerts able to collapse
I think it would be useful to have an option for the {{< alert >}}
shortcode to collapse when specified. Something like:
{{< alert title="Tip" color="success" collapse=true >}}
That toggles a github-like collapsible such as
<details>
<summary>Click here to toggle view</summary>
Tip content here
</details>
Doesn't seem particularly hard with how Hugo shortcodes work. Of course, we really wouldn't want alerts of color error
or warning
to be skippable, so those wouldn't have a collapse
attribute.
This way we could make Tips and Notes that are not restricted by space and do not pollute the tutorial page, while also having the ability to display them fully by default where it makes sense.
Edited by Thiago Sueto