Implementing a Search Feature in Markdown Files in MkDocs #6022
Replies: 2 comments
-
It should be possible to write a theme extension to achieve this. I assume you want search on a specific page, so the solution would be to write a page template for that page that moves the search functionality out of the header and into the body of the page. Have a look at Not sure what would happen if you duplicated the search functionality (i.e., copied it instead of moving it). That is beyond my current understanding of how Material for MkDocs works. Let me know how you if you manage to make it work. |
Beta Was this translation helpful? Give feedback.
-
Hi, @infinitybuddha29 have you had success on your trials to get the search bar within the content area? I want to do the same thing so I'm looking for some tips. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I am working on my MkDocs website and I am looking to add a search bar directly within the content area, ideally in the Markdown files themselves. I am wondering about the different ways to achieve this. Because now as i see it's possible only in header area.
Has anyone implemented a similar feature or can guide me on the potential methods?
Beta Was this translation helpful? Give feedback.
All reactions