Skip to content

Commit 5d3507b

Browse files
fix: url for fetch extra source file (#707)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 24c568d commit 5d3507b

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

doc/changelog.d/707.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
url for fetch extra source file

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"logo": "ansys",
7171
"search_extra_sources": {
72-
"PyDPF Core": "https:/dpf.docs.pyansys.com/version/stable/",
72+
"PyAnsys": "https://docs.pyansys.com/version/stable/",
7373
"Actions": "https://actions.docs.ansys.com/version/stable/",
7474
},
7575
"search_filters": {

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/js/search-main.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,17 @@ function openDB(name = "search-cache", version = 1) {
4747
*/
4848
async function getFromIDB(key) {
4949
const db = await openDB();
50-
console.log(`Retrieving from IndexedDB with key: ${key}`);
5150

5251
return new Promise((resolve, reject) => {
5352
const transaction = db.transaction("indexes", "readonly");
5453
const store = transaction.objectStore("indexes");
5554
const request = store.get(key);
5655

5756
request.onsuccess = () => {
58-
console.log("Retrieved from IndexedDB:", request.result);
5957
resolve(request.result);
6058
};
6159

6260
request.onerror = () => {
63-
console.error("Failed to retrieve from IndexedDB:", request.error);
6461
reject(request.error);
6562
};
6663
});
@@ -74,15 +71,13 @@ async function getFromIDB(key) {
7471
*/
7572
async function saveToIDB(key, value) {
7673
const db = await openDB();
77-
console.log(`Saving to IndexedDB with key: ${key}`, value);
7874

7975
return new Promise((resolve, reject) => {
8076
const transaction = db.transaction("indexes", "readwrite");
8177
const store = transaction.objectStore("indexes");
8278
const request = store.put(value, key);
8379

8480
request.onsuccess = () => {
85-
console.log("Saved to IndexedDB successfully");
8681
resolve(true);
8782
};
8883

@@ -136,8 +131,8 @@ require(["fuse"], function (Fuse) {
136131

137132
if (!libData) {
138133
const libPath = EXTRA_SOURCES[lib];
139-
const libJsonPath = `${libPath}/_static/search.json`;
140-
const res = await fetch(libJsonPath);
134+
const url = `${libPath}/_static/search.json`;
135+
const res = await fetch(url);
141136
libData = await res.json();
142137
await saveToIDB(cacheKey, libData);
143138
}
@@ -464,7 +459,6 @@ require(["fuse"], function (Fuse) {
464459
const handleSearchInput = debounce(
465460
() => {
466461
const query = document.getElementById("search-input").value.trim();
467-
console.log("Search query:", query);
468462
if (query.length > 0) {
469463
performSearch();
470464
}

0 commit comments

Comments
 (0)