details shortcode: add example of both alternatives (#783)

* details shortcode: add example of both alternatives
readme: mention steps shortcode, move katex alpha order
steps: use 1. instead of fixed numbers

* roll back steps.md

* positional vs argument. bonus typo fix
This commit is contained in:
nick n.
2025-11-18 08:48:54 +01:00
committed by GitHub
parent e08d9b796d
commit b7f9c8cb0f
3 changed files with 20 additions and 11 deletions
@@ -1,22 +1,30 @@
# Details
Details shortcode is a helper for `details` html5 element. It is going to replace `expand` shortcode.
Details shortcode is a helper for `details` html5 element. To collapse the details either omit the `open`
keyword when using positional arguments or set `open=false` when using parameters.
## Example
## Example with positional arguments
```tpl
{{%/* details "Title" [open] */%}}
## Markdown content
Lorem markdownum insigne...
{{%/* /details */%}}
```
```tpl
{{%/* details title="Title" open=true */%}}
## Markdown content
Lorem markdownum insigne...
{{%/* /details */%}}
```
{{% details "Title" open %}}
## Markdown content
Lorem markdownum insigne...
{{% /details %}}
## Example with parameters
```tpl
{{%/* details title="Title" open=true */%}}
## Markdown content
Lorem markdownum insigne...
{{%/* /details */%}}
```
{{% details title="Title" open=true %}}
## Markdown content
Lorem markdownum insigne...
{{% /details %}}