From 9be984305df9e2522f753b31010a31f60c5f957f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:21:59 +0100 Subject: [PATCH 01/13] Use explicit `readthedocs-flyout` with `inline` position --- docs/conf.py | 2 ++ docs/templates/versions.html | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 docs/templates/versions.html diff --git a/docs/conf.py b/docs/conf.py index 6de5f9d..83af8eb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,3 +11,5 @@ # Include all your settings here html_theme = 'sphinx_rtd_theme' + +template_path = ["templates"] diff --git a/docs/templates/versions.html b/docs/templates/versions.html new file mode 100644 index 0000000..068a428 --- /dev/null +++ b/docs/templates/versions.html @@ -0,0 +1,4 @@ +{% extends "!versions.html" %} +{% if READTHEDOCS %} + +{% endif %} From be2303c166300a24c28856325b2405fccefece8d Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:27:07 +0100 Subject: [PATCH 02/13] Update versions --- docs/templates/versions.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/templates/versions.html b/docs/templates/versions.html index 068a428..54cd560 100644 --- a/docs/templates/versions.html +++ b/docs/templates/versions.html @@ -1,4 +1,6 @@ {% extends "!versions.html" %} +

Inside versions.html

{% if READTHEDOCS %} +

Inside versions.html and READTHEDOCS conditional

{% endif %} From 9f4fd9fd7aa03cc76650b5d630128bf534601203 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:31:06 +0100 Subject: [PATCH 03/13] Latest theme version --- docs/index.rst | 1 - requirements.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index d14d6c1..320d0b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,6 @@ Sphinx configuration file used to build this docs (:doc:`see full file `), .. literalinclude:: conf.py :language: python - :end-before: ########################################################################### :linenos: ---- diff --git a/requirements.txt b/requirements.txt index 0df9e9f..bf36739 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ sphinx-autorun -sphinx-rtd-theme>=3.0.0rc2 +sphinx-rtd-theme From 4ade5025515351ec5753d86d7948b67046b332cb Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:33:04 +0100 Subject: [PATCH 04/13] rename the folder --- docs/{templates => .templates}/versions.html | 0 docs/conf.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/{templates => .templates}/versions.html (100%) diff --git a/docs/templates/versions.html b/docs/.templates/versions.html similarity index 100% rename from docs/templates/versions.html rename to docs/.templates/versions.html diff --git a/docs/conf.py b/docs/conf.py index 83af8eb..228f902 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,4 +12,4 @@ # Include all your settings here html_theme = 'sphinx_rtd_theme' -template_path = ["templates"] +template_path = [".templates"] From c2333ffe928e15aca535728972640197e0344a35 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:36:11 +0100 Subject: [PATCH 05/13] Explicit position on page --- docs/index.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 320d0b0..79b741b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,6 +3,11 @@ test-builds GitHub repository to test different Read the Docs builds scenarios. +.. raw:: html + + + + ---- Read the Docs configuration file used to build this docs: From 22202d12265ed63da660ac5dd452121b710c7da8 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:46:32 +0100 Subject: [PATCH 06/13] Typo in setting --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 228f902..ad29ce7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,4 +12,4 @@ # Include all your settings here html_theme = 'sphinx_rtd_theme' -template_path = [".templates"] +templates_path = [".templates"] From d9e4d6881df42f36e9606eeb2169427b9826789f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:48:39 +0100 Subject: [PATCH 07/13] Name --- docs/index.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 79b741b..9abbe17 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,12 +1,7 @@ -test-builds -=========== - -GitHub repository to test different Read the Docs builds scenarios. - -.. raw:: html - - +Explicit flyout +=============== +Use an explicit ``readthedocs-flyout`` HTML element with ``position="inline"``. ---- From 888eaf176fa44dd753d8d0844887068d1cadb6be Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:53:02 +0100 Subject: [PATCH 08/13] Use a different name --- docs/{.templates => _templates}/versions.html | 0 docs/conf.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/{.templates => _templates}/versions.html (100%) diff --git a/docs/.templates/versions.html b/docs/_templates/versions.html similarity index 100% rename from docs/.templates/versions.html rename to docs/_templates/versions.html diff --git a/docs/conf.py b/docs/conf.py index ad29ce7..4ce138e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,4 +12,4 @@ # Include all your settings here html_theme = 'sphinx_rtd_theme' -templates_path = [".templates"] +templates_path = ["_templates"] From fc7186ba989373a6a0851dd6186112e52d7e1a38 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 13:53:22 +0100 Subject: [PATCH 09/13] Do not extend an empty file --- docs/_templates/versions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html index 54cd560..6c64fec 100644 --- a/docs/_templates/versions.html +++ b/docs/_templates/versions.html @@ -1,5 +1,5 @@ -{% extends "!versions.html" %}

Inside versions.html

+ {% if READTHEDOCS %}

Inside versions.html and READTHEDOCS conditional

From 0e1bc806e729970f24f2d4cccf645caf33b6c374 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 14:00:20 +0100 Subject: [PATCH 10/13] Use `extra_nav` position --- docs/_templates/layout.html | 4 ++++ docs/_templates/versions.html | 6 ------ requirements.txt | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 docs/_templates/layout.html delete mode 100644 docs/_templates/versions.html diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 0000000..11d205a --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,4 @@ +{% extends "!layout.html" %} +{% block extra_nav %} + +{% endblock %} diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html deleted file mode 100644 index 6c64fec..0000000 --- a/docs/_templates/versions.html +++ /dev/null @@ -1,6 +0,0 @@ -

Inside versions.html

- -{% if READTHEDOCS %} -

Inside versions.html and READTHEDOCS conditional

- -{% endif %} diff --git a/requirements.txt b/requirements.txt index bf36739..49b1724 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ sphinx-autorun -sphinx-rtd-theme +sphinx-rtd-theme @ git+https://github.com/readthedocs/sphinx_rtd_theme@humitos/flyout-nav From 276d2b52ab6a367d66ca813469687868e725d7b6 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 14:04:38 +0100 Subject: [PATCH 11/13] Use the correct block --- docs/_templates/layout.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 11d205a..52e6f69 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,4 +1,5 @@ {% extends "!layout.html" %} -{% block extra_nav %} +{% block navigation %} +{{ super () }} {% endblock %} From f440294cdfc68c5195923a8234952eea878f5024 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 14:07:56 +0100 Subject: [PATCH 12/13] change name --- docs/_templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 52e6f69..1fb118a 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,5 +1,5 @@ {% extends "!layout.html" %} -{% block navigation %} +{% block extranavigation %} {{ super () }} {% endblock %} From 4d35d433de00c286caf4ef6b58d11582c26b862d Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Jan 2025 15:52:37 +0100 Subject: [PATCH 13/13] remove overrides --- docs/_templates/layout.html | 5 ----- docs/conf.py | 2 -- 2 files changed, 7 deletions(-) delete mode 100644 docs/_templates/layout.html diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index 1fb118a..0000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "!layout.html" %} -{% block extranavigation %} -{{ super () }} - -{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 4ce138e..6de5f9d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,5 +11,3 @@ # Include all your settings here html_theme = 'sphinx_rtd_theme' - -templates_path = ["_templates"]