-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search Bar #23
Comments
A search bar would be pretty cool. I don't have Sublime Text and am not familiar with it at all. I do quite like how |
I wholeheartedly agree with you. It seems beautiful. |
@aviralg Awesome. :-) |
I'd very much welcome a PR that adds search functionality. I believe the best approach would be if pdoc would output an index file that could be parsed by Fuse.js. This would mean we'd have client-side search without external dependencies that can still be hosted statically. Contributions welcome! |
I have started with a first proof-of-concept at https://github.com/mitmproxy/pdoc/tree/search, |
Algolia is a good replacement until the search bar is implemented, and I've used it for some of my projects before, and it's absolutely free. |
Quick Update: The proof-of-concept has transitioned into a fully-fledged prototype! 😃 It still needs some polishing, docs and testing, but the next pdoc release should have proper search. Just like rustdoc we're using Elasticlunr.js behind the scenes, which enables very fast offline search. The only caveat is that index sizes can be relatively large (for pdoc itself: 305KB), but the search index is only fetched on demand and compresses greatly (for pdoc itself: 40KB). 2021-05-08_17-20-41.mp4I have also revamped the module index, which now looks similar to a regular documentation page: The |
It would be good to have a search bar for fuzzy searching. Maybe you can draw inspiration from Sublime Text's implementation.
The text was updated successfully, but these errors were encountered: