diff --git a/content/en/docs/contribute/style/style-guide.md b/content/en/docs/contribute/style/style-guide.md index 675b6368e8..1a3b0cdd0f 100644 --- a/content/en/docs/contribute/style/style-guide.md +++ b/content/en/docs/contribute/style/style-guide.md @@ -211,7 +211,6 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d {{}} ``` - The output is: {{< note >}} @@ -236,6 +235,36 @@ The output is: You can _still_ use Markdown inside these callouts. {{< /note >}} +You can use a {{}} in a list: + +``` +1. Use the note shortcode in a list + +1. A second item with an embedded note + + {{}} + Warning, Caution, and Note shortcodes, embedded in lists, need to be indented four spaces. See [Common Shortcode Issues](#common-shortcode-issues). + {{}} + +1. A third item in a list + +1. A fourth item in a list +``` + +The output is: + +1. Use the note shortcode in a list + +1. A second item with an embedded note + + {{< note >}} + Warning, Caution, and Note shortcodes, embedded in lists, need to be indented four spaces. See [Common Shortcode Issues](#common-shortcode-issues). + {{< /note >}} + +1. A third item in a list + +1. A fourth item in a list + ### Caution Use {{}} to call attention to an important piece of information to avoid pitfalls. @@ -266,7 +295,6 @@ Beware. {{}} ``` - The output is: {{< warning >}} @@ -307,7 +335,7 @@ For example: 1. Preheat oven to 350˚F 1. Prepare the batter, and pour into springform pan. - {{}}**Note:** Grease the pan for best results.{{}} + {{}}Grease the pan for best results.{{}} 1. Bake for 20-25 minutes or until set. @@ -432,9 +460,9 @@ considered new in a few months. {{% capture whatsnext %}} -* Learn about [writing a new topic](/docs/home/contribute/write-new-topic/). -* Learn about [using page templates](/docs/home/contribute/page-templates/). -* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes/) -* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/). +* Learn about [writing a new topic](/docs/contribute/style/write-new-topic/). +* Learn about [using page templates](/docs/contribute/style/page-templates/). +* Learn about [staging your changes](/docs/contribute/stage-documentation-changes/) +* Learn about [creating a pull request](/docs/contribute/start/#submit-a-pull-request/). {{% /capture %}} diff --git a/layouts/shortcodes/caution.html b/layouts/shortcodes/caution.html index c23c1d9f19..2d14447142 100644 --- a/layouts/shortcodes/caution.html +++ b/layouts/shortcodes/caution.html @@ -1,3 +1,3 @@
-
{{ T "caution" }} {{ .Inner | markdownify }}
+
{{ T "caution" }} {{ trim .Inner " \n" | markdownify }}
diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index c156e8489d..1161c2366c 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1,3 +1,3 @@
-
{{ T "note" }} {{ .Inner | markdownify }}
-
+
{{ T "note" }} {{ trim .Inner " \n" | markdownify }}
+ \ No newline at end of file diff --git a/layouts/shortcodes/warning.html b/layouts/shortcodes/warning.html index d91f429646..ddd5ff197f 100644 --- a/layouts/shortcodes/warning.html +++ b/layouts/shortcodes/warning.html @@ -1,3 +1,3 @@
-
{{ T "warning" }} {{ .Inner | markdownify }}
+
{{ T "warning" }} {{ trim .Inner " \n" | markdownify }}