feat: add google analytics to docs

This commit is contained in:
alisa
2024-04-23 10:24:48 +08:00
parent 4a635abbb3
commit 103569f88f
2 changed files with 30 additions and 24 deletions

View File

@@ -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" }],

View File

@@ -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 <me@shigure.fun>",
"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 <me@shigure.fun>",
"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"
}
}