Skip to content

Search does not work on the home page #1080

Closed

Description

@joetidee

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.

Activity

  1. Koooooo-7 commented on Mar 22, 2020

    @Koooooo-7
    Member

    could u give more details about it.

  2. joetidee commented on Mar 22, 2020

    @joetidee
    Author

    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.

  3. sy-records commented on Jun 7, 2020

    @sy-records
    Member

    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?

  4. trusktr commented on Jun 7, 2020

    @trusktr
    Member

    Please let us know how to reproduce. Do you have the code for your site?

  5. trusktr commented on Jun 10, 2020

    @trusktr
    Member

    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/

  6. anikethsaha commented on Jun 10, 2020

    @anikethsaha
    Member

    Maintaining our own searching plugin + logic can be expensive. I was thinking of this docsearch.algolia.com

  7. trusktr commented on Jun 10, 2020

    @trusktr
    Member

    Does Algolia work offline?

  8. trusktr commented on Jun 10, 2020

    @trusktr
    Member

    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).

  9. trusktr commented on Jun 10, 2020

    @trusktr
    Member

    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.

  10. anikethsaha commented on Jun 10, 2020

    @anikethsaha
    Member

    algolia scraps the site every 24hrs I guess. and I think they do store the content in localstorage.

    Yeh, we can offer both plugins ,

  11. trusktr commented on Jun 13, 2020

    @trusktr
    Member

    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).

  12. anikethsaha commented on Jun 14, 2020

    @anikethsaha
    Member

    I can confirm search is not working in homepage even in our docs site

  13. ixdarchitects commented on Jun 26, 2020

    @ixdarchitects

    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:

    • In the global _coverpage.md (or a custom coverpage.html) to search all content in the site
    • If there are multiple folders/projects hosted in the /docs folder, we should be able to configure the search in the sidebar to only search content in the particular folder/project
  14. markbattistella commented on Oct 11, 2020

    @markbattistella
    Contributor

    I've got private facing docs site with this issue too - but our home page only is the _coverpage. Clicking "View Documentation" to jump to item 1 in the TOC the search doesn't show. A hard refresh shows it, but only then. I've tested the order of the scripts loading, but hasn't changed anything

  15. sy-records commented on Oct 12, 2020

    @sy-records
    Member

    @markbattistella In docsify.js.org, I can't reproduce the problem you're talking about.

  16. markbattistella commented on Oct 12, 2020

    @markbattistella
    Contributor

    @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 :)

  17. sy-records commented on Oct 12, 2020

    @sy-records
    Member

    @markbattistella Your problem is caused by your docsify-autoheaders plugin, Just remove the scope.

    autoHeaders: {
        separator: 'decimal',
        levels: '3',
    },
    
  18. joetidee commented on Oct 16, 2020

    @joetidee
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmed as a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions