mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
feat(v2): Algolia search theme (#1440)
* feat(v2): Algolia search plugin * patch PR #1440 (#1441) * alternative implementation * typo * refactor noop * rename SearchAlgolia -> SearchBar * changes.md
This commit is contained in:
parent
8aef4ec791
commit
384fd5708f
14 changed files with 116 additions and 44 deletions
27
packages/docusaurus-theme-search-algolia/src/index.js
Normal file
27
packages/docusaurus-theme-search-algolia/src/index.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const DEFAULT_OPTIONS = {};
|
||||
|
||||
class DocusaurusThemeSearchAlgolia {
|
||||
constructor(context, opts) {
|
||||
this.options = {...DEFAULT_OPTIONS, ...opts};
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
getName() {
|
||||
return 'docusaurus-theme-search-algolia';
|
||||
}
|
||||
|
||||
getThemePath() {
|
||||
return path.resolve(__dirname, './theme');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DocusaurusThemeSearchAlgolia;
|
Loading…
Add table
Add a link
Reference in a new issue