We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64adb4c commit 1523376Copy full SHA for 1523376
1 file changed
docs/.vitepress/config.js
@@ -198,7 +198,27 @@ export default defineConfig({
198
themeConfig: {
199
logo: "/logo.svg",
200
outline: [2, 5], // show h2-h5
201
- search: { provider: "local" },
+ search: {
202
+ provider: "local",
203
+ options: {
204
+ miniSearch: {
205
+ searchOptions: {
206
+ filter(result) {
207
+ const project =
208
+ location.pathname.match(/^\/([^/]+)(?:\/|$)/)?.[1];
209
+ if (!project) {
210
+ return true;
211
+ }
212
+
213
+ return (
214
+ result.id === `/${project}/` ||
215
+ result.id.startsWith(`/${project}/`)
216
+ );
217
+ },
218
219
220
221
222
editLink: {
223
pattern: ({ filePath }) => {
224
const repoUrl = "https://github.com/BlueLua";
0 commit comments