From 26d7c613700dfb6624e9eed264682ce88be0bba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Fri, 27 Oct 2023 11:03:54 +0200 Subject: [PATCH] doc: samples: Show related code samples contents by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add required class so that sphinx-togglebutton admonition is expanded by default. Also remove sphinx-immaterial code that should not be there. Signed-off-by: Benjamin Cabé --- doc/_extensions/zephyr/domain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/_extensions/zephyr/domain.py b/doc/_extensions/zephyr/domain.py index bce9436ba3..8c39514281 100644 --- a/doc/_extensions/zephyr/domain.py +++ b/doc/_extensions/zephyr/domain.py @@ -154,9 +154,10 @@ class ProcessRelatedCodeSamplesNode(SphinxPostTransform): if len(code_samples) > 0: admonition = nodes.admonition() admonition += nodes.title(text="Related code samples") - admonition["collapsible"] = "" # used by sphinx-immaterial theme admonition["classes"].append("related-code-samples") admonition["classes"].append("dropdown") # used by sphinx-togglebutton extension + admonition["classes"].append("toggle-shown") # show the content by default + sample_dl = nodes.definition_list() for code_sample in sorted(code_samples, key=lambda x: x["name"]):