litestar-org / litestar

Production-ready, Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
https://litestar.dev/
MIT License
5.44k stars 372 forks source link

Docs: Search feature improvements #2405

Closed anden-akkio closed 5 months ago

anden-akkio commented 1 year ago

Summary

My organization is considering a FastAPI -> Litestar migration and one of the things that stands out to us is the search feature on the docs, which seems iffy at best. The docs are nice, and I like that there's two distinct types ("example-driven" docs + "api" docs) but it still feels like subpar DX.

Using Google with site:litestar.dev is also a consideration, but I think due to you guys presumably recently moving the website due to the rename, Google hasn't really indexed huge chunks of it yet, so that's not really that useful.

provinzkraut commented 1 year ago

This is unfortunately a limitation of Sphinx. The search it provides is not great (as you've noticed), and adding a new search to it isn't actually all that trivial. FastAPI uses mkdocs, which in turn uses lunr.js for the search.

Mkdocs, and more specifically, Material for MkDoc adds a ton of features to make the search as great as it is, so it's not as trivial as just adding lunr.js to Sphinx somehow.

I do agree however that this is something that would be really great to have. I had already started some experimentation with adding something, but my time is limited an this somehow got lost.

If anyone is willing to contribute towards this, it would be very welcome though and I'd be happy to give some pointers where/how this might be done.

haffm commented 12 months ago

Is the preferred solution to improve search with the existing Sphinx docs or move to Mkdocs/something else?

provinzkraut commented 12 months ago

We will stay with Sphinx for the docs. Mkdocs is nice but it really only has one theme you kinda have to use if you want all the features and its API documentation is subpar compared to what Sphinx has to offer. We originally had our docs in Mkdocs and specifically migrated to Sphinx because of this.

So the solution would be to improve the search for the existing docs.

ADV1K commented 11 months ago

I know it's a hard ask, but could we use the sphinxawesome theme instead of maintaining our own theme?
It has inbuilt integration with algolia.

JacobCoffee commented 5 months ago

This can be closed as 3.0 documentation will ship with Shibuya's sphinx-docsearch integration