diff --git a/docs/.vitepress/shared.ts b/docs/.vitepress/shared.ts index 6883b59..c34b7f9 100644 --- a/docs/.vitepress/shared.ts +++ b/docs/.vitepress/shared.ts @@ -25,6 +25,12 @@ export const shared = defineConfig({ head: [...googleFonts(), ...googleAnalytics("G-LWNNLXVF0K")], }); +/** + * Add Google Analytics + * @ref https://vitepress.dev/reference/site-config#example-using-google-analytics + * @param tagManagerId + * @returns + */ function googleAnalytics(tagManagerId: string): HeadConfig[] { return [ ["script", { async: "", src: `https://www.googletagmanager.com/gtag/js?id=${tagManagerId}` }], diff --git a/utils/utils.ts b/utils/utils.ts index 57aa156..5327241 100644 --- a/utils/utils.ts +++ b/utils/utils.ts @@ -1,3 +1,5 @@ +// TODO: Migrate to open source npm library: https://github.com/thaitype/vitepress-type-safe-i18n-navbar + import type { DefaultTheme } from "vitepress"; export type BaseSidebar = Omit & {