When I use docfx to serve the site folder, the search bar will find results, but having deployed the content to an Azure App Service, the search bar never returns results from there. All the other features of the website seem to work, including filtering of the classes in the API Documentation section.
Any ideas what might cause this behavior?
Is it possible to share the published website? Client search dynamically loads "index.json" file, probably json is not set to be the correct mime-type for the hosted service, similar to http://www.uipress.com/add-json-handler-support-in-iis-7/
F12 to open the console window, is there any 404 errors?
Yep, it was the same problem. Bummer that my searches didn't pull up that issue.
I'm wondering if you guys have tips for getting the web.config file into the output _site folder. Right now I had to modify my build process to copy one in after I ran docfx build. Is there some way to put it in a template and get the docfx process to automatically move it over?
Thanks a ton for the help too!
@jwittner You can add it to customized template. See: http://dotnet.github.io/docfx/tutorial/howto_create_custom_template.html
You can also add web.config file in your project and add it as a resource in docfx.json
@superyyrrzz I probably put the file in the wrong spot or something, but I did try outputting the default template and dropped my web.config in and switched my docfx.json over to point at that folder and it would never copy the web.config file over.
@vicancy That's a great solution! Worked perfectly!
I found a fix for this here: https://stackoverflow.com/a/10405321/2986652
Most helpful comment
Is it possible to share the published website? Client search dynamically loads "index.json" file, probably
jsonis not set to be the correct mime-type for the hosted service, similar to http://www.uipress.com/add-json-handler-support-in-iis-7/F12 to open the console window, is there any 404 errors?