Skip to content

Commit

Permalink
algolia docsearch v3
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk committed May 30, 2023
1 parent 6d9a3c4 commit ce9aef1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 41 deletions.
4 changes: 4 additions & 0 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
{% endunless %} {% endfor %}
</ul>
</div>

<!-- algolia docsearch https://docsearch.algolia.com/docs/docsearch-v3/ -->
<div id="docsearch"></div>

</div>
</nav>
</header>
50 changes: 9 additions & 41 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,15 @@
<link href="/css/neovim-hi.css" rel="stylesheet">
<link rel="canonical" href="{{ site.url }}{% if page.canonical_url %}{{ page.canonical_url }}{% else %}{{ page.url }}{% endif %}" />

<!-- v3 -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" /> -->
<!-- legacy -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- algolia docsearch https://docsearch.algolia.com/docs/docsearch-v3/ -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
<link rel="preconnect" href="https://X185E15FPG-dsn.algolia.net" crossorigin />

</head>

<body>
testtttttttttttt
<!-- <div id="docsearch"></div> -->
<input id="docsearch"></input>

testtttttttttttt
{{ content }}

testtttttttttttt
{% include footer.html %}

{%- comment -%}Only used in bountysource{%- endcomment -%}
Expand All @@ -36,42 +30,16 @@
<script src="/js/sponsors.js"></script>
<script src="/js/bootstrap.min.js"></script>

<!-- Before the closing </body> -->
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
// Your Algolia Application ID
appId: 'R2IYF7ETH7',
// Your Search API Key
apiKey: '599cec31baffa4868cae4e79f180729b',
// The index populated by the DocSearch scraper
indexName: 'docsearch',
inputSelector: '#docsearch',
// Set debug to true to inspect the dropdown
debug: true,
});
</script>

<!--
<!-- algolia docsearch https://docsearch.algolia.com/docs/docsearch-v3/ -->
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script type="module">
import docsearch from '@docsearch/js';
import '@docsearch/css';
docsearch({
container: '#docsearch',
appId: 'R2IYF7ETH7',
apiKey: '599cec31baffa4868cae4e79f180729b',
indexName: 'docsearch',
appId: 'X185E15FPG',
apiKey: 'b5e6b2f9c636b2b471303205e59832ed',
indexName: 'nvim',
});
//docsearch({
// container: '#docsearch',
// appId: 'YOUR_APP_ID',
// indexName: 'YOUR_INDEX_NAME',
// apiKey: 'YOUR_SEARCH_API_KEY',
//});
</script>
-->

</body>
</html>

0 comments on commit ce9aef1

Please sign in to comment.