Skip to content

Commit

Permalink
Merge pull request #1446 from pnbrown/search-update
Browse files Browse the repository at this point in the history
Update docsearch to v3
  • Loading branch information
cfryanr authored Apr 4, 2023
2 parents 03a2d60 + a7b4e65 commit e66406f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions site/themes/pinniped/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
<style>
.DocSearch-Button{
margin: 0px;
}
</style>
</head>
<body>
{{ partial "header" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@docsearch/js@3/dist/umd/index.js"></script>
<script type="text/javascript"> docsearch({
appId: 'FYQE1VJB02',
apiKey: '826ac6c64f20d5e00a72a0599cf76177',
apiKey: 'ed11fcea9e709eb58558e949c2303491',
indexName: 'pinniped',
inputSelector: '.docsearch-input',
container: '#docsearch-div',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion site/themes/pinniped/layouts/partials/docs-sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="side-nav">
<form class="d-flex align-items-center">
<form class="d-flex align-items-center" id="docsearch-div">
<span class="algolia-autocomplete" style="position: relative; display: inline-block; direction: ltr;">
<input type="search" class="form-control docsearch-input" id="search-input" placeholder="Search..."
aria-label="Search for..." autocomplete="off" spellcheck="false" role="combobox"
Expand Down

0 comments on commit e66406f

Please sign in to comment.