Details
The Details shortcode is functionally the same as its HTML counterpart and is designed to be used in the same contexts:
- hide large pieces of content if they would otherwise disrupt the reading flow or are not necessarily important for the overall gist of the page.
- logically order a set of helpful or supportive pieces of information in a clear and concise way
Usage
Details is a paired shortcode, meaning that you have to close it yourself with an end tag (see code example below).
| Argument | Type | Notes |
|---|---|---|
| content | string |
the markup between the shortcode's tags |
| summary | string |
optional summary title; default: "Details" |
| open | boolean |
optional flag, if true details pane is open on page load; default: false |
Example
The following code…
{% details "This is an optional title" %}
This is the disclosure's content. Useful for longer swaths of secondary information or codeblocks. Supports *Markdown*.
{% enddetails %}
…renders into this:
This is an optional title
This is the disclosure's content. Useful for longer swaths of secondary information or codeblocks. Supports Markdown.