Skip to content

Commit 8283131

Browse files
Use admonition partial (#539)
1 parent fc9738d commit 8283131

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div class="admonition {{ .title }}">
2+
<div class="admonition-title"> {{ .title | humanize }}</div>
3+
<p>
4+
{{ .body | markdownify }}
5+
</p>
6+
</div>

layouts/shortcodes/admonition.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252

5353
*/}}
5454

55-
<div class="admonition {{ .Get 0 }}">
56-
<div class="admonition-title"> {{ .Get 0 | humanize }}</div>
57-
<p>
58-
{{ .Inner | markdownify }}
59-
</p>
60-
</div>
55+
{{- $title := .Get 0 -}}
56+
{{- $body := .Inner -}}
57+
{{- partial "_elements/admonition.html" (dict "title" $title "body" $body) -}}

0 commit comments

Comments
 (0)