peterb
peterb

Reputation: 727

MKDOCS Material theme Search capability not working

I set up an MKDOCS site with the 'material' theme and am hosting it using an Azure Web App. The site works perfectly on the local host, but on Azure web app, the search bar doesn't work. It shows 'Initializing search' when you put the cursor in the search field. I tried adding this to the .yaml file, and it did not fix the issue:

plugins:
    - search:
        lang: en

I am using MKDOCS 1.1.2 and material 6.2.8

initSearchscreenshot

Upvotes: 1

Views: 1643

Answers (2)

sonita bose
sonita bose

Reputation: 1

For IIS server by adding MimeType has resolved the issue.

Upvotes: 0

peterb
peterb

Reputation: 727

I found the fix on Github: https://github.com/mkdocs/mkdocs/issues/1468

Create a web.config file and post it to the WWW root on the server.

<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
    <system.webServer>
      <staticContent>
        <mimeMap fileExtension=".json" mimeType="application/json" />
      </staticContent>
    </system.webServer>
  </configuration>

Upvotes: 2

Related Questions