dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.01k stars 853 forks source link

[Feature Request] Remove `localSearch` function from `default` template' #9193

Closed filzrev closed 12 months ago

filzrev commented 1 year ago

Is your feature request related to a problem? Please describe. It seems there is code for worker is not supported environment. https://github.com/dotnet/docfx/blob/0ce4839028d461e7fb1431414c7bd9820ecebf37/templates/default/styles/docfx.js#L131-L136

But when running this code path. It failed because lunr.js is not defined.

Describe the solution you'd like Remove localSearch function from default template's script. Because major browsers are already supports web worker APIs already.

yufeih commented 1 year ago

Looks good, do you want to send a PR for this?

filzrev commented 1 year ago

OK. I'll send PR later.