'r pkgdown docsearch algolia
I am having trouble understanding how to implement the docsearch snippet into my github pages (I am using bootstrap 3).
From the package documentation:
Once you have published your pkgdown website, submit the pkgdown site URL to Docsearch. DONE
Put the value of the apiKey and indexName parameters into your site _pkgdown.yml. DONE
Given my lack of knowledge, I am now having hard time understanding this.
The Docsearch\Algolia emailed me:
CSS
Copy this snippet at the end of the HTML
headtag
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@alpha"/></pre></li>
JavaScript
Copy this snippet at the end of the HTML
bodytag
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@alpha"></script>
<script type="text/javascript">
docsearch({
appId: xxxxxx,
apiKey: xxxxxx,
indexName: xxxxxx,
container: '### REPLACE ME WITH A CONTAINER (e.g. div) ###'
debug: false // Set debug to true if you want to inspect the modal
});
</script>
QUESTION: Shall I copy these snippets on every html page generated by pkgdown or there is an automatic way to do so?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
