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

getMissingResultsUrl not supported by algolia options in docusaurus config #10737

Open
6 of 7 tasks
jharrell opened this issue Dec 2, 2024 · 0 comments
Open
6 of 7 tasks
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers

Comments

@jharrell
Copy link

jharrell commented Dec 2, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and 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

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 pointed me to the Algolia DocSearch documentation which references a getMissingResultsUrl option. That option isn't available on the algolia config type 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)

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.
@jharrell jharrell added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 2, 2024
@jharrell jharrell changed the title not supported by algolia options in docusaurus config getMissingResultsUrl not supported by algolia options in docusaurus config Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant