From 966b522b653a38a996b00eaa99ae391aacd54be4 Mon Sep 17 00:00:00 2001 From: Zechariah Date: Wed, 30 Mar 2022 23:03:44 +0800 Subject: [PATCH] Added basic search bar --- docs/.vuepress/config.ts | 27 ++++++++++++++++++++++++--- package.json | 1 + pnpm-lock.yaml | 16 ++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 030ec26..ee47eb8 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -4,13 +4,34 @@ import type { DefaultThemeOptions } from "vuepress" export default defineUserConfig({ title: "YTMusic API", description: "Unofficial YouTube Music API for TypeScript", + plugins: [ + [ + "@vuepress/plugin-search", + { + locales: { + "/": { + placeholder: "Search" + } + } + } + ] + ], themeConfig: { repo: "zS1L3NT/ts-npm-ytmusic-api", editLink: false, navbar: [ - { text: "Home", link: "/" }, - { text: "Guides", link: "/guides/getting-started.html" }, - { text: "References", link: "/references/ytmusic.html" } + { + text: "Home", + link: "/" + }, + { + text: "Guides", + link: "/guides/getting-started.html" + }, + { + text: "References", + link: "/references/ytmusic.html" + } ], sidebar: [ { diff --git a/package.json b/package.json index 0be84e5..f5bda70 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@types/mocha": "^9.1.0", "@types/node": "^17.0.23", "@types/tough-cookie": "^4.0.1", + "@vuepress/plugin-search": "^2.0.0-beta.36", "mocha": "^9.2.2", "mocha.parallel": "^0.15.6", "ts-mocha": "^9.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 858dbd3..065106d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,7 @@ specifiers: '@types/mocha': ^9.1.0 '@types/node': ^17.0.23 '@types/tough-cookie': ^4.0.1 + '@vuepress/plugin-search': ^2.0.0-beta.36 axios: ^0.25.0 mocha: ^9.2.2 mocha.parallel: ^0.15.6 @@ -22,6 +23,7 @@ devDependencies: '@types/mocha': 9.1.0 '@types/node': 17.0.23 '@types/tough-cookie': 4.0.1 + '@vuepress/plugin-search': 2.0.0-beta.36 mocha: 9.2.2 mocha.parallel: 0.15.6_mocha@9.2.2 ts-mocha: 9.0.2_mocha@9.2.2 @@ -389,6 +391,20 @@ packages: - supports-color dev: true + /@vuepress/plugin-search/2.0.0-beta.36: + resolution: {integrity: sha512-UMtWH5h9wXiZgram2w5m/4Ni5R/8w+G/r22pBdBuqB1KMOUO473EmgOWgxqAsT3DLvOgevfmxQvp/OcEQv9Esw==} + dependencies: + '@vuepress/client': 2.0.0-beta.35 + '@vuepress/core': 2.0.0-beta.36 + '@vuepress/shared': 2.0.0-beta.35 + '@vuepress/utils': 2.0.0-beta.35 + chokidar: 3.5.3 + vue: 3.2.31 + vue-router: 4.0.14_vue@3.2.31 + transitivePeerDependencies: + - supports-color + dev: true + /@vuepress/plugin-theme-data/2.0.0-beta.36: resolution: {integrity: sha512-1Fxj7F0rIARYa/gQmsUql3f7wPF3ML4Fs6kcPHXYll7ZNDLR1OBw9HIGJ7lW4qx37f6YfYs2RjefAuwkVFUn/A==} dependencies: