scaffold-eth / se-2-docs

Documentation site for Scaffold-ETH 2
https://docs.scaffoldeth.io
MIT License
13 stars 26 forks source link

Adding local search with `@cmfcmf`-plugin #78

Closed FilipHarald closed 1 month ago

FilipHarald commented 2 months ago

A first solution to #6

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
scaffold-eth-2-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 4:03pm
FilipHarald commented 2 months ago

Example:

https://github.com/user-attachments/assets/a497162c-db41-46f6-af2f-c385f4aee24d

FilipHarald commented 2 months ago

Used wrong branch. Will leave this PR in draft until #76 is done.

technophile-04 commented 2 months ago

Hey thanks @FilipHarald!! for tacking it! Looks good to me!

Did you try using easyops-cn/docusaurus-search-local? It seems a forked version of cmcf/search-local but with more stars and also some nitpicky good feature which were missing in cmcf/search-local example cmd + k to focus on search bar and also the search bar looks complete as compared to cmcf one also it seems to give better customisation options incase we need.

could you also create an PR with easyops-cn/docusaurus-search-local? I think it should be easy? since it seems like direct replacement to cmcf loca search?

FilipHarald commented 2 months ago

@technophile-04 , yup, I made a low-effort try and didn't get it to work. I wrote that here: https://github.com/scaffold-eth/se-2-docs/issues/6#issuecomment-2285977692 .

But I didn't look into it more then since I didn't know if it was going to be used. But I can do that now during the coming days :+1: . I will take @Pabl0cks improvements into account as well.

technophile-04 commented 1 month ago

Hey @FilipHarald any updates on this? Also happy to merge this as it is! I think it gets the job done for now and we can always update later.

A small nitpick(if it gets hard we could merge this as it is) but:

Can me make this Search bar a bit bigger?

Screenshot 2024-09-12 at 8 46 37 PM

Seem like it is too much cramped in

And another ctrl + k or some keyboard shortcut to open it up.

I would say don't waste lot of time on it, we could always iterate later but would be great if we get them working!

FilipHarald commented 1 month ago

Hello, sorry, no other things got in the way. I'll have a short look now on ctrl+k and sizing.

FilipHarald commented 1 month ago

Shortcut-key seems to be an issue currently: https://github.com/cmfcmf/docusaurus-search-local/issues/50

FilipHarald commented 1 month ago

@technophile-04 to be honest I kind on like having the search bar small, since you are not typing in it there anyway. But I've added width to it now. :+1:

technophile-04 commented 1 month ago

@technophile-04 to be honest I kind on like having the search bar small, since you are not typing in it there anyway. But I've added width to it now. 👍

Yup agree, it breaks on phone too :(

Screenshot 2024-09-12 at 9 20 11 PM

Let's revert that commit, we could update the styles later 🙌

technophile-04 commented 1 month ago

Thanks @FilipHarald!! Lets keep iterating on this!!