import { defineUserConfig } from "vuepress";
import { defaultTheme } from "@vuepress/theme-default";
import { searchPlugin } from "@vuepress/plugin-search";
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
export default defineUserConfig({
// ========== Basic Config ==========
lang: "en-US",
title: "Your Site Title",
description: "Your site description",
// ========== Deployment Config ==========
base: process.env.NODE_ENV === "production" ? "/repository-name/" : "/",
// ========== Theme Config ==========
theme: defaultTheme({
logo: "/images/logo.png",
navbar: [
{ text: "Home", link: "/" },
{ text: "Guide", link: "/guide/" },
{ text: "GitHub", link: "https://github.com/your-repo" },
],
sidebar: {
"/guide/": [
{
text: "Guide",
children: ["/guide/README.md", "/guide/getting-started.md"],
},
],
},
repo: "your-username/your-repo",
docsBranch: "main",
editLinkText: "Edit this page on GitHub",
lastUpdated: true,
contributors: true,
}),
// ========== Plugins ==========
plugins: [
searchPlugin({
maxSuggestions: 10,
hotKeys: ["s", "/"],
}),
googleAnalyticsPlugin({
id: "G-XXXXXXXXXX", // Your GA tracking ID
}),
// Add other plugins here
],
// ========== Head Tags ==========
head: [
["meta", { name: "theme-color", content: "#3eaf7c" }],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
],
["link", { rel: "icon", href: "/favicon.ico" }],
// Add other head tags here
],
// ========== Markdown Extensions ==========
markdown: {
code: {
lineNumbers: true,
},
// Enable custom containers
extractHeaders: ["h2", "h3", "h4"],
},
});