No description
Implemented Vercel Web Analytics for Astro Project =================================================== Successfully installed and configured Vercel Web Analytics according to the latest official documentation from https://vercel.com/docs/analytics/quickstart. Changes Made: ------------- 1. **Installed @astrojs/vercel package** (v11.0.9) - Added to dependencies in package.json - Updated package-lock.json with new dependencies 2. **Modified astro.config.mjs** - Imported the Vercel adapter: `import vercel from '@astrojs/vercel'` - Added adapter configuration with Web Analytics enabled: ```javascript adapter: vercel({ webAnalytics: { enabled: true }, }) ``` Implementation Details: ---------------------- For Astro projects, Vercel Web Analytics is enabled through the Vercel adapter configuration rather than installing a separate analytics package. This is the framework-specific approach documented in the official Vercel quickstart guide. The configuration enables Web Analytics by: - Setting up the Vercel adapter as the deployment target - Enabling the webAnalytics option in the adapter configuration - This automatically injects the necessary analytics tracking when the site is deployed to Vercel Verification: ------------- ✓ Build completed successfully (npm run build) ✓ All static routes generated without errors ✓ Vercel adapter correctly configured and working ✓ No linting errors (no linter configured in this project) ✓ No test failures (no tests configured in this project) Files Modified: -------------- - astro.config.mjs - Added Vercel adapter with Web Analytics enabled - package.json - Added @astrojs/vercel dependency - package-lock.json - Updated with new dependency tree Next Steps: ----------- Once deployed to Vercel, Web Analytics will automatically start tracking: - Page views - User sessions - Performance metrics The analytics data will be visible in the Vercel dashboard under the Analytics section after deployment and user visits. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> |
||
|---|---|---|
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| astro.config.mjs | ||
| CLAUDE.md | ||
| logo.png | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
gabeefran.co
Personal blog of Gabriel Franco (gabeefranco). Built with Astro, TypeScript, MDX, React, and Tailwind CSS. Bilingual (English / Portuguese) via Astro's built-in i18n routing.
Structure
/
├── public/ favicon, logo, static assets
├── src/
│ ├── components/ Astro + React components (Header, PostCard, ObservationCard, ...)
│ ├── content/posts/en/*.mdx English posts
│ ├── content/posts/pt/*.mdx Portuguese posts (same filename pairs a translation)
│ ├── layouts/ BaseLayout, PostLayout
│ ├── lib/ i18n dictionary + post helpers
│ └── pages/ routes: "/" is English (default locale), "/pt/*" is Portuguese
└── astro.config.mjs
Every post exists as two files with the same slug — src/content/posts/en/<slug>.mdx and src/content/posts/pt/<slug>.mdx — so the language switcher can always land on the matching translation.
Commands
| Command | Action |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start the dev server at localhost:4321 |
npm run build |
Build the production site to ./dist/ |
npm run preview |
Preview the production build locally |
npm run astro check |
Type-check the project |