Open zerok opened 1 month ago
I would make mkdocs-material search an option in mkdocs.yml config to use either standard search or theme search in: https://github.com/backstage/mkdocs-techdocs-core/blob/main/src/core.py#L22
Hi @alexef, is this something that you would be willing to submit a PR for?
@awanlin already did: https://github.com/backstage/mkdocs-techdocs-core/pull/202 - but I'm trying to figure out ways to test it.
Thanks! Left a comment ๐
Hi ๐
With the current setup this plugin uses the original mkdocs search plugin. Unfortunately, this produces duplicate content for pages that have a h1 element as both, the whole page and the h1 section, will be included in the index:
As far as I can tell, the search plugin in mkdocs-material does not do that and so we don't have duplicate entries in the index:
Looking through https://github.com/mkdocs/mkdocs/blob/master/mkdocs/contrib/search/search_index.py I also don't see a way that this behaviour could be replicated. Is there perhaps a way other than forking the original search plugin?