From 627c89df933393327c74ad90374b9fa83ba273ad Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:54:27 +0530 Subject: [PATCH 1/9] Update conf.py to include 'sphinx_toolbox.collapse' extension --- conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conf.py b/conf.py index 40c12c45e1..e8e81294c9 100644 --- a/conf.py +++ b/conf.py @@ -41,6 +41,7 @@ "seo", "components", "sitemap", + 'sphinx_toolbox.collapse', ] # Add any paths that contain templates here, relative to this directory. From efe965be8414d059df93b078d2042bfb4ee1c72f Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:26:49 +0530 Subject: [PATCH 2/9] Add reference for using collapse in docs examples taken from https://sphinx-toolbox.readthedocs.io/en/latest/extensions/collapse.html#module-sphinx_toolbox.collapse --- guides/contributing.rst | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index 4a71f82f96..dd4bc5177a 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -251,6 +251,53 @@ adhere to the following order: Note that a blank line is *required* after every ``code-block`` directive. +- **Collapsible block**: To add a collapsible section, use the ``collapse`` directive: + + .. code-block:: rst + .. collapse:: Details + + Something small enough to escape casual notice. + + .. collapse:: Open + :open: + + This section is open by default. + + .. collapse:: A Different Label + :class: custom-summary + :name: summary0 + + Something else that might escape notice. + + .. collapse:: A long code block + + .. code-block:: python + + print("Not really") + .. collapse:: Details + + Something small enough to escape casual notice. + + .. collapse:: Open + :open: + + This section is open by default. + + .. collapse:: A Different Label + :class: custom-summary + :name: summary0 + + Something else that might escape notice. + + .. collapse:: A long code block + + .. code-block:: python + + print("Not really") + .. note:: + + Note that a blank line is *required* after every ``collapse`` directive. + - **Images**: Use the ``figure`` directive to display an image: .. code-block:: rst From b360ea9eb40c4969237d72a06990d675d4970713 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:31:27 +0530 Subject: [PATCH 3/9] Update contributing.rst: Added reference for collapsible section examples taken from https://sphinx-toolbox.readthedocs.io/en/latest/extensions/collapse.html#module-sphinx_toolbox.collapse --- guides/contributing.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index dd4bc5177a..268faa0533 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -251,7 +251,7 @@ adhere to the following order: Note that a blank line is *required* after every ``code-block`` directive. -- **Collapsible block**: To add a collapsible section, use the ``collapse`` directive: +- **Collapsible section**: To add a collapsible section, use the ``collapse`` directive: .. code-block:: rst .. collapse:: Details @@ -274,6 +274,7 @@ adhere to the following order: .. code-block:: python print("Not really") + .. collapse:: Details Something small enough to escape casual notice. @@ -294,6 +295,7 @@ adhere to the following order: .. code-block:: python print("Not really") + .. note:: Note that a blank line is *required* after every ``collapse`` directive. From 0a4d337772c9af3fb1eea7db1c8dc9baf113ac25 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:45:01 +0530 Subject: [PATCH 4/9] Update contributing.rst: Added reference for collapsible section --- guides/contributing.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 268faa0533..a4773de7d4 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -263,12 +263,6 @@ adhere to the following order: This section is open by default. - .. collapse:: A Different Label - :class: custom-summary - :name: summary0 - - Something else that might escape notice. - .. collapse:: A long code block .. code-block:: python @@ -284,12 +278,6 @@ adhere to the following order: This section is open by default. - .. collapse:: A Different Label - :class: custom-summary - :name: summary0 - - Something else that might escape notice. - .. collapse:: A long code block .. code-block:: python From 1c9fe08c9c1cbf8ff93d509d37458844701f2c06 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:59:35 +0530 Subject: [PATCH 5/9] Update contributing.rst: Added reference for collapsible section --- guides/contributing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index a4773de7d4..3e4dfdbffe 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -254,11 +254,13 @@ adhere to the following order: - **Collapsible section**: To add a collapsible section, use the ``collapse`` directive: .. code-block:: rst + .. collapse:: Details Something small enough to escape casual notice. .. collapse:: Open + :open: This section is open by default. @@ -274,6 +276,7 @@ adhere to the following order: Something small enough to escape casual notice. .. collapse:: Open + :open: This section is open by default. @@ -288,6 +291,7 @@ adhere to the following order: Note that a blank line is *required* after every ``collapse`` directive. + - **Images**: Use the ``figure`` directive to display an image: .. code-block:: rst From 4212b1d8597fc439a76b230ce953ffb9610f5e62 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:05:28 +0530 Subject: [PATCH 6/9] Update contributing.rst: Added reference for collapsible section --- guides/contributing.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 3e4dfdbffe..4171fe19f0 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -254,21 +254,21 @@ adhere to the following order: - **Collapsible section**: To add a collapsible section, use the ``collapse`` directive: .. code-block:: rst - + .. collapse:: Details - + Something small enough to escape casual notice. .. collapse:: Open :open: - + This section is open by default. .. collapse:: A long code block - + .. code-block:: python - + print("Not really") .. collapse:: Details @@ -284,7 +284,7 @@ adhere to the following order: .. collapse:: A long code block .. code-block:: python - + print("Not really") .. note:: From 87b1b84943d25fda8c6de477c14f5a3f5f1b03ea Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:16:08 +0530 Subject: [PATCH 7/9] Update conf.py to include 'sphinx_toolbox.collapse' extension --- conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf.py b/conf.py index e8e81294c9..b961986206 100644 --- a/conf.py +++ b/conf.py @@ -41,6 +41,10 @@ "seo", "components", "sitemap", + + 'sphinx.ext.viewcode', + 'sphinx_tabs.tabs', + 'sphinx-prompt', 'sphinx_toolbox.collapse', ] From 4c8e505afd79a2f5af4f6cf2b8f1346f2adf1713 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:59:09 +0530 Subject: [PATCH 8/9] Update requirements.txt added line for sphinx toolbox --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index a7f08038b7..a7f830175b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ sphinx==5.0.1 sphinx-autobuild==2021.3.14 +sphinx-toolbox==3.8.0 From 9ba39ca293dd87adb4e37c335051ca75ab60ec5e Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:59:46 +0530 Subject: [PATCH 9/9] Update conf.py --- conf.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/conf.py b/conf.py index b961986206..a8d6a2559f 100644 --- a/conf.py +++ b/conf.py @@ -40,11 +40,8 @@ "github", "seo", "components", - "sitemap", + "sitemap", - 'sphinx.ext.viewcode', - 'sphinx_tabs.tabs', - 'sphinx-prompt', 'sphinx_toolbox.collapse', ]