fix note shortcode, lists (#13587)
* fix note shortcode, lists - fix note shortcode for use in lists - add example in style guide * add more items to list * update warning, caution, minor tweaks * more updates
This commit is contained in:
parent
8c6f0d39db
commit
0c568fa9c9
|
@ -211,7 +211,6 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d
|
||||||
{{</* /note */>}}
|
{{</* /note */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
The output is:
|
The output is:
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
|
@ -236,6 +235,36 @@ The output is:
|
||||||
You can _still_ use Markdown inside these callouts.
|
You can _still_ use Markdown inside these callouts.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
|
You can use a {{</* note */>}} in a list:
|
||||||
|
|
||||||
|
```
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
### Caution
|
||||||
|
|
||||||
Use {{</* caution */>}} to call attention to an important piece of information to avoid pitfalls.
|
Use {{</* caution */>}} to call attention to an important piece of information to avoid pitfalls.
|
||||||
|
@ -266,7 +295,6 @@ Beware.
|
||||||
{{</* /warning */>}}
|
{{</* /warning */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
The output is:
|
The output is:
|
||||||
|
|
||||||
{{< warning >}}
|
{{< warning >}}
|
||||||
|
@ -307,7 +335,7 @@ For example:
|
||||||
1. Preheat oven to 350˚F
|
1. Preheat oven to 350˚F
|
||||||
|
|
||||||
1. Prepare the batter, and pour into springform pan.
|
1. Prepare the batter, and pour into springform pan.
|
||||||
{{</* note */>}}**Note:** Grease the pan for best results.{{</* /note */>}}
|
{{</* note */>}}Grease the pan for best results.{{</* /note */>}}
|
||||||
|
|
||||||
1. Bake for 20-25 minutes or until set.
|
1. Bake for 20-25 minutes or until set.
|
||||||
|
|
||||||
|
@ -432,9 +460,9 @@ considered new in a few months.
|
||||||
|
|
||||||
{{% capture whatsnext %}}
|
{{% capture whatsnext %}}
|
||||||
|
|
||||||
* Learn about [writing a new topic](/docs/home/contribute/write-new-topic/).
|
* Learn about [writing a new topic](/docs/contribute/style/write-new-topic/).
|
||||||
* Learn about [using page templates](/docs/home/contribute/page-templates/).
|
* Learn about [using page templates](/docs/contribute/style/page-templates/).
|
||||||
* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes/)
|
* Learn about [staging your changes](/docs/contribute/stage-documentation-changes/)
|
||||||
* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/).
|
* Learn about [creating a pull request](/docs/contribute/start/#submit-a-pull-request/).
|
||||||
|
|
||||||
{{% /capture %}}
|
{{% /capture %}}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<blockquote class="caution">
|
<blockquote class="caution">
|
||||||
<div><strong>{{ T "caution" }}</strong> {{ .Inner | markdownify }}</div>
|
<div><strong>{{ T "caution" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<blockquote class="note">
|
<blockquote class="note">
|
||||||
<div><strong>{{ T "note" }}</strong> {{ .Inner | markdownify }}</div>
|
<div><strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||||
</blockquote>
|
</blockquote>
|
|
@ -1,3 +1,3 @@
|
||||||
<blockquote class="warning">
|
<blockquote class="warning">
|
||||||
<div><strong>{{ T "warning" }}</strong> {{ .Inner | markdownify }}</div>
|
<div><strong>{{ T "warning" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
Loading…
Reference in New Issue