diff --git a/astro.config.mjs b/astro.config.mjs index 812adb7..5f35f99 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,9 +5,21 @@ import { shield } from '@kindspells/astro-shield'; import sitemap from "@astrojs/sitemap"; import playformCompress from "@playform/compress"; +import partytown from "@astrojs/partytown"; + // https://astro.build/config export default defineConfig({ - integrations: [tailwind(), mdx(), sitemap(), shield({}), playformCompress()], + integrations: [ + tailwind(), + mdx(), + sitemap(), + shield({}), + playformCompress(), + partytown({ + config: { + forward: ["dataLayer.push"], + }, + })], site: 'https://rnd332.com', build: { inlineStylesheets: 'always' diff --git a/package.json b/package.json index 463447c..e37fe6f 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@astrojs/check": "^0.7.0", "@astrojs/mdx": "^3.1.0", + "@astrojs/partytown": "^2.1.1", "@astrojs/react": "^3.4.0", "@astrojs/sitemap": "^3.1.5", "@astrojs/tailwind": "^5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77ec8bb..e11ecf5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@astrojs/mdx': specifier: ^3.1.0 version: 3.1.0(astro@4.9.3(@types/node@20.14.2)(lightningcss@1.25.1)(terser@5.31.1)(typescript@5.4.5)) + '@astrojs/partytown': + specifier: ^2.1.1 + version: 2.1.1 '@astrojs/react': specifier: ^3.4.0 version: 3.4.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.2.12(@types/node@20.14.2)(lightningcss@1.25.1)(terser@5.31.1)) @@ -107,6 +110,9 @@ packages: peerDependencies: astro: ^4.8.0 + '@astrojs/partytown@2.1.1': + resolution: {integrity: sha512-KvecQuGGgrDrdTjC5awmtoQXqJFinChfeizKBJyr7F5EGQPx62xq8SIWkcXamLr5xZyNw0lryKeLtIzbxRH/zw==} + '@astrojs/prism@3.1.0': resolution: {integrity: sha512-Z9IYjuXSArkAUx3N6xj6+Bnvx8OdUSHA8YoOgyepp3+zJmtVYJIl/I18GozdJVW1p5u/CNpl3Km7/gwTJK85cw==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} @@ -252,6 +258,11 @@ packages: resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} engines: {node: '>=6.9.0'} + '@builder.io/partytown@0.10.2': + resolution: {integrity: sha512-A9U+4PREWcS+CCYzKGIPovtGB/PBgnH/8oQyCE6Nr9drDJk6cMPpLQIEajpGPmG9tYF7N3FkRvhXm/AS9+0iKg==} + engines: {node: '>=18.0.0'} + hasBin: true + '@emmetio/abbreviation@2.3.3': resolution: {integrity: sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==} @@ -2855,6 +2866,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/partytown@2.1.1': + dependencies: + '@builder.io/partytown': 0.10.2 + mrmime: 2.0.0 + '@astrojs/prism@3.1.0': dependencies: prismjs: 1.29.0 @@ -3064,6 +3080,8 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@builder.io/partytown@0.10.2': {} + '@emmetio/abbreviation@2.3.3': dependencies: '@emmetio/scanner': 1.0.4 diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 9060f18..4ac8818 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -31,8 +31,8 @@ const pages: Array = [ - - +