Skip to content

Commit d9cea1b

Browse files
committed
Refactor Google Tag Manager integration to use component syntax in default.vue and BlogEntry.vue; update markdown languages in nuxt.config.ts
1 parent b2986d7 commit d9cea1b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

layouts/BlogEntry.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ const title = computed(() =>route.meta?.title ?? 'TDB');
1616
<template v-for="meta in head.meta" :key="meta.hid">
1717
<Meta :id="meta.hid" :property="meta.property" :content="meta.content" />
1818
</template>
19-
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-16761048144"></script>
20-
<script>
19+
<component is="script" async src="https://www.googletagmanager.com/gtag/js?id=AW-16761048144"></component>
20+
<component is="script">
2121
window.dataLayer = window.dataLayer || [];
2222
function gtag(){dataLayer.push(arguments);}
2323
gtag('js', new Date());
2424

2525
gtag('config', 'AW-16761048144');
26-
</script>
26+
</component>
2727
</Head>
2828
<Body class="h-full dark:bg-gray-900">
2929
<NavigationBar />

layouts/default.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ const title = computed(() => t(route.meta?.title ?? 'TDB'));
1717
<template v-for="meta in head.meta" :key="meta.hid">
1818
<Meta :id="meta.hid" :property="meta.property" :content="meta.content" />
1919
</template>
20-
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-16761048144"></script>
21-
<script>
20+
<component is="script" async src="https://www.googletagmanager.com/gtag/js?id=AW-16761048144"></component>
21+
<component is="script">
2222
window.dataLayer = window.dataLayer || [];
2323
function gtag(){dataLayer.push(arguments);}
2424
gtag('js', new Date());
2525

2626
gtag('config', 'AW-16761048144');
27-
</script>
27+
</component>
2828
</Head>
2929
<Body class="h-full dark:bg-gray-900">
3030
<NavigationBar />

nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export default defineNuxtConfig({
136136
build: {
137137
markdown: {
138138
highlight: {
139+
langs: ['json', 'java', 'js', 'ts', 'html', 'css', 'vue', 'shell', 'mdc', 'md', 'yaml'],
139140
theme: {
140141
// Default theme (same as single string)
141142
default: 'github-light',

0 commit comments

Comments
 (0)