Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adicionando configuração básica para busca.
- Loading branch information
1 parent
d884ad3
commit e8fa190
Showing
4 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "jekyll" | ||
gem "jekyll-gist" | ||
gem 'jekyll', '~> 3.6' | ||
gem "jekyll-gist" | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-algolia' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- Including InstantSearch.js library and styling --> | ||
<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch.min.js"></script> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch.min.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch-theme-algolia.min.css"> | ||
|
||
<script> | ||
// Instanciating InstantSearch.js with Algolia credentials | ||
const search = instantsearch({ | ||
appId: '{{ site.algolia.application_id }}', | ||
indexName: '{{ site.algolia.index_name }}', | ||
apiKey: '{{ site.algolia.search_only_api_key }}' | ||
}); | ||
|
||
// Adding searchbar and results widgets | ||
|
||
search.addWidget( | ||
instantsearch.widgets.searchBox({ | ||
container: '#search-searchbar', | ||
placeholder: 'Buscar no Colaboradados...', | ||
poweredBy: true // This is required if you're on the free Community plan | ||
}) | ||
); | ||
|
||
search.addWidget( | ||
instantsearch.widgets.hits({ | ||
container: '#search-hits' | ||
}) | ||
); | ||
|
||
// Starting the search | ||
search.start(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters