From aa675cef51cc7d340d31cd9c3beb50e790b881e9 Mon Sep 17 00:00:00 2001 From: Anne Chew Date: Wed, 24 Jun 2026 21:04:59 +0800 Subject: [PATCH] feature: add sphinx-unified-search Signed-off-by: Anne Chew --- docs/conf.py | 17 +++++++++++++++++ docs/requirements.txt | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 8136259..4d75485 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -292,6 +292,7 @@ "sphinx_last_updated_by_git", "sphinx.ext.intersphinx", "sphinx_sitemap", + "sphinx_unified_search", ] # Excludes files or directories from processing @@ -358,3 +359,19 @@ if "discourse_prefix" not in html_context and "discourse" in html_context: html_context["discourse_prefix"] = html_context["discourse"] + "/t/" + +# sphinx-unified-search configuration +unified_search_projects = [ + { + "name": "Landscape", + "base_url": "https://documentation.ubuntu.com/landscape/", + "searchindex_url": + "https://documentation.ubuntu.com/landscape/searchindex.js", + }, + { + "name": "Pebble", + "base_url": "https://ubuntu.com/docs/pebble/", + "searchindex_url": + "https://ubuntu.com/docs/pebble/searchindex.js", + }, +] diff --git a/docs/requirements.txt b/docs/requirements.txt index caaa865..ec502c1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -30,3 +30,7 @@ sphinx-sitemap # Vale dependencies rst2html vale + +git+https://github.com/canonical/sphinx-unified-search.git@main +#git+ssh://git@github.com/canonical/sphinx-unified-search.git@27f554973f3cd2170586e386709882e2ad98783b +#-e ../../sphinx-unified-search \ No newline at end of file