facebook / facebook/docusaurus
`getMissingResultsUrl` not supported by algolia options in docusaurus config
- Lenguaje dominante
- TypeScript
- Estrellas
- 66.2k
- Forks
- 10k
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 52
Descripción
### Have you read the Contributing Guidelines on issues?
- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
### Prerequisites
- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).
### Description
Hello there!
I'm trying to add a message at the bottom of Algolia search results that prompts the user to open a GitHub issue if no results are found. The [Docusaurus documentation](https://docusaurus.io/docs/search#customizing-the-algolia-search-behavior) pointed me to the [Algolia DocSearch documentation](https://docsearch.algolia.com/docs/api/#getmissingresultsurl) which references a `getMissingResultsUrl` option. That option isn't available on the [algolia config type](https://github.com/facebook/docusaurus/blob/9c0e19c669ffcbc0972bfd8527e8b93f1f74e7d8/packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts#L12) but I tried anyway as I thought it might still work.
Unfortunately, it doesn't. So I'm guessing the search component used inside Docusaurus doesn't take this option into account.
### Reproducible demo
https://stackblitz.com/edit/github-kv4zyn?file=docusaurus.config.ts
### Steps to reproduce
1. Update `algolia.appId` and `algolia.apiKey` with valid values
2. Use the search functionality to find something that doesn't exist (I use `thisissomethingthatdoesntexist`)
3. See that a "missing results" blurb is not present (as seen [here](https://docsearch.algolia.com/docs/api/#getmissingresultsurl))
### Expected behavior
The "missing results" blurb should be visible and editable.
### Actual behavior
There is no "missing results" sentence, nor does one appear if the `getMissingResultsUrl` option is set.
### Your environment
_No response_
### Self-service
- [ ] I'd be willing to fix this bug myself.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.