diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 86cce7bb..752f2e33 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -4,15 +4,26 @@ import { execSync } from "node:child_process"; const host = process.env.TAURI_DEV_HOST; const { - IMG_ORIGIN = `https://git.polv.cc/polv/yt2press/raw/branch/${ - execSync("git branch --show-current").toString().trimEnd() - }/docs/public`, + IMG_ORIGIN = `https://git.polv.cc/polv/yt2press/raw/branch/${execSync( + "git branch --show-current", + ) + .toString() + .trimEnd()}/docs/public`, } = process.env; // https://vitepress.dev/reference/site-config export default defineConfig({ title: "yt2press", description: "video to vitepress", + head: [ + [ + "script", + { + async: "async", + src: "https://www.youtube.com/iframe_api", + }, + ], + ], themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [{ text: "Home", link: "/" }], diff --git a/docs/.vitepress/theme/components/Video.vue b/docs/.vitepress/theme/components/Video.vue index 2b2f0231..1dee17c2 100644 --- a/docs/.vitepress/theme/components/Video.vue +++ b/docs/.vitepress/theme/components/Video.vue @@ -1,7 +1,7 @@