mkdocs-material: Search not working
Description
I was not able to search anything but the home page that was generated when the project was created. Typing a keyword (that actually exists in a document) in the search bar did not return any results.
Expected behavior

Actual behavior

Markdown source for the “Macaroon” example shown above:
File name: Lorem.md
# Macaroon
Macaroon croissant caramels dessert jelly-o. Toffee gingerbread chocolate. Ice cream apple pie cupcake cake danish biscuit sweet roll chocolate jelly-o. Caramels powder candy canes. Caramels powder soufflé jelly beans bear claw jelly-o. Ice cream gummies chocolate bar marzipan ice cream muffin gingerbread cake pudding. Soufflé icing pastry toffee dragée jujubes jelly-o. Toffee pie candy sweet roll fruitcake jelly. Caramels soufflé halvah marzipan cake biscuit sugar plum cotton candy tart. Chocolate bar liquorice liquorice chocolate fruitcake chocolate cake sweet roll sweet roll powder. Oat cake cotton candy tart cheesecake chocolate bar. Candy canes donut dessert. Lollipop croissant cake cookie chocolate bar croissant danish cake icing. Cake sweet sweet roll topping.

Steps to reproduce the bug
- Create a new mkdocs project with mkdocs-material theme
- Add a new markdown document with text
- Run
mkdocs serve - Search for words that you know exists in the documents that you just created
I’ve also tried building the project, and noticed that the search_index.json is being generated:
{
"docs": [
{
"location": "/",
"text": "Welcome to MkDocs\n\n\nFor full documentation visit \nmkdocs.org\n.\n\n\nCommands\n\n\n\n\nmkdocs new [dir-name]\n - Create a new project.\n\n\nmkdocs serve\n - Start the live-reloading docs server.\n\n\nmkdocs build\n - Build the documentation site.\n\n\nmkdocs help\n - Print this help message.\n\n\n\n\nProject layout\n\n\nmkdocs.yml # The configuration file.\ndocs/\n index.md # The documentation homepage.\n ... # Other markdown pages, images and other files.",
"title": "Home"
},
{
"location": "/#welcome-to-mkdocs",
"text": "For full documentation visit mkdocs.org .",
"title": "Welcome to MkDocs"
},
{
"location": "/#commands",
"text": "mkdocs new [dir-name] - Create a new project. mkdocs serve - Start the live-reloading docs server. mkdocs build - Build the documentation site. mkdocs help - Print this help message.",
"title": "Commands"
},
{
"location": "/#project-layout",
"text": "mkdocs.yml # The configuration file.\ndocs/\n index.md # The documentation homepage.\n ... # Other markdown pages, images and other files.",
"title": "Project layout"
},
{
"location": "/Lorem/",
"text": "Macaroon croissant caramels dessert jelly-o. Toffee gingerbread chocolate. Ice cream apple pie cupcake cake danish biscuit sweet roll chocolate jelly-o. Caramels powder candy canes. Caramels powder souffl\u00e9 jelly beans bear claw jelly-o. Ice cream gummies chocolate bar marzipan ice cream muffin gingerbread cake pudding. Souffl\u00e9 icing pastry toffee drag\u00e9e jujubes jelly-o. Toffee pie candy sweet roll fruitcake jelly. Caramels souffl\u00e9 halvah marzipan cake biscuit sugar plum cotton candy tart. Chocolate bar liquorice liquorice chocolate fruitcake chocolate cake sweet roll sweet roll powder. Oat cake cotton candy tart cheesecake chocolate bar. Candy canes donut dessert. Lollipop croissant cake cookie chocolate bar croissant danish cake icing. Cake sweet sweet roll topping.",
"title": "Lorem"
},
{
"location": "/Test/",
"text": "Candy canes liquorice chocolate cake cake cupcake danish jujubes pie gummi bears. Gingerbread oat cake danish tootsie roll croissant fruitcake cupcake oat cake halvah. Chocolate cake apple pie dessert pie candy cheesecake. Jujubes gummi bears pastry tiramisu cake cupcake sweet jelly beans. Bear claw caramels cheesecake sweet roll. Tiramisu chocolate bar tootsie roll cake tart halvah. Bonbon lollipop chocolate cake pastry apple pie. Cotton candy muffin bonbon. Danish carrot cake carrot cake tart gummi bears marshmallow. Dessert pudding carrot cake sweet roll. Oat cake pastry cotton candy topping cake cupcake cake gummies. Sweet roll gummies toffee gummi bears brownie fruitcake danish fruitcake sweet. Bonbon biscuit apple pie gummi bears candy canes jelly-o ice cream chocolate cake pastry.",
"title": "Test"
}
]
}
Package versions
- Python: Python 2.7.12
- MkDocs: mkdocs, version 0.16.3
- Material: Version: 1.5.3
Project configuration
site_name: My Docs
theme: 'material'
System information
- OS: Windows 10 (Using WSL [Ubuntu 16.04.2 LTS] to run the mkdocs command)
- Browser: Chrome, Vivaldi, Firefox
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
It works if you use the localsearch plugin.