From ddf29edfd6fb858fbcc2bc3142b7bc53b2f1b51c Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 27 May 2025 14:48:17 +0200 Subject: [PATCH 1/5] fix: json fetch of extra libs --- .../theme/ansys_sphinx_theme/static/js/search-main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js index 0b472ae0b..ed66921e7 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js @@ -136,8 +136,9 @@ require(["fuse"], function (Fuse) { if (!libData) { const libPath = EXTRA_SOURCES[lib]; - const libJsonPath = `${libPath}/_static/search.json`; - const res = await fetch(libJsonPath); + const url = `${libPath}/_static/search.json`; + console.log(`Fetching library search data from: ${url}`); + const res = await fetch(url); libData = await res.json(); await saveToIDB(cacheKey, libData); } From 8dcb815bbef3110696c4d58d51da3b1676c1a984 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 27 May 2025 12:49:50 +0000 Subject: [PATCH 2/5] chore: adding changelog file 707.fixed.md [dependabot-skip] --- doc/changelog.d/707.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/707.fixed.md diff --git a/doc/changelog.d/707.fixed.md b/doc/changelog.d/707.fixed.md new file mode 100644 index 000000000..f5f52d3ed --- /dev/null +++ b/doc/changelog.d/707.fixed.md @@ -0,0 +1 @@ +url for fetch extra source file \ No newline at end of file From 0fb29e2695c72be48b439f8fe30ee5a46949f3bc Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 27 May 2025 14:56:41 +0200 Subject: [PATCH 3/5] fix: url --- doc/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 578813218..dd86c88c1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -69,8 +69,8 @@ }, "logo": "ansys", "search_extra_sources": { - "PyDPF Core": "https:/dpf.docs.pyansys.com/version/stable/", - "Actions": "https://actions.docs.ansys.com/version/stable/", + "PyAnsys": "https://docs.pyansys.com/version/stable", + "Actions": "https://actions.docs.ansys.com/version/stable", }, "search_filters": { "User Guide": [ From c76a5e821db446b5da022a294c9139f85e416feb Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 27 May 2025 14:58:01 +0200 Subject: [PATCH 4/5] fi: remove all search results --- .../theme/ansys_sphinx_theme/static/js/search-main.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js index ed66921e7..40787e066 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js @@ -47,7 +47,6 @@ function openDB(name = "search-cache", version = 1) { */ async function getFromIDB(key) { const db = await openDB(); - console.log(`Retrieving from IndexedDB with key: ${key}`); return new Promise((resolve, reject) => { const transaction = db.transaction("indexes", "readonly"); @@ -55,12 +54,10 @@ async function getFromIDB(key) { const request = store.get(key); request.onsuccess = () => { - console.log("Retrieved from IndexedDB:", request.result); resolve(request.result); }; request.onerror = () => { - console.error("Failed to retrieve from IndexedDB:", request.error); reject(request.error); }; }); @@ -74,7 +71,6 @@ async function getFromIDB(key) { */ async function saveToIDB(key, value) { const db = await openDB(); - console.log(`Saving to IndexedDB with key: ${key}`, value); return new Promise((resolve, reject) => { const transaction = db.transaction("indexes", "readwrite"); @@ -82,7 +78,6 @@ async function saveToIDB(key, value) { const request = store.put(value, key); request.onsuccess = () => { - console.log("Saved to IndexedDB successfully"); resolve(true); }; @@ -137,7 +132,6 @@ require(["fuse"], function (Fuse) { if (!libData) { const libPath = EXTRA_SOURCES[lib]; const url = `${libPath}/_static/search.json`; - console.log(`Fetching library search data from: ${url}`); const res = await fetch(url); libData = await res.json(); await saveToIDB(cacheKey, libData); @@ -465,7 +459,6 @@ require(["fuse"], function (Fuse) { const handleSearchInput = debounce( () => { const query = document.getElementById("search-input").value.trim(); - console.log("Search query:", query); if (query.length > 0) { performSearch(); } From 79e183f448e66b218b3a04002c1a7bf0b53c0eb5 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 27 May 2025 15:00:34 +0200 Subject: [PATCH 5/5] fix: url --- doc/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index dd86c88c1..cc50f5b5c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -69,8 +69,8 @@ }, "logo": "ansys", "search_extra_sources": { - "PyAnsys": "https://docs.pyansys.com/version/stable", - "Actions": "https://actions.docs.ansys.com/version/stable", + "PyAnsys": "https://docs.pyansys.com/version/stable/", + "Actions": "https://actions.docs.ansys.com/version/stable/", }, "search_filters": { "User Guide": [