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

feat(v2): introduce DocSearch v3 search #2815

Merged
merged 38 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6d0ceca
feat(v2): introduce DocSearch v3 search
francoischalifour May 20, 2020
d1731a8
chore(deps): update @docsearch/react
francoischalifour Jun 8, 2020
1e8480c
refactor: use arrow functions in callbacks
francoischalifour Jun 8, 2020
f5df74d
fix: display warning when `algolia` config is missing
francoischalifour Jun 8, 2020
c98d9a0
feat: add link to search page
francoischalifour Jun 8, 2020
ed39115
chore: delete unused style file
francoischalifour Jun 8, 2020
4eb14b3
feat(website): specify DocSearch primary color
francoischalifour Jun 8, 2020
032d937
fix(search): add "all" word
francoischalifour Jun 8, 2020
9b15f40
feat(search): add `generateSearchPageHref` hook
francoischalifour Jun 8, 2020
9f4d94f
chore(deps): update @docsearch/react
francoischalifour Jun 8, 2020
f64dd58
Merge branch 'master' into feat/algolia-docsearch-v3
francoischalifour Jun 8, 2020
67db280
fix(website): remove `hitsPerPage` search parameter
francoischalifour Jun 8, 2020
6406074
fix(search): use `baseUrl`
francoischalifour Jun 8, 2020
c2e1c5b
fix(search): rename `generateSearchPageLink`
francoischalifour Jun 8, 2020
896ef01
Merge branch 'master' into feat/algolia-docsearch-v3
francoischalifour Jun 11, 2020
ab79fb9
fix(search): fix scroll position on mobile
francoischalifour Jun 11, 2020
0f6f1ce
fix(search): update query on URL change
francoischalifour Jun 16, 2020
70c5c6e
fix(search): close DocSearch modal on See More click
francoischalifour Jun 16, 2020
eb971f4
refactor(search): use `useSearchQuery` to update query from URL
francoischalifour Jun 16, 2020
6d0fc05
feat(search): support `/` keyboard shortcut
francoischalifour Jul 1, 2020
34af5e1
Merge remote-tracking branch 'upstream/master' into feat/algolia-docs…
francoischalifour Jul 1, 2020
1a387be
fix(search): forward Algolia config to DocSearch
francoischalifour Jul 20, 2020
33e73b0
chore(search): update `@docsearch/react`
francoischalifour Jul 20, 2020
f7fbd20
fix(search): encode search value to search page
francoischalifour Jul 20, 2020
82f1bc4
Merge remote-tracking branch 'upstream/master' into feat/algolia-docs…
francoischalifour Jul 20, 2020
875c046
fix(search): use `withBaseUrl` on links
francoischalifour Jul 20, 2020
22af329
feat(search): attach Docusaurus version to user agents
francoischalifour Jul 20, 2020
050e074
Merge remote-tracking branch 'upstream/master' into feat/algolia-docs…
francoischalifour Jul 21, 2020
d0df2d9
docs(docsearch): update DocSearch section
francoischalifour Jul 22, 2020
997cb8d
chore(deps): update @docsearch/react
francoischalifour Jul 22, 2020
1a7450e
feat(search): apply search styles to website
francoischalifour Jul 22, 2020
622889b
docs(search): update DocSearch doc
francoischalifour Jul 23, 2020
22c34fd
chore(deps): update @docsearch/react
francoischalifour Jul 23, 2020
d8c7812
Merge remote-tracking branch 'upstream/master' into feat/algolia-docs…
francoischalifour Jul 23, 2020
c3565c8
chore: update lock file
francoischalifour Jul 23, 2020
52c53da
chore(deps): update algoliasearch
francoischalifour Jul 23, 2020
9be30d6
fix(website): remove special character in CSS
francoischalifour Jul 23, 2020
b42e7e5
docs(search): remove special character in CSS
francoischalifour Jul 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-search-algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
},
"license": "MIT",
"dependencies": {
"algoliasearch": "^3.24.5",
"@docsearch/react": "^1.0.0-alpha.24",
"algoliasearch": "^4.0.0",
"algoliasearch-helper": "^3.1.1",
"clsx": "^1.1.1",
"docsearch.js": "^2.6.3",
"eta": "^1.1.1"
},
"peerDependencies": {
Expand Down
20 changes: 0 additions & 20 deletions packages/docusaurus-theme-search-algolia/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@ module.exports = function (context) {
return [pagePath];
},

configureWebpack() {
// Ensure that algolia docsearch styles is its own chunk.
return {
optimization: {
splitChunks: {
cacheGroups: {
algolia: {
name: 'algolia',
test: /algolia\.css$/,
chunks: `all`,
enforce: true,
// Set priority higher than docusaurus single-css extraction.
priority: 60,
},
},
},
},
};
},

async contentLoaded({actions: {addRoute}}) {
addRoute({
path: normalizeUrl([baseUrl, 'search']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ function Search() {
makeSearch(searchResultState.lastPage);
}, [searchResultState.lastPage]);

useEffect(() => {
if (searchValue && searchValue !== searchQuery) {
setSearchQuery(searchValue);
}
}, [searchValue]);

return (
<Layout title={getTitle()}>
<div className="container margin-vert--lg">
Expand Down

This file was deleted.

Loading