mkdocs-material: Unable to create Search Page
I’m trying to create a search page as described here: https://stackoverflow.com/questions/63106842/how-do-i-implement-a-search-page-on-a-mkdocs-site
My expectation was that I could do this with:
theme:
name: material
include_search_page: true
However this throws:
WARNING - Template skipped: 'search.html' not found in theme directories.
I’m looking to achieve the ability to search via url params similar to this example: http://readthedocs.sheets.ch/search?q=test
My yaml file is here: https://github.com/sasjs/sasjs.io/blob/master/mkdocs.yml
I checked that…
- [ x] … the documentation does not mention anything about my problem
- [ x] … the problem doesn’t occur with the default MkDocs template
- [ x] … the problem is not in any of my customizations (CSS, JS, template)
- [ x] … there are no open or closed issues that are related to my problem
Expected behavior
setting include_search_page: true
would give me a SITENAME/search page that will accept url params.
Actual behavior
error in console, no search.html generated
Package versions
- Python:
3.8
- MkDocs:
1.1.2
- Material:
5.5.0
Project configuration
theme:
name: material
include_search_page: true
System information
OS: mac
Browser - any
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (9 by maintainers)
Insiders supports deep linking of search results, which should make a dedicated
search.html
obsolete, i.e., display all results related to the search query"code block"
. This means you can also link from your documentation.Thanks for your input on this. Yes, we can consider adding a dedicated search page to Insiders if more people need it.