

Then, the following items prefixed with the same URL (belonging to the previously mentioned item) contain the content of each section. The search_index.json essentially contains the content for each page twice – the anchor-less item contains all content of the whole page. Then one final question for you because that's about Material behavior: If 'jupiter' is matched in the first entry in the search index below (JSON), why is the search window in Material showing the shorter text from the second, non-matching entry: Hence your POV is that MkDocs should produce such a search index: Hence Material can only produce a search result that links to the "complete" page (= no # anchor/fragment in the link), rather than specifically to the "#welcome-to-mkdocs" sub-section, which is the 'closest' text location for the actual match.Īnd when you say that the bug is in upstream and must thus be reported there, you are referring to the lack of 'jupiter' (etc.) in the second entry with "location": "#welcome-to-mkdocs"? And because the second entry with "location": "#welcome-to-mkdocs" does not contain 'jupiter', the Material search cannot show this as a separate section to which you can directly click when seeing the search results. This match is in the first entry with "location": "".

So I guess your argument is: There is only one match for 'jupiter', given the search index above. excerpt of site/search/search_index.json What's interesting is that the text is not contained as part of the section item but in the page item, so it may be an inconsistency in how the search index is built.
My html snippit on web.com does not work how to#
Possible explanation: as you're using literate hx tags and not Markdown # headings, MkDocs doesn't know how to break your text into smaller sections. It's either related to the Snippets extension, MkDocs itself or Python Markdown. This means that this issue is definitely not related to Material for MkDocs. "text": "Text below this line, i.e., planet names, is embedded via a snippet at docs/snippet.txt. jupiter saturn neptune Text above this line is embedded. "text": "Welcome to MkDocs Text below this line, i.e., planet names, is embedded via a snippet at docs/snippet.txt. See description above, and see screenshots at. embedded via snippet into that Markdown file. Search result previews should behave identical, regardless of whether content is directly included in a Markdown file vs. md file (that embeds the snippet) that appears after the snippet is included in the preview. None of the text in the snippet (embedded file) is included in the preview.DescriptionĪs soon as file embedded via a snippet contains any tag, then the search result previews break in the following way: See the prior discussion at #2313, where I was asked by to file this issue.

there are no open or closed issues that are related to my problem the documentation does not mention anything about my problem the problem is not in any of my customizations (CSS, JS, template) the problem doesn't occur with the default MkDocs template
