Skip to content

Search #166

@Fil

Description

@Fil

For mid- to large projects, we'll need search; like vitepress we could build a search index with minisearch.

Design considerations:

  • Indexing happens in a data loader
  • Search happens on the client
    • we're careful not to download the index before the user shows an intent to search (e.g. first char typed in the search input, or on focus)
  • We want command-K to open the sidebar (if it isn't already) and focus the new search input.
  • Typing shows a list of matching pages; maybe with some kind of "relevance score"?
  • Is this a modal or a new page?
  • A URL such as /search?{query} would be helpful to make it possible to share and program a browser shortcut
  • Getting content snippets is possible, would be nice to have.
  • How to keep the contents relatively fresh in preview?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions