Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple description list shortcode for use with the Hugo static site generator.
{{ .Get 0 | replaceRE "<ul>" "<dl>" .Inner | replaceRE "</ul>" "</dl>" | replaceRE "<li>" "<dt>" | replaceRE "(<dt>.*?): " "$1</dt><dd>" | replaceRE "</li>" "</dd>" | markdownify }}
{{% description-list %}}
* Label: one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph.
* Other label: one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph.
* Another label: one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph. one or more sentences, maybe a short paragraph.
{{% /description-list %}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.