Hugo Hint/Quote shortcode
Shortcode to render hints/quotes within markdown. Dedicated blocks of text help to attract the attention of the reader, especially if they are in a different color. Just do not over use them or they will become annoying and people will automatically ignore them.
This article was written for Hugo 0.74
.
Usage
There are 5 variants: normal
, info
, warning
, danger
and empty; the last is the default <blockquote>
style. You can easily add more styles if you would want to. Note this shortcode requires to use the %
-syntax (see
this post for more info).
Example
{{% hint info %}}
Example text that *may* contain **markdown** `markup` and [links]().
And other shortcodes will work as well:
{{% hint warning %}}
Example text that *may* contain **markdown** `markup`.
{{% /hint %}}
{{% /hint %}}
{{% hint warning %}}
Example text that *may* contain **markdown** `markup`.
{{% /hint %}}
{{% hint danger %}}
Example text that *may* contain **markdown** `markup`.
{{% /hint %}}
{{% hint normal %}}
Example text that *may* contain **markdown** `markup`.
{{% /hint %}}
{{% hint %}}
Example text that *may* contain **markdown** `markup`.
{{% /hint %}}
Example text that may contain markdown
markup
and links.And other shortcodes will work as well:
Example text that may contain markdown
markup
.
Example text that may contain markdown
markup
.
Example text that may contain markdown
markup
.
Example text that may contain markdown
markup
.
Example text that may contain markdown
markup
.
Code
The HTML shortcode, it is nothing more than a styled <blockquote>
. For more info why print
is required see
this post.
|
|
The accompanying SCSS
|
|
- Permalink: //oostens.me/posts/hugo-hint/quote-shortcode/
- License: The text and content is licensed under CC BY-NC-SA 4.0. All source code I wrote on this page is licensed under The Unlicense; do as you please, I'm not liable nor provide warranty.