-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Search does not work on the home page #1080
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
Comments
could u give more details about it. |
It appears that the search mechanism does not work when on the home page (readme.md) - the type to search placeholder doesn't even show. When on any other page it works. |
is it that when you visit the home page you can't search for anything else, or is it that you can't search for readme.md's content? |
Please let us know how to reproduce. Do you have the code for your site? |
In general I think we need to fix up the search feature. It hasn't been completely reliable. Here's a new WebAssembly-powered search engine for the client side: https://www.infoq.com/news/2020/06/rust-webassembly-fulltext-search/ |
Maintaining our own searching plugin + logic can be expensive. I was thinking of this docsearch.algolia.com |
Does Algolia work offline? |
One of the reasons I chose Docsify was because it came with its own search. An alternative would be to use VuePress which comes with nice Algolia integration (for example). We can provide an Algolia plugin for that maybe?. But I really like the idea of having our own (whether its with a lib or with our own code). |
The current search features isn't too complex. We just need to add a CLI feature that can save the search info as a local file, then the static site can read this file to get search results. That's the easiest way with shortest amount of code additional to what we have now, I think. |
algolia scraps the site every 24hrs I guess. and I think they do store the content in localstorage. Yeh, we can offer both plugins , |
I think ombaiz on Discord may be having this issue. Can you check out his link and verify if it looks to be the same issue? Discord chat: https://discord.com/channels/713647066802421792/713647066802421795/721456182069559397 His website, http://54.37.231.32, seems to only have a home page. The behavior reported is that search is not working. Based on the reported issue here, it would seem that ombaiz is experiencing the same problem (considering he has only a home page, there are no search results). |
I can confirm search is not working in homepage even in our docs site |
May I suggest docsify team have a high level review of the search feature. The search should be flexible enough to be place at different pages/levels:
|
I've got private facing docs site with this issue too - but our home page only is the |
@markbattistella In docsify.js.org, I can't reproduce the problem you're talking about. |
@sy-records I made this repo: https://github.com/markbattistella/docsify-searchTest to show how I have it set up and the search doesn't auto load. I tried getting it working gh-pages but i couldn't get it working in the small amount of time :) |
@markbattistella Your problem is caused by your
|
Am I right in saying that the Search plugin only indexes links on pages you have already visited? In which case, it's a bit of a useless feature. |
When visiting the home page and typing in a word, the search does not show any results. The search works once in an article page.
The text was updated successfully, but these errors were encountered: