diff --git a/exampleSite/content.en/docs/shortcodes/section/_index.md b/exampleSite/content.en/docs/shortcodes/section/_index.md index bd5db38..f3b9ec3 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 -{{}} +{{}} ``` -{{
}} +{{
}} diff --git a/layouts/shortcodes/section.html b/layouts/shortcodes/section.html index a7f45d1..35fbf9b 100644 --- a/layouts/shortcodes/section.html +++ b/layouts/shortcodes/section.html @@ -3,8 +3,10 @@
{{ partial "docs/title" . }}
+ {{ if (in $.Params "summary") -}}
{{ default .Summary .Description }}
+ {{ end -}} {{ end }}