svelte-docs icon indicating copy to clipboard operation
svelte-docs copied to clipboard

Need ability to search

Open shirotech opened this issue 5 years ago • 6 comments

I guess the main difference with this and https://svelte.dev/docs is that on the svelte website the whole docs is a single page and scrolled along with the left nav. This allows the user to use the browser search because everything is there on a single page. However, this is not the case for svelte-docs, it is not a single page and hence we need a search functionality if we intend to keep this behaviour. Just a thought.

shirotech avatar May 26 '20 02:05 shirotech

Have you any experience or thoughts how we can perform this?

AlexxNB avatar May 26 '20 07:05 AlexxNB

I think there can be 2 reasonable solutions.

  1. Replicate the same behavior of https://svelte.dev/docs will have breaking changes.
  2. Need to index all contents into a JSON, possibly a build step as a rollup plugin. Similar to what I have on https://shirotech.com/ using a static site.

Might be other ways, those are the obvious ones I see.

shirotech avatar May 26 '20 07:05 shirotech

  1. No, splited pages are more universal. Single page won't allow us to code-spliting in future. And can't be be used for huge documents.
  2. Looks like true way. We may have separate bundle with search engine and indexed pages.

AlexxNB avatar May 26 '20 08:05 AlexxNB

have you looked at https://docsearch.algolia.com/ ?

Thebigbignooby avatar Oct 07 '20 21:10 Thebigbignooby

have you looked at https://docsearch.algolia.com/ ?

Gonna second this, Angolia would be a great simple solution

stordahl avatar Nov 28 '20 17:11 stordahl

another potential option: https://github.com/roxiness/poindexter

stordahl avatar Dec 01 '20 08:12 stordahl