Replies: 2 comments
-
|
Hi, and welcome! I'm confused... how this is related to Astro Docs? Did you intend to post this in the Starlight repo instead? It might be relevant to also say what you're using for the search (Pagefind, Algolia Search, etc.). I know Pagefind has a filters system but I'm not sure how this can be implemented in Starlight without overriding the components. And, if you're on Discord, do not hesitate to create a |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yep, that was my intention! Apologies! I'll post over there instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings!
I've noticed that, aside from being able to exclude a section of a page or an entire page from search results, one cannot specify when search results for certain pages are available. If a user searches for something, it will search the entire project, all at once.
This becomes an issue when a single documentation repository contains wildly different but related setups.
For example, I currently help maintain a collection of guides with multiple "sub-guides" that revolve around video game documentation.
Within the guide, there's
src/content/docs/en/main-topic/platform-pcandsrc/content/docs/en/main-topic/platform-console.Both directories contain related content and some even contain pages that are titled the same, but they are wildly different due to platform differences (PC vs console in this instance).
The problem is that, searching for a page with titles in both will give the user two results, although both pages are wildly different due to platforms.
I think restricting search results depending on currently browsed directory would improve this. For example, if a user is currently browsing pages within one folder, it will only show search results of pages within that folders. This would help immensely with Astro pages that host a wide variety of documentation that's related.
Apologies for the very awkward wording. I'm not sure how to improve it for this niche application.
Beta Was this translation helpful? Give feedback.
All reactions