পরিচিতি

Google Analytics ব্যবহার করতে ডিফল্ট থিমে ga পাঠিয়ে দিন। ভ্যালু হচ্ছে ঐ আইডি যা Google Analytics দিয়েছে। এরকম দেখতে G-XXXXXXXXX. সাইট হেডে gtag স্ক্রিপ্ট পরিবর্তিত হয়ে যাবে।

কনফিগের উদাহরণ

vite.config.(js|ts)
+
import { const defaultTheme: ThemeDefaultdefaultTheme } from '@sveltepress/theme-default'
import { const sveltepress: (options?: SveltepressVitePluginOptions) => PluginOptionsveltepress } from '@sveltepress/vite'
import { function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct

UserConfig

object, or a function that returns it. The function receives a

ConfigEnv

object.

defineConfig
} from 'vite'
export default function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct

UserConfig

object, or a function that returns it. The function receives a

ConfigEnv

object.

defineConfig
({
UserConfig.plugins?: PluginOption[] | undefined

Array of vite plugins to use.

plugins
: [
function sveltepress(options?: SveltepressVitePluginOptions): PluginOptionsveltepress({ SveltepressVitePluginOptions.theme?: ResolvedTheme | undefinedtheme: function defaultTheme(themeOptions?: DefaultThemeOptions | undefined): ResolvedThemedefaultTheme({ DefaultThemeOptions.ga?: string | undefinedga: 'G-XXXXXXXXX' }) }) ], })
ts