Skip to content

Commit

Permalink
misc: add some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mildronize committed May 23, 2024
1 parent 4eaef3d commit 362a874
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/.vitepress/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}` }],
Expand Down
2 changes: 2 additions & 0 deletions utils/utils.ts
Original file line number Diff line number Diff line change
@@ -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<DefaultTheme.SidebarItem, "items" | "base"> & {
Expand Down

0 comments on commit 362a874

Please sign in to comment.