diff --git a/package.json b/package.json index 6af4769..9516e72 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "astro": "^5.1.0", + "astro-google-analytics": "^1.0.3", "astro-og-canvas": "^0.5.5", "canvaskit-wasm": "^0.39.1", "lucide-react": "^0.468.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1da01f..a1b0fd1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ importers: astro: specifier: ^5.1.0 version: 5.1.0(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.27.4)(sass@1.83.0)(typescript@5.7.2)(yaml@2.6.1) + astro-google-analytics: + specifier: ^1.0.3 + version: 1.0.3 astro-og-canvas: specifier: ^0.5.5 version: 0.5.5(astro@5.1.0(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.27.4)(sass@1.83.0)(typescript@5.7.2)(yaml@2.6.1)) @@ -1260,6 +1263,9 @@ packages: resolution: {integrity: sha512-F6NW1RJo5pp2kPnnM97M5Ohw8zAGjv83MpxHqfAochH68n/kiXN57+hYaNUCA7XkScoVNr6yzvly3hsY34TGfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + astro-google-analytics@1.0.3: + resolution: {integrity: sha512-5bD7jA15yxVaUFVVEFG6KKMphYJ4AKP4+HSqCVBpTBnqh8LL0giTdAHpG9KJs3JaFbGQUTWP5Pqt8+twz7f55Q==} + astro-og-canvas@0.5.5: resolution: {integrity: sha512-dbZ7voJAmvy8Zyv5zFsgENs9G4uhcCJ4nVuUPb7ymu8+Vp/jr/fdQDKPrLYUG2TSi/1HejYRnzkXcSv6ntlDTA==} engines: {node: '>=18.14.1'} @@ -4895,6 +4901,8 @@ snapshots: - supports-color - typescript + astro-google-analytics@1.0.3: {} + astro-og-canvas@0.5.5(astro@5.1.0(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.27.4)(sass@1.83.0)(typescript@5.7.2)(yaml@2.6.1)): dependencies: astro: 5.1.0(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.27.4)(sass@1.83.0)(typescript@5.7.2)(yaml@2.6.1) diff --git a/src/components/astro/blog.astro b/src/components/astro/blog.astro index 8b842ae..71ab30b 100644 --- a/src/components/astro/blog.astro +++ b/src/components/astro/blog.astro @@ -1,5 +1,5 @@ --- -import { latestPosts } from "~/config" +import { common } from "~/config" import { getLangFromUrl, useTranslations } from "~/i18n/utils" import { getPostsByLocale } from "~/utils" import PostList from "./post-list.astro" @@ -8,7 +8,7 @@ const lang = getLangFromUrl(Astro.url) const t = useTranslations(lang) const allPosts = await getPostsByLocale(lang) -const posts = allPosts.slice(0, latestPosts) +const posts = allPosts.slice(0, common.latestPosts) ---