diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index ff5a5973..0ab70a09 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -130,8 +130,8 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol {{* badge */>}}New{{* /badge */>}} {{* /accordionItem */>}} - {{* accordionItem title="Can I use Markdown?" */>}} - Yes. Content inside items is Markdown and supports other shortcodes like alerts: + {{* accordionItem title="Can I use shortcodes?" md=false */>}} + Yes. Content inside items can contain other shortcodes like alerts: {{* alert */>}}This is an inline alert.{{* /alert */>}} {{* /accordionItem */>}} @@ -145,10 +145,10 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol - Flexible layouts - `config`-driven - {{< badge >}}New{{< /badge >}} + {{< /accordionItem >}} - {{< accordionItem title="Can I use Markdown?" >}} + {{< accordionItem title="Can I use Markdown?" md=false >}} Yes. Content inside items is Markdown and supports other shortcodes like alerts: {{< alert >}}This is an inline alert.{{< /alert >}} @@ -166,7 +166,7 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol 3. Three {{* /accordionItem */>}} - {{* accordionItem title="Second item" */>}} + {{* accordionItem title="Second item" md=false */>}} This item includes another shortcode: {{* badge */>}}Tip{{* /badge */>}} {{* /accordionItem */>}} @@ -181,7 +181,7 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol 3. Three {{< /accordionItem >}} - {{< accordionItem title="Second item" >}} + {{< accordionItem title="Second item" md=false >}} This item includes another shortcode: {{< badge >}}Tip{{< /badge >}} {{< /accordionItem >}} diff --git a/layouts/shortcodes/accordionItem.html b/layouts/shortcodes/accordionItem.html index 414c134e..22a53f28 100644 --- a/layouts/shortcodes/accordionItem.html +++ b/layouts/shortcodes/accordionItem.html @@ -6,6 +6,7 @@ {{ $isSeparated := or (eq $separated true) (eq $separated "true") }} {{ $title := .Get "title" | default (.Get "header") }} +{{ $md := .Get "md" | default true }} {{ $open := .Get "open" | default false }} {{ $isOpen := or (eq $open true) (eq $open "true") }} @@ -21,6 +22,10 @@