Replies: 3 comments 16 replies
-
@facelessuser any idea? I thought Snippets was run as preprocessor, so MkDocs shouldn't see the Snippets but the replaced text? |
Beta Was this translation helpful? Give feedback.
9 replies
-
@facelessuser : Here is a minimal example setup that reproduces the issue. The reproduction isn't 100% to what I described above, but it's close enough and seems to show the underlying cause. README includes description of what "broken" means. |
Beta Was this translation helpful? Give feedback.
7 replies
-
Issue created at #2315 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
I have a Markdown file that embeds a local HTML file, using Snippets (see Material docs on embedding files).
Searching this page works. However, search result previews only work for content that is stored directly in the Markdown file. Example of successfully searching for "embedding":
Searching for terms in the embedded HTML file partially works, as the parent page ("Configuration") shows up, but without the useful search result preview as in the previous screenshot. Example of searching for "hostname", which is from the text of the embedded HTML file:
Some of my attempts to fix this issue included:
prebuild_index
, followed bymkdocs build
and serving the output via Apache httpd (nope).nav:
inmkdocs.yml
(nope). I thought, apparently mistakenly, that the search indexing might be limited to what's explicitly listed there.Environment
Tested with both
mkdocs serve
(built-in webserver) and serving the output ofmkdocs build
via Apache httpd.My question: How can I get the search result previews to work also for embedded files?
Beta Was this translation helpful? Give feedback.
All reactions