-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
Within the Algolia configuration, one can specify a searchPagePath which allows you to designate the path of the search page. Naturally, the expectation is that any links to this search page should point to this page.
This is not the case, however, for the footer component of the search popup (pictured below). The "See all results" link instead uses the baseUrl (provided by useSearchPage. If the ${baseUrl}/search and searchPagePath are not the same path, then this link will end up being invalid.

Reproducible demo
Steps to reproduce
- Setup a docusaurus project that uses Algolia, following the instruction here
- Configure an
algolia.searchPagePaththat is different from yourbasePath - Launch your page and search for a single character in algolia Ex. "E"
- Scroll to the bottom of the results and click the "See all results" link
Expected behavior
Link should point to the search page, with the current query prefilled as the q param. Ex. https://www.my-page.com/<algolia.searchPagePath>?q=<query>
Actual behavior
Link points to the baseUrl with the path search appended, along with the current query prefilled as the q param. Ex. https://www.my-page.com/search?q=<query>.
Your environment
- Public source code: https://github.com/zuplo/docs
- Public site URL: https://zuplo.com/docs
- Docusaurus version used:
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome, latest
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Mac Osx Ventura
Self-service
- I'd be willing to fix this bug myself.
