From 278584fa27056b6e59622dc8818e4e578d7e00b7 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 8 Oct 2023 21:20:31 +0200
Subject: [PATCH] feat(doc): Add rtd search extension
Provides real-time search on readthedocs
Ref: https://readthedocs-sphinx-search.readthedocs.io
---
doc/conf.py | 5 +++++
doc/requirements.txt | 1 +
2 files changed, 6 insertions(+)
diff --git a/doc/conf.py b/doc/conf.py
index c1f369c1..b780f82d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -88,6 +88,11 @@ extensions = [
"sphinx.ext.extlinks",
]
+# The search extension works only on readthedocs
+# See https://readthedocs-sphinx-search.readthedocs.io
+if on_rtd:
+ extensions.append("sphinx_search.extension")
+
# Add any paths that contain templates here, relative to this directory.
templates_path = [doc_path + '/_templates']
diff --git a/doc/requirements.txt b/doc/requirements.txt
index e1a4488f..f31b40c3 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1 +1,2 @@
sphinx-rtd-theme~=1.3.0
+readthedocs-sphinx-search~=0.3.1