Skip to content

Commit 0b6b4f1

Browse files
authored
Feat: add details element shortcode (#52)
1 parent 0294205 commit 0b6b4f1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ This theme contains the following custom shorcodes:
4444
**Formatting**:
4545

4646
- collapse.html - Make a collapsible section.
47+
- details-disclosure.html - Renders information inside a toggleable element (open by default but can be toggled in/out of visibility).
4748
- comment.html - Insert a comment that won't be rendered at build time.
4849
- raw-html.html - Insert raw HTML into a markdown doc.
4950

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ $summary := .Get "summary"}}
2+
<details open>
3+
<summary>{{ $summary }}</summary>
4+
{{ .Inner | markdownify }}
5+
</details>

0 commit comments

Comments
 (0)