Skip to content

Algolia search results page: handle docs multi-instance + contextual search #3590

@slorber

Description

@slorber

🐛 Bug Report

https://v2.docusaurus.io/search/?q=doc

The Algolia search results page has currently a few problems:

I consider this bug low-priority, as:

  • it keeps working fine for many sites without multi-instance (or with only one instance being versioned, like D2 website)
  • this page is likely not used often
  • might not be trivial to solve work, for little ROI

Notes for when we'll fix this:

  • We should make the SearchPage in Algolia being decoupled from the theme, so that it can be used with new themes too, that won't be based on Infima. (Algolia theme would provide the search behavior, but the "parent" theme will provide the styling of the page)

  • We should remove the legacy useVersioning() hook in favor of the hooks provided by useDocs.ts, as we can retrieve more info (like version labels) with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondifficulty: advancedIssues that are complex, e.g. large scoping for long-term maintainability.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions