svelte-docs
svelte-docs copied to clipboard
Need ability to search
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.
Have you any experience or thoughts how we can perform this?
I think there can be 2 reasonable solutions.
- Replicate the same behavior of https://svelte.dev/docs will have breaking changes.
- 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.
- 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.
- Looks like true way. We may have separate bundle with search engine and indexed pages.
have you looked at https://docsearch.algolia.com/ ?
have you looked at https://docsearch.algolia.com/ ?
Gonna second this, Angolia would be a great simple solution
another potential option: https://github.com/roxiness/poindexter