integrations make `<details>` open (#17895)
integrations details open
Ilya Mashchenko committed
Jun 14, 2024 at 15:51 UTC
d9c807e23cee7026790032858ee7e2b093ee2437
3 files changed
+7
-5
integrations/gen_docs_integrations.py
+4
-2
@@ -61,8 +61,10 @@ def clean_and_write(md, path):
61
Then it writes the buffer on the file provided.
62
"""
63
# clean first, replace
64
- md = md.replace("{% details summary=\"", "<details><summary>").replace(
65
- "\" %}", "</summary>\n").replace("{% /details %}", "</details>\n")
64
+ md = md.replace("{% details summary=\"", "<details><summary>")
65
+ md = md.replace("{% details open=true summary=\"", "<details open><summary>")
66
+ md = md.replace("\" %}", "</summary>\n")
67
+ md = md.replace("{% /details %}", "</details>\n")
68
69
path.write_text(md)
70
integrations/templates/metrics.md
+1
-1
@@ -2,7 +2,7 @@
2
## Metrics
3
4
[% if entry.metrics.folding.enabled and not clean %]
5
-{% details summary="[[ entry.metrics.folding.title ]]" %}
5
+{% details open=true summary="[[ entry.metrics.folding.title ]]" %}
6
[% endif %]
7
Metrics grouped by *scope*.
8
integrations/templates/setup.md
+2
-2
@@ -60,7 +60,7 @@ There is no configuration file.
60
61
[% if entry.setup.configuration.options.list %]
62
[% if entry.setup.configuration.options.folding.enabled and not clean %]
63
-{% details summary="[[ entry.setup.configuration.options.folding.title ]]" %}
63
+{% details open=true summary="[[ entry.setup.configuration.options.folding.title ]]" %}
64
[% endif %]
65
| Name | Description | Default | Required |
66
|:----|:-----------|:-------|:--------:|
@@ -92,7 +92,7 @@ There are no configuration options.
92
[[ example.description ]]
93
94
[% if example.folding.enabled and not clean %]
95
-{% details summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
95
+{% details open=true summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
96
[% endif %]
97
```yaml
98
[[ example.config ]]