docsify icon indicating copy to clipboard operation
docsify copied to clipboard

search plugin not working

Open fish7dining opened this issue 6 years ago • 3 comments

Bug Report

Steps to reproduce

  1. add '' in index.html

What is current behaviour

  1. the search button show up, but whateever i search, it returns no result.

What is the expected behaviour

  1. i hope it can show the results what i search.

Other relevant information

  • [ ] Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version:

  • Docsify plugins:

fish7dining avatar Jan 12 '20 14:01 fish7dining

whats the error or logs ? share your config as well.

anikethsaha avatar Jan 15 '20 13:01 anikethsaha

I got error log from chrome developer tool when I tried searching.(search result was 'No result')

search.js:275 Uncaught TypeError: Cannot read property 'classList' of null
    at doSearch (search.js:275)
    at search.js:293

here is my index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>ARCUS DOCS</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">

  <style>
        :root {
            --base-font-size:16px;
        }
  </style>
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'ARCUS DOCS',
      repo: 'naver/arcus',
      relativePath: true,
      loadNavbar: true,
      markdown: {
          gfm: true,
          break: true,
      }
      // complete configuration parameters
      search: {
        maxAge: 86400000, // Expiration time, the default one day
        paths: 'auto',
        placeholder: 'Type to search',
        noData: 'No Results!',
        // Headline depth, 1 - 6
        depth: 6,
        hideOtherSidebarContent: false, // whether or not to hide other sidebar content
     }
    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-c.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-cpp.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-java.js"></script>
  <script src="//unpkg.com/docsify-copy-code"></script>
  <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
  <script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
</body>
</html>

computerphilosopher avatar Mar 11 '20 05:03 computerphilosopher

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 10 '20 06:05 stale[bot]