mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
#543, Add summary param for section shortcode
This commit is contained in:
parent
e7155b473a
commit
3f1bcccbfb
@ -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 >}}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user