diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 358211a57e..98f8097909 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -1,5 +1,6 @@ import { defineUserConfig } from "vuepress"; import { viteBundler } from "@vuepress/bundler-vite"; +import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics"; import Theme from "./theme"; export default defineUserConfig({ @@ -40,7 +41,11 @@ export default defineUserConfig({ theme: Theme, - plugins: [], + plugins: [ + googleAnalyticsPlugin({ + id: "G-FJQDKG394Z", + }), + ], head: [ ["link", { rel: "preconnect", href: "https://fonts.googleapis.com" }], diff --git a/docs/package.json b/docs/package.json index fe61db9988..b96aebe030 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,25 +1,26 @@ { - "name": "maa-docs-main", - "version": "2.0.0", - "description": "manual for MaaAssistantArknights", - "main": "index.js", - "repository": "https://github.com/MaaAssistantArknights/MaaAssistantArknights", - "author": "bakashigure ", - "license": "AGPL-3.0", - "devDependencies": { - "@vuepress/bundler-vite": "2.0.0-rc.2", - "@vuepress/plugin-docsearch": "2.0.0-rc.3", - "markdown-it": "^14.0.0", - "markdown-it-anchor": "^8.6.7", - "markdownlint-cli": "^0.39.0", - "vue": "^3.4.15", - "vuepress": "2.0.0-rc.2", - "vuepress-theme-hope": "2.0.0-rc.18" - }, - "scripts": { - "dev": "vuepress dev .", - "build": "vuepress build .", - "clean": "vuepress dev . --clean-cache", - "lintfix": "markdownlint \"**/*.md\" --fix" - } + "name": "maa-docs-main", + "version": "2.0.0", + "description": "manual for MaaAssistantArknights", + "main": "index.js", + "repository": "https://github.com/MaaAssistantArknights/MaaAssistantArknights", + "author": "bakashigure ", + "license": "AGPL-3.0", + "devDependencies": { + "@vuepress/bundler-vite": "2.0.0-rc.2", + "@vuepress/plugin-docsearch": "2.0.0-rc.3", + "markdown-it": "^14.0.0", + "markdown-it-anchor": "^8.6.7", + "markdownlint-cli": "^0.39.0", + "vue": "^3.4.15", + "vuepress": "2.0.0-rc.2", + "vuepress-theme-hope": "2.0.0-rc.18", + "@vuepress/plugin-google-analytics": "2.0.0-rc.21" + }, + "scripts": { + "dev": "vuepress dev .", + "build": "vuepress build .", + "clean": "vuepress dev . --clean-cache", + "lintfix": "markdownlint \"**/*.md\" --fix" + } } \ No newline at end of file