-
Notifications
You must be signed in to change notification settings - Fork 268
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
Issue 290 allow granular search by sections #301
Issue 290 allow granular search by sections #301
Conversation
Signed-off-by: weru <[email protected]>
Signed-off-by: weru <[email protected]>
Signed-off-by: weru <[email protected]>
Signed-off-by: weru <[email protected]>
This comment was marked as duplicate.
This comment was marked as duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would a visitor to that site know that the search they were executing was in context of that mainSection and not site-global?
🤔 interesting question. They wouldn't really know in most cases; at least in this current form. This implementation assumes that the user would most likely benefit from results from the section they are searching from. I would like to clarify something though. The search function has no awareness of This situation is still not quite ideal, hence 👇🏼
I think should read as " |
Ok, so with this change, would a user still be able to execute a global search if they weren't navigated to one of those sections, or does this essentially replace the current global search with section-scoped search? |
Yes, any search outside a section is a global search by default. Scope only applies within sections. For example, using |
My suggestion would be one of two following options until a more advanced search can be implemented:
@rootwork what's your suggestion here? |
Just to clarify,
The changes in this PR fix this very problem. On master, the active search scope is restrained to one
|
I see, thanks for Clarity (ha!). @rootwork what is your opinion? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good step forward, and I like making things more configurable.
@onweru if you're not ready to take on the sitewide search option right away, maybe just create an issue or a draft PR so it doesn't get forgotten, since I do think that would be good to work towards.
Signed-off-by: weru <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super minor readme change requested.
This PR fixes issue #290
Changes / fixes
Searching within a section produce results only from that section.
For example, if you have 2
mainSections
1/ vegetables 2/ fruits, searching in the fruits section will only produce results for that section.Searching outside a section will search the entire site.
For example, with the above
mainSections
setup, searching from the homepage will produce results from both sections and other pages of the site.Future implementations may include a github-like feature i.e
search all site
. This PR will leave that to a future PRScreenshots (if applicable)
(prefer animated gif)
Checklist
Ensure you have checked off the following before submitting your PR.