mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat(shortcode): show summaries by default in list_children
This commit is contained in:
parent
362cb1510b
commit
9872428a3f
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
|||
{{ $show_summary := ne (.Get "show_summary") "false" }}
|
||||
{{ if gt (len $.Page.Pages) 0}}
|
||||
<ul class="list-unstyled">
|
||||
{{ range $.Page.Pages }}
|
||||
<li><h5><a href="{{.RelPermalink}}">{{.LinkTitle}}</a></h5> {{with .Params.summary}}<p>{{. | plainify | emojify}}</p>{{end}}</li>
|
||||
<li>
|
||||
<h5><a href="{{.RelPermalink}}">{{.LinkTitle}}</a></h5>
|
||||
{{if $show_summary | and .Summary}}<p>{{.Summary | plainify | emojify}}</p>{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue