docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.47k stars 5.67k forks source link

Search file configuration #2409

Closed LIGMATV closed 5 months ago

LIGMATV commented 5 months ago

Feature request

360 Search file configuration

Problem or desire

I want to have a configuration to including all files in search result.

Proposal

See title.

Implementation

{
search : [
+      '/',            // => /README.md
+     '/zh-cn',      // => all the files in /zh-cn folder
+     '/us-en/a*'  // => all the files that name start with 'a'
    ]
}
sy-records commented 5 months ago

If you don't use auto mode, you need to manually define the paths you need to search for in search.paths.

If you need to support searching content in multiple languages at the same time, it needs to be added to the sidebar in order to generate an index.

The search starts with a certain character and specifies a directory, which is not currently planned to be supported.