From 350328eec6e6929117563ee07e37366cc0c1fda1 Mon Sep 17 00:00:00 2001 From: DLS Jenkins Date: Thu, 18 Jul 2024 01:59:10 +0100 Subject: [PATCH] htdocs update --- _static/searchtools.js | 7 ++++--- acknowledgements.html | 2 +- background.html | 2 +- comments.html | 2 +- genindex.html | 2 +- index.html | 2 +- installation.html | 2 +- insulin_tutorial.html | 2 +- introduction.html | 2 +- introductory_example.html | 2 +- license.html | 2 +- multi_crystal.html | 2 +- parameters.html | 2 +- program_output.html | 2 +- quick_start.html | 2 +- release_notes.html | 2 +- search.html | 2 +- searchindex.js | 2 +- serial_crystallography.html | 2 +- using_xia2.html | 2 +- xia2-ssx-dose-series.html | 2 +- xia2-ssx-geometry-refinement.html | 2 +- 22 files changed, 25 insertions(+), 24 deletions(-) diff --git a/_static/searchtools.js b/_static/searchtools.js index 92da3f8..b08d58c 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -178,7 +178,7 @@ const Search = { htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - for (const removalQuery of [".headerlinks", "script", "style"]) { + for (const removalQuery of [".headerlink", "script", "style"]) { htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); } if (anchor) { @@ -328,13 +328,14 @@ const Search = { for (const [title, foundTitles] of Object.entries(allTitles)) { if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score, + score + boost, filenames[file], ]); } diff --git a/acknowledgements.html b/acknowledgements.html index 1ab0200..3f3018f 100644 --- a/acknowledgements.html +++ b/acknowledgements.html @@ -88,7 +88,7 @@

Acknowledgements +