Add section shortcode, to render children

This commit is contained in:
Alex Shpak 2020-05-31 00:18:25 +02:00
parent aa7c486e76
commit b8b7184e89
7 changed files with 31 additions and 3 deletions

View file

@ -137,7 +137,8 @@
} }
dd { dd {
margin-inline-start: $padding-16 * 2; margin-inline-start: $padding-16;
margin-bottom: $padding-16;
} }
} }

View file

@ -0,0 +1,15 @@
---
bookCollapseSection: true
---
# Section
Section renders pages in section as definition list, using title and description.
## Example
```tpl
{{</* section */>}}
```
{{<section>}}

View file

@ -0,0 +1 @@
# Page 1

View file

@ -0,0 +1 @@
# Page 2

View file

@ -1 +1 @@
{"Target":"book.min.947656565f9248015f7b2c792cb8b8c13ad749e25295c0634f4c7f1d1bde6a0a.css","MediaType":"text/css","Data":{"Integrity":"sha256-lHZWVl+SSAFfeyx5LLi4wTrXSeJSlcBjT0x/HRveago="}} {"Target":"book.min.1205ebacf147e31d6bd6f74be1ef8d96f4bb2c4943c68e5a39b4e988a774a2b0.css","MediaType":"text/css","Data":{"Integrity":"sha256-EgXrrPFH4x1r1vdL4e+NlvS7LElDxo5aObTpiKd0orA="}}

View file

@ -0,0 +1,10 @@
<dl>
{{ range .Page.Pages }}
<dt>
<a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
</dt>
<dd>
{{ default .Summary .Description }}
</dd>
{{ end }}
</dl>