Hugo Shortcodes
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Callout

Notion-style callout blocks.

How to use

# file.md

{{< callout emoji="⚠️" >}}
**Markdown works in here.**
> yes it does.
{{< /callout >}}

Shortcode

# callout.html

<style>
    #callout {
        background: #F9F9F9;
        padding: 1.5em 1.25em;
        border-radius: 3px;
        display: flex;
        flex-direction: row;
        margin-bottom: 20px;
    }

    #callout-inner {
        margin-left: 2em;
    }

    @media (max-width: 767px) {
        #callout {
            padding: 1.5em 0.75em 1.5em 0.6em;
        }

        #callout-inner {
            margin-left: 0.5em;
        }
    }
</style>
<div id="callout">
    <div>{{ .Get "emoji" }}</div>
    <div id="callout-inner">
        {{ .Inner  | markdownify }}
    </div>
</div>

Sample

⚠️

Markdown works in here.

yes it does.


Source Unknown