githubwiki

Search for a keyword within a GitHub wiki


I would like to search for any mentions of a specific keyword on a GitHub wiki.

Is there any way to do this?


Solution

  • March 2023, from issue 4992:


    2012:

    I don't know of a native GitHub search which would support that.

    I usually use a Google search, like in this example where I search for VREF in the Gitolite documentation pages: https://www.google.com/search?q=vref+site%3Agitolite.com%2Fgitolite%2F

    I use the "site:" search selector to limit the search to a particular subdomain (like the wiki) of a web site:

    vref site:user.github.io/aRepo/
    

    But that won't work for wiki (still true in Oct. 2021).

    I find it easier to do a local search by cloning said wiki:

    git clone https://github.com/user/yourRepo.wiki
    

    (Take the name of your repo, and add a ".wiki" to access the git repo associated with said wiki).


    Update Oct. 2021: a Google search will still not work for GitHub wiki pages!
    See this discussion and github/docs PR 10836

    Daniel Adams (Program Manager @microsoft & @github) adds:

    We have intentionally excluded Disallow: /*/wiki* from the robots.txt.

    However, we have also introduced an x-robots-tag: none in the http response header of Wiki pages.
    As a result, Wikis are still not visible to search engine crawlers.

    Why have we done this?

    Abusive behavior in Wikis had a negative impact on our search engine ranking and therefore we had to exclude Wikis from getting crawled to mitigate the effects.
    We are now investigating options how we can open the gates again so that everyone can benefit from the great information documented in Wikis.
    At this point, we have not decided on whether or when we will allow Wikis to be crawled again, but we are actively reviewing this and will keep you posted with any updates.


    Jan. 2022: github/feedback discussion 4992: "Permit search engines to index Github wikis" suggests:

    The current criteria does appear to be "Restrict Editing to Collaborators Only", and some sort of user/organization aggregated star total.

    That said, there are odd stragglers left out here and there that don't meet the aggregated star requirement so I don't know what's going on there.
    About 1.2k wikis meet this rough criteria out of ~400k.

    https://docs.google.com/spreadsheets/d/1_W9s8IhnSoypXjTKYSRBK5CNPTQJfXRl7V_1mY0Xq28/edit#gid=905984022

    Awesome! It's a start but hopefully GitHub will expand the list.