-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Update material builtin plugins with patterns #7467
Conversation
Thanks for the PR. I'm still on the fence whether we want to support the material/* syntax here, since it is not necessary, and now those suggestions are popping up in the IDE. It might lead to more questions on our side (we have many non-/low-tech users), as there are now two ways to achieve the same thing. However, you can change your theme's entrypoint and list the Material plugins with your prefix, which doesn't mandate a change on our side, specifically here: Something like the following should work: [project.entry-points."mkdocs.plugins"]
"foobar/blog" = "material.plugins.blog.plugin:BlogPlugin"
... If your theme's called |
By the way, the big upside is, that users can use a configuration for |
Yes, on second thoughts, it's probably better like this. I'll check these entry points things. Thx for the suggestion. 👍 |
Unfortunately, it doesn't seem to work, at least for the search plugin : the search bar is never showing up, whatever the entry points and the declaration in mkdocs.yml:plugins (except with Cheers |
There are a few mentions in the templates that you'd need to override. Replace them with your theme name, and it should work. I'm sorry that this is so complicated, but to be honest, MkDocs doesn't make it particularly simple for themes to ship plugins. We'll look into making customization simpler as well, as part of our latest efforts. |
Wow, so obvious (and not, at the same time... XD ). Works great, thanks! I'll proceed based on this and provide some updated schema on my side. Thanks a lot for your help! |
Glad I could help and we could conserve the steps for anyone trying to achieve the same 🚀 |
WIP
The
patternProperties
idea was definitely better!I'm not really fond of the pattern for the strings, though. Maybe two
const
declarations would be better?I think I should have either used two
const
, or maybe added a default value (if possible. It's my first time building json schema, as you probably guessed...) with the patterns, because for now, the user will loose the suggestions.Your opinion?