{{% 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 %}}
Last active
September 4, 2023 09:43
-
-
Save dmyates/8f0c8ed354a10ea32ffbcf2a363a77dd to your computer and use it in GitHub Desktop.
Simple description list shortcode for use with the Hugo static site generator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ .Get 0 | replaceRE "<ul>" "<dl>" .Inner | replaceRE "</ul>" "</dl>" | replaceRE "<li>" "<dt>" | replaceRE "(<dt>.*?): " "$1</dt><dd>" | replaceRE "</li>" "</dd>" | markdownify }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Default browser CSS sucks, so this is all required. */ | |
dl { | |
width: 100%; | |
overflow: hidden; | |
padding: 0; | |
margin: 0 | |
} | |
dt { | |
float: left; | |
width: 20%; | |
padding-right: 0.75em; | |
margin: 0.5em 0 0.5em 0; | |
font-weight: bold; | |
} | |
dd { | |
float: left; | |
width: 75%; | |
padding: 0; | |
margin: 0.5em 0 0.5em 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment