Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Algolia docsearch #669

Merged
2 commits merged into from Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions templates/_algolia.html
@@ -0,0 +1,8 @@
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
 apiKey: '0241ef4553148339721381e68044f60f',
 indexName: 'resin_io',
 inputSelector: 'input[name=searchTerm]',
 debug: true // Set debug to true if you want to inspect the dropdown
});
</script>
3 changes: 3 additions & 0 deletions templates/default.html
Expand Up @@ -12,6 +12,8 @@
{% if excerpt %}<meta property="og:description" content="{{ excerpt }}" />{% endif %}
<meta property="og:image" content="{{ baseUrl }}{% if thumbnail %}{{ thumbnail }}{% else %}{{ defaultThumbnail }}{% endif %}" />
<link rel="stylesheet" href="/dist/style.css">
<!-- Algolia search styles -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
</head>
<body data-spy="scroll" data-target=".in-page-nav">
<noscript>
Expand Down Expand Up @@ -63,5 +65,6 @@
</div>
<script src="/dist/main.js"></script>
{% include "_track.html" %}
{% include "_algolia.html" %}
</body>
</html>