-
Notifications
You must be signed in to change notification settings - Fork 38
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
Setup tokenization for Material for MkDocs search #264
Comments
https://www.mkdocs.org/user-guide/configuration/#separator I think mkdocs.yml change would fix this: plugins:
- search:
separator: '[\s\-.:]+'
min_search_length: 2 |
The key term I need was
Footnotes |
workarounds:javaLTSVersions
Bless you! What a beauty 🤣 |
Make sure to test thoroughly because that "case change" part might mess things up. Is there a way to deploy the website into public URL but not prod to test before merge? |
Only via dev server from local / codespaces or gitpod |
I copy/pasted the example code into a branch: plugins:
- search:
separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' This makes the search match too much. The search prediction also shows too much. So just copy/pasting things is right out. 😄 I don't understand this, so I'll let one of you regex wizards fix this problem. 😉 |
Can you give an example of "too much" please (screenshot) |
Hmm, I can't reproduce my problem with the example search tokenization anymore. Maybe the upstream fixed something, or I was messing things up. 😄 Here's my branch: https://github.com/HonkingGoose/renovatebot.github.io/tree/search-tokens You can check it out with GitHub Codespaces, or use Gitpod to test things yourself. 😉 |
Btw, I fully understand this regex, the question is what requirements do you want. What are reasonable token-separators for Renovate? Tokenization simply splits along these characters / magical places. The options are (from left to right from the above
Please check/edit the ones above you want to keep and I'll refine the regex. I put my reasons why it should/shouldn't be included. |
After going through the above exercise it looks like all of them are useful for something, maybe even case change if Tip, you can experiment with the regex at https://regex101.com/r/VflcWH/1 |
Yes, it's called Vercel. 😜 I use Vercel to host a small docs site, and I get a link to a public preview URL on each pull request. Makes it really easy to click around and prod things until I'm happy things work. Vercel can cost money though, once you exceed certain limits of the free tier. It's for the maintainers to decide if they want to spend time/money switching from GitHub Pages to Vercel.
Lucky you, I never managed to get far with learning regex, it just looks like gibberish to me. I'd rather click and type around in the development server preview and see how the search behaves with real data. 😄 For me the big things are that you should be able to find the presets when searching for them, either by their full name or parts of their name. |
Make sure #265 doesn't close this issue when it's merged. I reported the problem upstream: squidfunk/mkdocs-material#4884 |
Thank you for reporting the problem upstream. ❤️ This issue should remain open, I'm not using any |
So this will be fixed as soon as Renovatebot picks up the new patch, right? |
We should test the new behavior after applying the latest patch for Material for MkDocs. Then we know if the search is fixed now. |
the update is currently pending because of stability days |
Confirmed, I think we can close this as fixed by squidfunk/mkdocs-material#4884 (comment) via 294979e. |
Closed by upstream issue: |
What browser are you using?
Firefox
Other browser name
No response
Describe the bug
I can't find the presets via the Material for MkDocs search.
Steps to reproduce
workarounds:javaLTSVersions
in the search barworkarounds:javaLTSVersions
as the heading title: https://docs.renovatebot.com/presets-workarounds/#workaroundsjavaltsversionsAdditional context
@viceice thinks the
:
character breaks the search somehow.Related issue:
The text was updated successfully, but these errors were encountered: