Browse Source

integrations make `<details>` open (#17895)

integrations details open
Ilya Mashchenko 9 months ago
parent
commit
d9c807e23c

+ 4 - 2
integrations/gen_docs_integrations.py

@@ -61,8 +61,10 @@ def clean_and_write(md, path):
     Then it writes the buffer on the file provided.
     """
     # clean first, replace
-    md = md.replace("{% details summary=\"", "<details><summary>").replace(
-        "\" %}", "</summary>\n").replace("{% /details %}", "</details>\n")
+    md = md.replace("{% details summary=\"", "<details><summary>")
+    md = md.replace("{% details open=true summary=\"", "<details open><summary>")
+    md = md.replace("\" %}", "</summary>\n")
+    md = md.replace("{% /details %}", "</details>\n")
 
     path.write_text(md)
 

+ 1 - 1
integrations/templates/metrics.md

@@ -2,7 +2,7 @@
 ## Metrics
 
 [% if entry.metrics.folding.enabled and not clean %]
-{% details summary="[[ entry.metrics.folding.title ]]" %}
+{% details open=true summary="[[ entry.metrics.folding.title ]]" %}
 [% endif %]
 Metrics grouped by *scope*.
 

+ 2 - 2
integrations/templates/setup.md

@@ -60,7 +60,7 @@ There is no configuration file.
 
 [% if entry.setup.configuration.options.list %]
 [% if entry.setup.configuration.options.folding.enabled and not clean %]
-{% details summary="[[ entry.setup.configuration.options.folding.title ]]" %}
+{% details open=true summary="[[ entry.setup.configuration.options.folding.title ]]" %}
 [% endif %]
 | Name | Description | Default | Required |
 |:----|:-----------|:-------|:--------:|
@@ -92,7 +92,7 @@ There are no configuration options.
 [[ example.description ]]
 
 [% if example.folding.enabled and not clean %]
-{% details summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
+{% details open=true summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
 [% endif %]
 ```yaml
 [[ example.config ]]