Skip to content

Commit b59fb1b

Browse files
committed
Move remaining demo.qmd check content into README and demo site.
1 parent 5898e59 commit b59fb1b

3 files changed

Lines changed: 56 additions & 143 deletions

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Details Extension
1+
# details
22

33
A Quarto extension for creating collapsible sections using `<details>` and `<summary>` HTML elements without writing raw HTML.
44

@@ -70,6 +70,26 @@ If multiple summary methods are used, the priority is:
7070
4. **Default** ("Click to expand")
7171

7272

73+
Example where attribute takes priority:
74+
75+
````markdown
76+
::: {.details summary="This will be used"}
77+
## This heading will be treated as content
78+
79+
Content here.
80+
:::
81+
````
82+
83+
### Open by default
84+
85+
Add the `open="true"` attribute to make the details open by default:
86+
87+
```markdown
88+
::: {.details summary="Already expanded" open="true"}
89+
This content is visible by default.
90+
:::
91+
```
92+
7393
# License
7494

7595
AGPL (>= 3)

demo.qmd

Lines changed: 0 additions & 141 deletions
This file was deleted.

docs/index.qmd

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,38 @@ If multiple summary methods are used, the priority is:
9999
1. **Attribute** (`summary="text"`) - highest priority
100100
2. **Summary div** (`::: {.summary}`)
101101
3. **First heading** (`##`, `###`, etc.)
102-
4. **Default** ("Click to expand")
102+
4. **Default** ("Click to expand")
103+
104+
Example where attribute takes priority:
105+
106+
````markdown
107+
::: {.details summary="This will be used"}
108+
## This heading will be treated as content
109+
110+
Content here.
111+
:::
112+
````
113+
114+
Gives:
115+
116+
::: {.details summary="This will be used"}
117+
## This heading will be treated as content
118+
119+
Content here.
120+
:::
121+
122+
### Open by default
123+
124+
Add the `open="true"` attribute to make the details open by default:
125+
126+
```markdown
127+
::: {.details summary="Already expanded" open="true"}
128+
This content is visible by default.
129+
:::
130+
```
131+
132+
Gives:
133+
134+
::: {.details summary="Already expanded" open="true"}
135+
This content is visible by default.
136+
:::

0 commit comments

Comments
 (0)