Skip to content

Commit

Permalink
Clean up pagefind and docs bot code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrt134 committed Nov 26, 2024
1 parent 5051447 commit 4d6eb88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
19 changes: 0 additions & 19 deletions layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,6 @@ <h2>{{ i18n "nav_navigation" }}</h2>
});
</script>

<!-- Add URI Checker for DocsBot Visibility -->
<script>
// Function to get the value of a query parameter by name
function getSearchQueryParam(param) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(param);
}

// Event listener after DocsBot Init
window.DocsBotAI.then(function() {
const paramValue = getSearchQueryParam('showsearch');
if (paramValue) {
const aibutton = document.getElementById("chatbot-button-icon");
// Trigger a click event on the button
aibutton.click();
}
});
</script>
<!-- End URI Checker for DocsBot Visibility -->
<section class="gdoc-nav--main">
{{ if .Site.Params.GeekdocMenuBundle }}
{{ partial "menu-bundle" (dict "current" . "source" .Site.Data.menu.main.main) }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/search-form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
<script src="/pagefind/pagefind-ui.js"></script>
<link href="https://www.truenas.com/docs/pagefind/pagefind-ui.css" rel="stylesheet">
<script src="https://www.truenas.com/docs/pagefind/pagefind-ui.js"></script>
<style>

.absolute-center {
Expand Down

0 comments on commit 4d6eb88

Please sign in to comment.