Skip to content
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

Closed
aviralg opened this issue Dec 25, 2014 · 7 comments · Fixed by #255
Closed

Search Bar #23

aviralg opened this issue Dec 25, 2014 · 7 comments · Fixed by #255

Comments

@aviralg
Copy link

aviralg commented Dec 25, 2014

It would be good to have a search bar for fuzzy searching. Maybe you can draw inspiration from Sublime Text's implementation.

@BurntSushi
Copy link
Contributor

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 rustdoc handles searching though: http://burntsushi.net/rustdoc/csv/

@aviralg
Copy link
Author

aviralg commented Jan 27, 2015

I wholeheartedly agree with you. It seems beautiful.
Pdoc is great btw. I am planning to use it in my open source project for documentation.

@BurntSushi
Copy link
Contributor

@aviralg Awesome. :-)

@mhils
Copy link
Member

mhils commented Jan 19, 2021

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!

@mhils mhils pinned this issue Jan 21, 2021
@mhils
Copy link
Member

mhils commented Mar 23, 2021

I have started with a first proof-of-concept at https://github.com/mitmproxy/pdoc/tree/search,
but don't have the time to continue at the moment. Happy to have someone take over! 😃

@Quantalabs
Copy link

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.

@mhils
Copy link
Member

mhils commented May 8, 2021

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.mp4

I have also revamped the module index, which now looks similar to a regular documentation page:

image

The search branch should have all the changes, feedback welcome. :)

@mhils mhils mentioned this issue May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants