diff --git a/exampleSite/content.en/docs/shortcodes/section/_index.md b/exampleSite/content.en/docs/shortcodes/section/_index.md index bd5db38b357cb87bc1acfb6dc27341c1eddf6a67..f3b9ec31557078bdea92e28f31ff1528c1d6d5d9 100644 --- a/exampleSite/content.en/docs/shortcodes/section/_index.md +++ b/exampleSite/content.en/docs/shortcodes/section/_index.md @@ -4,12 +4,12 @@ bookCollapseSection: true # Section -Section renders pages in section as definition list, using title and description. +Section renders pages in section as definition list, using title and description. Optional param `summary` can be used to show or hide page summary ## Example ```tpl -{{</* section */>}} +{{</* section [summary] */>}} ``` -{{<section>}} +{{<section summary >}} diff --git a/layouts/shortcodes/section.html b/layouts/shortcodes/section.html index a7f45d1bcfc6dbec84cc6fb8cd5cc792b3f3d995..35fbf9b311671b9e8f13a292eed60e620669118b 100644 --- a/layouts/shortcodes/section.html +++ b/layouts/shortcodes/section.html @@ -3,8 +3,10 @@ <dt> <a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a> </dt> + {{ if (in $.Params "summary") -}} <dd class="markdown-inner"> {{ default .Summary .Description }} </dd> + {{ end -}} {{ end }} </dl>