diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js index abbe54fe3..fa1327d60 100644 --- a/docs/_static/js/custom.js +++ b/docs/_static/js/custom.js @@ -41,7 +41,17 @@ document.addEventListener('DOMContentLoaded', (event) => { newP.innerHTML = data newDiv.insertBefore(newP, newDiv.firstChild); - }) .catch(error => { + const children = newDiv.querySelectorAll('*'); + + // Iterate over each child + children.forEach(child => { + // Check if the child has an id + if (child.id) { + // Prepend 'docs-' to the id + child.id = 'docs-' + child.id; + } + }) + }) .catch(error => { console.error('Fetch error: ' + error.message); - }); + }); })