kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.5k stars 1.56k forks source link

Add site search to main page #2714

Open mehabhalodiya opened 2 years ago

mehabhalodiya commented 2 years ago

This is a Feature Request I'd like to start a search in the documentation.

What would you like to be added: Add a facility to search the content on the main page, https://kind.sigs.k8s.io/ Add a link to the docs default search engine.

Why is this needed: Let's say someone arrives at kind.sigs.k8s.io/ and wants to find out about updating generated code in kind. The trouble is there's no form on kind.sigs.k8s.io/ to do that search, and it's not obvious that navigating round the site will reveal that search.

Comment: Consider both desktop and mobile browser use cases. The main page is some readers' first impression of kind, so it's important to make a good one.

From an implementation perspective (from what I can tell) the site can use a custom google search engine.

The first step would be identifying who the admin(s) of that are. The second step would be identifying what directories are scanned The third step would be including the pages we now want to include. The fourth step is fairly easy – add partials/search_input.html to the layout template you want to see a search box on.

It may be nice to develop categories to tag the content and provide different ways to display the entries.

BenTheElder commented 2 years ago

For now I would recommend using something like site:kind.sigs.k8s.io in e.g. google search.

I'm not sure if the Kubernetes project has an accepted approach for this in subprojects. This sounds like a nice feature.

Let's say someone arrives at kind.sigs.k8s.io/ and wants to find out about updating generated code in kind.

For this specific use-case, I hope folks read the contributor guide in full 😅

cc @jimangel @sftim (sorry! not sure who else to reach out to 😅 )

lucasgcbkhomp commented 2 years ago

@BenTheElder

Any reason why something with Lunr couldn't be added statically to HUGO?

https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/

Browsing the docs is very painful currently. Even something rough like a Lunr Search page linked through the Table of Contents would be miles better to make the documentation more digestible.

sftim commented 2 years ago

PRs are welcome!