Closed hhslepicka closed 1 year ago
@squidfunk it looks like you're diverging from mkdocs' plugin internals, am-I right?
Yes, I recently removed the dependency of Material for MkDocs' search from MkDocs' own search in https://github.com/squidfunk/mkdocs-material-insiders/commit/b539b5dbaf7bc1442aed6674f2944901221307a8. It's an entire rewrite of the search plugin that is shipped with Material for MkDocs which is not compatible with MkDocs own implementation and will likely continue to diverge as we add more functionality to the search.
Please note that when the next funding goal is reached, Material for MkDocs' community edition will include the new search plugin. From that version on, Material for MkDocs will not be compatible with MkDocs' own search anymore. This is likely to happen within the next 3-6 weeks. You can read about the new search in our blog article.
This PR will break compatibility with other themes, since it relies on internal details of the search plugin, which I wouldn't recommend doing. The search_index.json
is and likely will remain API-compatible, so it's best to load this file after the search plugin generated it and transform it than accessing property of the search plugin.
Thanks @squidfunk
It's an entire rewrite of the search plugin that is shipped with Material for MkDocs which is not compatible with MkDocs own implementation and will likely continue to diverge as we add more functionality to the search.
May I ask if you considered contributing it in MkDocs itself? Are there too many material specifics?
May I ask if you considered contributing it in MkDocs itself? Are there too many material specifics?
I already discussed this with @oprypin – it's not possible, because themes need to be adjusted, since the search index now contains HTML, not plain text. Upstreaming this will break all themes. Additionally, I need to keep a separate implementation which allows me to add new features to Material for MkDocs without worrying about breaking other themes.
@squidfunk Well, we did discuss, but my opinion remained that upstreaming is the best option, it's just that it is really inconvenient for you so I can't convince you to do it. I was saying that themes can be asked to opt in to the new behavior and otherwise old behavior kept.
If somebody wants to maintain it, the source will be freely available. I just can't.
The latest changes (~8 days ago) of
mkdocs-material-insiders
caused this plugin to break. This PR is an attempt to fix the issue. Sorry if I missed something specific about how to handle it properly.Some reference of the changes: