Skip to content

Commit

Permalink
Fix algolia search
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Jul 26, 2023
1 parent 406f648 commit eb1a7b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ github: go-gorm/gorm
disqus_shortname: gormv2
algolia:
en:
api_key: 442683d88a109de42c6d01bb0c7c4cec
api_id: JYXXHPAUK9
api_key: ad3389ae8a371cb188bdee098516769c
index_name: gorm
google_tag_manager: GTM-WSNPD75

Expand Down
9 changes: 5 additions & 4 deletions themes/navy/layout/partial/after_footer.swig
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
{% endif %}
<!-- Algolia -->
{% if config.algolia[page.lang] %}
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript">
document.getElementById('search-input-wrap').classList.add('on');
docsearch({
apiKey: '{{ config.algolia[page.lang].api_key }}',
indexName: '{{ config.algolia[page.lang].index_name }}',
inputSelector: '#search-input'
appId: '{{ config.algolia[page.lang].api_id }}',
apiKey: '{{ config.algolia[page.lang].api_key }}',
indexName: '{{ config.algolia[page.lang].index_name }}',
inputSelector: '#search-input'
});
</script>
{% endif %}
Expand Down

0 comments on commit eb1a7b7

Please sign in to comment.