Skip to content
Snippets Groups Projects
Commit 3f1bcccb authored by Alex Shpak's avatar Alex Shpak
Browse files

#543, Add summary param for section shortcode

parent e7155b47
No related branches found
No related tags found
No related merge requests found
...@@ -4,12 +4,12 @@ bookCollapseSection: true ...@@ -4,12 +4,12 @@ bookCollapseSection: true
# Section # 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 ## Example
```tpl ```tpl
{{</* section */>}} {{</* section [summary] */>}}
``` ```
{{<section>}} {{<section summary >}}
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
<dt> <dt>
<a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a> <a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
</dt> </dt>
{{ if (in $.Params "summary") -}}
<dd class="markdown-inner"> <dd class="markdown-inner">
{{ default .Summary .Description }} {{ default .Summary .Description }}
</dd> </dd>
{{ end -}}
{{ end }} {{ end }}
</dl> </dl>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment