From 9a0238f554829be07d0fa6664715bc08fcef74fc Mon Sep 17 00:00:00 2001 From: Bruno Azoulay Date: Sun, 27 Sep 2026 23:39:21 +0200 Subject: [PATCH 1/2] chore(skills): port 2026-09 latest-versions skills update from claude-plugins Ports the claude-plugins 2026-09-27 skills refresh to the Cursor plugins (707 skill/agent files across 16 plugins): React 19.3, Next.js 16.3, Prisma 7.10, TypeScript 7.0, Tailwind CSS 4.3, Astro 7.3, Laravel 13, PHP 8.5, Go 1.27, Rust 1.98, Swift 6.4 / iOS 27; shadcn/ui Base UI-first; all remaining non-English content translated to English. Frontmatter keys unchanged; recoded files byte-identical to source. --- .../plugins/fuse-astro/agents/astro-expert.md | 2 +- .../fuse-astro/skills/astro-7/SKILL.md | 14 +- .../skills/astro-7/references/config.md | 8 +- .../skills/astro-7/references/installation.md | 14 +- .../skills/astro-7/references/middleware.md | 4 +- .../skills/astro-7/references/new-features.md | 37 +- .../skills/astro-7/references/output-modes.md | 12 +- .../skills/astro-7/references/routing.md | 33 +- .../references/templates/basic-setup.md | 8 +- .../references/templates/config-example.md | 18 +- .../fuse-astro/skills/astro-assets/SKILL.md | 2 +- .../astro-assets/references/fonts-api.md | 2 +- .../references/templates/image-setup.md | 21 +- .../astro-content/references/loaders.md | 8 + .../skills/astro-content/references/mdx.md | 16 +- .../fuse-astro/skills/astro-db/SKILL.md | 6 +- .../skills/astro-deployment/SKILL.md | 22 +- .../references/cloudflare-adapter.md | 50 +- .../references/edge-middleware.md | 4 +- .../references/isr-patterns.md | 37 +- .../references/netlify-adapter.md | 2 +- .../references/templates/cloudflare-setup.md | 14 +- .../references/templates/vercel-setup.md | 4 +- .../references/vercel-adapter.md | 2 +- .../references/content-translation.md | 12 +- .../skills/astro-i18n/references/fallback.md | 12 +- .../astro-i18n/references/helper-functions.md | 22 +- .../astro-i18n/references/routing-config.md | 16 +- .../astro-i18n/references/sitemap-hreflang.md | 8 +- .../astro-i18n/references/strategies.md | 16 +- .../references/templates/i18n-config.md | 14 +- .../references/templates/language-switcher.md | 4 +- .../references/templates/locale-page.md | 6 +- .../astro-integrations/references/react.md | 3 +- .../fuse-astro/skills/astro-security/SKILL.md | 11 +- .../astro-security/references/csp-config.md | 21 +- .../astro-security/references/csp-overview.md | 6 +- .../astro-security/references/nonces.md | 2 +- .../references/script-directive.md | 10 + .../references/static-headers.md | 28 +- .../references/style-directive.md | 10 + .../references/templates/csp-advanced.md | 15 +- .../references/templates/csp-basic.md | 2 +- .../astro-seo/references/core-web-vitals.md | 18 +- .../skills/astro-starlight/SKILL.md | 5 +- .../references/content-layer.md | 6 +- .../references/customization.md | 10 + .../references/i18n-multilang.md | 26 +- .../astro-starlight/references/setup.md | 9 +- .../references/templates/starlight-config.md | 14 +- .../fuse-cartographer/agents/cartographer.md | 2 +- .../fuse-design/agents/design-expert.md | 4 +- .../design-android/references/type-scale.md | 3 +- .../fuse-design/skills/design-ios/SKILL.md | 6 +- .../design-ios/references/liquid-glass.md | 7 +- .../design-ios/references/touch-targets.md | 9 +- .../skills/design-ios/references/viewports.md | 9 +- .../fuse-design/skills/design-method/SKILL.md | 2 +- .../references/moves/redesign.md | 6 +- .../references/register/brand.md | 6 +- .../references/glassmorphism-advanced-ref.md | 2 +- .../references/layered-backgrounds-ref.md | 2 +- .../references/patterns-buttons.md | 4 +- .../references/pre-flight-checklist.md | 10 +- .../references/review-procedure.md | 2 +- .../design-review/references/ux-wcag.md | 4 +- .../references/spacing-density.md | 2 +- .../design-system/references/typography.md | 2 +- .../design-web/references/buttons-guide.md | 8 +- .../references/design-inspiration.md | 6 +- .../references/refs-design/README.md | 28 +- .../cursor-recode/design-system.md | 44 +- .../refs-design/cursor-recode/index.html | 1304 +++--- .../refs-design/cursor-recode/motion-nav.js | 208 +- .../cursor-recode/motion-scroll.js | 216 +- .../refs-design/cursor-recode/motion.js | 103 +- .../refs-design/cursor-recode/styles.css | 2336 +++++------ .../cursor-recode/tokens-cursor.md | 30 +- .../dispatch-recode/design-system.md | 60 +- .../refs-design/dispatch-recode/index.html | 742 ++-- .../refs-design/dispatch-recode/motion.js | 242 +- .../refs-design/dispatch-recode/styles.css | 904 ++--- .../dispatch-recode/tokens-dispatch.md | 174 +- .../endlesstools-recode/design-system.md | 82 +- .../endlesstools-recode/index.html | 816 ++-- .../refs-design/endlesstools-recode/motion.js | 260 +- .../endlesstools-recode/styles.css | 710 ++-- .../tokens-endlesstools.md | 108 +- .../harness-recode/design-system.md | 44 +- .../refs-design/harness-recode/index.html | 956 ++--- .../refs-design/harness-recode/motion-nav.js | 92 +- .../refs-design/harness-recode/motion.js | 254 +- .../refs-design/harness-recode/styles.css | 2190 +++++------ .../harness-recode/tokens-harness.md | 118 +- .../linear-recode/design-system.md | 40 +- .../refs-design/linear-recode/index.html | 1494 +++---- .../refs-design/linear-recode/motion.js | 296 +- .../refs-design/linear-recode/styles.css | 3480 ++++++++--------- .../linear-recode/tokens-linear.md | 120 +- .../mainframe-recode/design-system.md | 60 +- .../refs-design/mainframe-recode/index.html | 448 +-- .../refs-design/mainframe-recode/motion.js | 282 +- .../refs-design/mainframe-recode/styles.css | 938 ++--- .../mainframe-recode/tokens-mainframe.md | 4 +- .../refs-design/mosa-recode/design-system.md | 68 +- .../refs-design/mosa-recode/index.html | 728 ++-- .../refs-design/mosa-recode/motion.js | 264 +- .../refs-design/mosa-recode/styles.css | 1034 ++--- .../refs-design/mosa-recode/tokens-mosa.md | 218 +- .../refs-design/parley-recode/index.html | 2 +- .../parley-recode/tokens-parley.md | 70 +- .../refs-design/reve-recode/design-system.md | 64 +- .../refs-design/reve-recode/index.html | 580 +-- .../refs-design/reve-recode/motion-bande.js | 188 +- .../refs-design/reve-recode/motion.js | 230 +- .../refs-design/reve-recode/styles.css | 2043 +++++----- .../refs-design/reve-recode/tokens-reve.md | 34 +- .../refs-design/stash-recode/design-system.md | 56 +- .../refs-design/stash-recode/index.html | 478 +-- .../refs-design/stash-recode/motion.js | 264 +- .../refs-design/stash-recode/styles.css | 1590 ++++---- .../refs-design/stash-recode/tokens-stash.md | 138 +- .../stripe-recode/design-system.md | 69 +- .../refs-design/stripe-recode/index.html | 1076 ++--- .../stripe-recode/motion-carrousel.js | 186 +- .../refs-design/stripe-recode/motion.js | 156 +- .../refs-design/stripe-recode/styles.css | 1648 ++++---- .../stripe-recode/tokens-stripe.md | 199 +- .../supercommon-recode/design-system.md | 38 +- .../refs-design/supercommon-recode/index.html | 162 +- .../refs-design/supercommon-recode/motion.js | 282 +- .../refs-design/supercommon-recode/styles.css | 839 ++-- .../supercommon-recode/tokens-supercommon.md | 84 +- .../umbrel-recode/design-system.md | 42 +- .../refs-design/umbrel-recode/index.html | 446 +-- .../refs-design/umbrel-recode/motion.js | 264 +- .../refs-design/umbrel-recode/styles.css | 1260 +++--- .../umbrel-recode/tokens-umbrel.md | 168 +- .../refs-design/xai-recode/design-system.md | 36 +- .../refs-design/xai-recode/index.html | 858 ++-- .../refs-design/xai-recode/motion.js | 296 +- .../refs-design/xai-recode/styles.css | 1738 ++++---- .../refs-design/xai-recode/tokens-xai.md | 6 +- .../plugins/fuse-go/agents/go-expert.md | 6 +- .../references/templates/rest-service.md | 13 +- .../fuse-go/skills/go-concurrency/SKILL.md | 15 +- .../references/goroutine-leaks.md | 27 +- .../fuse-go/skills/go-core-idioms/SKILL.md | 22 +- .../references/error-handling.md | 2 +- .../references/generics-and-1.26.md | 58 +- .../references/templates/error-patterns.md | 2 +- .../skills/go-tooling-security/SKILL.md | 9 +- .../references/go-fix-modernizers.md | 23 +- .../references/modules-workspaces.md | 4 +- .../references/templates/ci-workflow.md | 10 +- .../templates/golangci-v2-config.md | 4 +- .../fuse-laravel/skills/fusecore/SKILL.md | 35 +- .../skills/fusecore/references/i18n.md | 44 +- .../references/templates/ReactStructure.md | 42 +- .../references/templates/Request.php.md | 6 +- .../skills/laravel-ai-sdk/SKILL.md | 13 +- .../laravel-ai-sdk/references/installation.md | 59 +- .../references/templates/Tool.php.md | 46 +- .../skills/laravel-ai-sdk/references/tools.md | 38 +- .../fuse-laravel/skills/laravel-api/SKILL.md | 26 +- .../skills/laravel-architecture/SKILL.md | 67 +- .../references/deployment.md | 2 +- .../references/installation.md | 2 +- .../references/releases.md | 26 +- .../references/upgrade.md | 2 + .../skills/laravel-attributes/SKILL.md | 19 +- .../laravel-attributes/references/console.md | 2 +- .../references/controllers.md | 54 +- .../references/factories-seeders.md | 35 +- .../laravel-attributes/references/queue.md | 21 +- .../references/validation.md | 39 +- .../fuse-laravel/skills/laravel-auth/SKILL.md | 14 +- .../skills/laravel-auth/references/csrf.md | 2 +- .../laravel-auth/references/starter-kits.md | 9 +- .../skills/laravel-billing/SKILL.md | 12 +- .../references/templates/BillingRoutes.php.md | 2 +- .../templates/WebhookController.php.md | 4 +- .../laravel-billing/references/webhooks.md | 4 +- .../skills/laravel-blade/SKILL.md | 13 +- .../templates/CustomDirectives.php.md | 4 +- .../skills/laravel-eloquent/SKILL.md | 42 +- .../references/legacy-properties.md | 13 +- .../fuse-laravel/skills/laravel-i18n/SKILL.md | 12 +- .../laravel-i18n/references/best-practices.md | 2 +- .../laravel-i18n/references/formatting.md | 28 +- .../laravel-i18n/references/localization.md | 8 +- .../laravel-i18n/references/middleware.md | 4 +- .../laravel-i18n/references/packages.md | 2 +- .../references/templates/LocaleRoutes.php.md | 2 +- .../templates/LocaleServiceProvider.php.md | 6 +- .../templates/SetLocaleMiddleware.php.md | 4 +- .../references/templates/lang-files.md | 28 +- .../skills/laravel-jsonapi/SKILL.md | 33 +- .../references/relationships.md | 27 +- .../laravel-jsonapi/references/resources.md | 55 +- .../references/sparse-fieldsets.md | 1 + .../references/templates/PostResource.php.md | 16 +- .../references/templates/UserResource.php.md | 17 +- .../skills/laravel-livewire/SKILL.md | 41 +- .../references/forms-validation.md | 6 +- .../references/wire-directives.md | 4 +- .../skills/laravel-migrations/SKILL.md | 14 +- .../skills/laravel-permission/SKILL.md | 33 +- .../laravel-permission/references/events.md | 28 +- .../templates/PermissionEventListener.php.md | 44 +- .../skills/laravel-queues/SKILL.md | 31 +- .../references/legacy-properties.md | 22 +- .../skills/laravel-reverb/SKILL.md | 11 +- .../skills/laravel-scout/SKILL.md | 15 +- .../skills/laravel-stripe-connect/SKILL.md | 10 +- .../references/templates/ConnectRoutes.php.md | 2 +- .../skills/laravel-testing/SKILL.md | 31 +- .../laravel-testing/references/pest-basics.md | 2 +- .../skills/laravel-upgrade-v13/SKILL.md | 14 +- .../references/attributes-migration.md | 31 +- .../references/breaking-changes.md | 35 +- .../references/checklist.md | 6 +- .../references/composer-upgrade.md | 21 +- .../references/laravel-boost-mcp.md | 2 +- .../references/templates/composer.json.md | 18 +- .../references/templates/upgrade-script.sh.md | 6 +- .../skills/laravel-vector-search/SKILL.md | 10 +- .../references/pgvector-setup.md | 16 +- .../templates/Document-model.php.md | 2 +- .../fuse-laravel/skills/laravel-vite/SKILL.md | 14 +- .../references/templates/ViteConfig.js.md | 7 +- .../fuse-laravel/skills/solid-php/SKILL.md | 20 +- .../solid-php/references/php85-features.md | 14 +- .../fuse-nextjs/skills/better-auth/SKILL.md | 12 +- .../references/adapters/mongodb.md | 9 +- .../better-auth/references/adapters/prisma.md | 22 +- .../skills/better-auth/references/cli.md | 19 +- .../references/concepts/database.md | 4 +- .../references/examples/2fa-complete.md | 3 +- .../references/guides/authjs-migration.md | 2 +- .../references/guides/performance.md | 6 +- .../better-auth/references/installation.md | 2 +- .../better-auth/references/plugins/2fa.md | 10 +- .../references/plugins/oidc-provider.md | 5 + .../references/plugins/overview.md | 2 +- .../better-auth/references/plugins/scim.md | 14 +- .../references/providers/generic-oauth.md | 26 +- .../fuse-nextjs/skills/nextjs-16/SKILL.md | 16 +- .../nextjs-16/references/cache-components.md | 3 +- .../skills/nextjs-16/references/caching.md | 9 +- .../nextjs-16/references/config-advanced.md | 6 +- .../skills/nextjs-16/references/deployment.md | 8 +- .../nextjs-16/references/devtools-mcp.md | 7 +- .../nextjs-16/references/error-handling.md | 27 +- .../nextjs-16/references/installation.md | 2 +- .../nextjs-16/references/instrumentation.md | 10 +- .../skills/nextjs-16/references/react-19.md | 28 +- .../nextjs-16/references/react-compiler.md | 33 +- .../skills/nextjs-16/references/rendering.md | 8 +- .../nextjs-16/references/static-generation.md | 2 +- .../skills/nextjs-16/references/turbopack.md | 20 +- .../skills/nextjs-16/references/upgrade.md | 39 +- .../fuse-nextjs/skills/nextjs-i18n/SKILL.md | 6 +- .../references/client-components.md | 4 +- .../nextjs-i18n/references/configuration.md | 28 +- .../nextjs-i18n/references/core-library.md | 6 +- .../references/diy-dictionaries.md | 12 +- .../references/diy-locale-detection.md | 4 +- .../nextjs-i18n/references/error-files.md | 4 +- .../nextjs-i18n/references/extraction.md | 60 +- .../nextjs-i18n/references/formatting.md | 12 +- .../nextjs-i18n/references/installation.md | 6 +- .../nextjs-i18n/references/integrations.md | 6 +- .../references/messages-validation.md | 10 +- .../references/middleware-proxy.md | 12 +- .../nextjs-i18n/references/navigation.md | 12 +- .../nextjs-i18n/references/pages-router.md | 4 +- .../skills/nextjs-i18n/references/plugin.md | 4 +- .../nextjs-i18n/references/routing-config.md | 32 +- .../nextjs-i18n/references/routing-setup.md | 8 +- .../references/runtime-requirements.md | 2 +- .../skills/nextjs-i18n/references/seo.md | 4 +- .../references/server-components.md | 6 +- .../skills/nextjs-i18n/references/testing.md | 10 +- .../nextjs-i18n/references/translations.md | 4 +- .../nextjs-i18n/references/typescript.md | 6 +- .../fuse-nextjs/skills/nextjs-shadcn/SKILL.md | 76 +- .../nextjs-shadcn/references/accordion.md | 60 +- .../nextjs-shadcn/references/alert-dialog.md | 67 +- .../skills/nextjs-shadcn/references/alert.md | 6 + .../nextjs-shadcn/references/aspect-ratio.md | 15 +- .../skills/nextjs-shadcn/references/avatar.md | 13 +- .../skills/nextjs-shadcn/references/badge.md | 47 +- .../nextjs-shadcn/references/breadcrumb.md | 80 +- .../skills/nextjs-shadcn/references/button.md | 77 +- .../nextjs-shadcn/references/calendar.md | 133 +- .../skills/nextjs-shadcn/references/card.md | 14 +- .../nextjs-shadcn/references/carousel.md | 9 + .../skills/nextjs-shadcn/references/chart.md | 50 +- .../nextjs-shadcn/references/checkbox.md | 50 +- .../nextjs-shadcn/references/collapsible.md | 67 +- .../nextjs-shadcn/references/command.md | 206 +- .../nextjs-shadcn/references/configuration.md | 358 +- .../nextjs-shadcn/references/context-menu.md | 227 +- .../skills/nextjs-shadcn/references/dialog.md | 77 +- .../skills/nextjs-shadcn/references/drawer.md | 248 +- .../nextjs-shadcn/references/dropdown.md | 114 +- .../references/field-patterns.md | 73 + .../nextjs-shadcn/references/form-examples.md | 118 +- .../nextjs-shadcn/references/hover-card.md | 188 +- .../nextjs-shadcn/references/input-otp.md | 10 + .../skills/nextjs-shadcn/references/input.md | 16 +- .../nextjs-shadcn/references/installation.md | 259 +- .../skills/nextjs-shadcn/references/label.md | 8 + .../nextjs-shadcn/references/menubar.md | 10 +- .../references/navigation-menu.md | 510 +-- .../nextjs-shadcn/references/pagination.md | 8 + .../nextjs-shadcn/references/popover.md | 93 +- .../nextjs-shadcn/references/progress.md | 64 +- .../nextjs-shadcn/references/radio-group.md | 12 +- .../nextjs-shadcn/references/resizable.md | 77 +- .../nextjs-shadcn/references/scroll-area.md | 9 +- .../skills/nextjs-shadcn/references/select.md | 197 +- .../nextjs-shadcn/references/separator.md | 10 +- .../skills/nextjs-shadcn/references/sheet.md | 222 +- .../nextjs-shadcn/references/sidebar.md | 636 +-- .../nextjs-shadcn/references/skeleton.md | 13 + .../skills/nextjs-shadcn/references/slider.md | 59 +- .../nextjs-shadcn/references/spinner.md | 14 + .../skills/nextjs-shadcn/references/switch.md | 12 +- .../skills/nextjs-shadcn/references/table.md | 10 +- .../skills/nextjs-shadcn/references/tabs.md | 13 +- .../nextjs-shadcn/references/textarea.md | 11 + .../nextjs-shadcn/references/theming.md | 656 ++-- .../skills/nextjs-shadcn/references/toast.md | 153 +- .../nextjs-shadcn/references/toggle-group.md | 111 +- .../skills/nextjs-shadcn/references/toggle.md | 18 +- .../nextjs-shadcn/references/tooltip.md | 94 +- .../fuse-nextjs/skills/nextjs-stack/SKILL.md | 16 +- .../skills/nextjs-tanstack-form/SKILL.md | 6 +- .../references/installation.md | 19 +- .../references/validation-zod.md | 24 +- .../fuse-nextjs/skills/prisma-7/SKILL.md | 30 +- .../skills/prisma-7/references/accelerate.md | 40 +- .../prisma-7/references/aggregations.md | 12 +- .../skills/prisma-7/references/astro.md | 22 +- .../prisma-7/references/audit-logging.md | 109 +- .../skills/prisma-7/references/authjs.md | 2 +- .../skills/prisma-7/references/aws-lambda.md | 33 +- .../skills/prisma-7/references/batching.md | 8 +- .../skills/prisma-7/references/betterauth.md | 2 +- .../skills/prisma-7/references/bundle-size.md | 11 +- .../prisma-7/references/caching-strategies.md | 10 +- .../prisma-7/references/case-sensitivity.md | 6 +- .../skills/prisma-7/references/clerk.md | 4 +- .../skills/prisma-7/references/client.md | 12 +- .../prisma-7/references/cloudflare-workers.md | 19 +- .../skills/prisma-7/references/cockroachdb.md | 12 +- .../skills/prisma-7/references/cold-starts.md | 46 +- .../prisma-7/references/connection-limits.md | 57 +- .../prisma-7/references/connection-pooling.md | 58 +- .../prisma-7/references/connection-urls.md | 2 +- .../skills/prisma-7/references/constraints.md | 2 +- .../prisma-7/references/count-exists.md | 8 +- .../prisma-7/references/data-migrations.md | 21 +- .../skills/prisma-7/references/datadog.md | 7 +- .../skills/prisma-7/references/deno-deploy.md | 58 +- .../skills/prisma-7/references/deployment.md | 27 +- .../skills/prisma-7/references/distinct.md | 4 +- .../prisma-7/references/driver-adapters.md | 38 +- .../skills/prisma-7/references/encryption.md | 103 +- .../skills/prisma-7/references/express.md | 10 +- .../skills/prisma-7/references/extensions.md | 44 +- .../skills/prisma-7/references/filtering.md | 12 +- .../prisma-7/references/github-copilot.md | 9 +- .../skills/prisma-7/references/heroku.md | 16 +- .../skills/prisma-7/references/hono.md | 46 +- .../prisma-7/references/indexes-advanced.md | 2 +- .../prisma-7/references/installation.md | 38 +- .../prisma-7/references/lazy-loading.md | 8 +- .../skills/prisma-7/references/logging.md | 13 + .../skills/prisma-7/references/middleware.md | 14 +- .../references/migrate-from-drizzle.md | 11 +- .../references/migrate-from-sequelize.md | 27 +- .../references/migrate-from-typeorm.md | 11 +- .../skills/prisma-7/references/mongodb.md | 16 +- .../prisma-7/references/multi-database.md | 25 +- .../prisma-7/references/multi-schema.md | 26 +- .../skills/prisma-7/references/n-plus-one.md | 8 +- .../skills/prisma-7/references/neon.md | 32 +- .../skills/prisma-7/references/netlify.md | 15 +- .../prisma-7/references/nextjs-integration.md | 17 +- .../skills/prisma-7/references/nuxt.md | 13 +- .../skills/prisma-7/references/omit-api.md | 16 +- .../prisma-7/references/opentelemetry.md | 7 +- .../prisma-7/references/optimization.md | 12 +- .../prisma-7/references/pagination-cursor.md | 6 +- .../prisma-7/references/pagination-offset.md | 9 +- .../skills/prisma-7/references/planetscale.md | 13 +- .../prisma-7/references/pnpm-workspaces.md | 36 +- .../prisma-7/references/prisma-config.md | 37 +- .../prisma-7/references/query-optimization.md | 8 +- .../skills/prisma-7/references/railway.md | 20 +- .../skills/prisma-7/references/raw-queries.md | 4 +- .../prisma-7/references/react-router.md | 10 +- .../prisma-7/references/read-replicas.md | 35 +- .../skills/prisma-7/references/remix.md | 16 +- .../skills/prisma-7/references/render.md | 10 +- .../prisma-7/references/select-include.md | 8 +- .../skills/prisma-7/references/soft-delete.md | 13 +- .../skills/prisma-7/references/solidstart.md | 10 +- .../skills/prisma-7/references/sorting.md | 8 +- .../skills/prisma-7/references/sqlite.md | 34 +- .../prisma-7/references/stored-procedures.md | 2 +- .../skills/prisma-7/references/sveltekit.md | 11 +- .../skills/prisma-7/references/turborepo.md | 28 +- .../skills/prisma-7/references/turso.md | 37 +- .../skills/prisma-7/references/typedsql.md | 3 +- .../skills/prisma-7/references/vercel.md | 34 +- .../skills/prisma-7/references/views.md | 2 +- .../skills/prisma-7/references/vs-drizzle.md | 4 +- .../skills/prisma-7/references/vs-kysely.md | 4 +- .../skills/prisma-7/references/vs-mongoose.md | 6 +- .../prisma-7/references/vs-sequelize.md | 4 +- .../skills/prisma-7/references/vs-typeorm.md | 4 +- .../solid-nextjs/references/templates/i18n.md | 22 +- .../references/templates/middleware.md | 6 +- .../references/templates/prisma.md | 8 +- .../plugins/fuse-php/agents/php-expert.md | 8 +- .../skills/php-ecosystem-reference/SKILL.md | 6 +- .../references/api-platform.md | 12 +- .../references/boundaries.md | 4 +- .../references/slim-framework.md | 11 +- .../references/symfony-components.md | 4 +- .../references/implementations.md | 6 +- .../references/php-85-features.md | 28 +- .../references/templates/modern-class.md | 6 +- .../skills/php-quality-tooling/SKILL.md | 4 +- .../references/php-cs-fixer.md | 9 +- .../references/rector-upgrades.md | 4 +- .../references/templates/composer-ci.md | 2 +- .../references/templates/php-cs-fixer-dist.md | 7 +- .../references/templates/phpstan-neon.md | 8 +- .../fuse-php/skills/php-standards/SKILL.md | 12 +- .../references/per-coding-style.md | 36 +- .../php-standards/references/psr-catalog.md | 2 +- .../references/templates/composer-json.md | 13 +- .../references/templates/project-structure.md | 2 +- .../fuse-php/skills/php-testing/SKILL.md | 34 +- .../references/annotations-to-attributes.md | 8 +- .../references/choosing-framework.md | 15 +- .../skills/php-testing/references/pest-4.md | 32 +- .../php-testing/references/phpunit-12.md | 52 +- .../references/templates/pest-setup.md | 11 +- .../references/templates/phpunit-xml.md | 6 +- .../references/templates/test-doubles.md | 14 +- .../fuse-react/skills/react-19/SKILL.md | 35 +- .../react-19/references/activity-component.md | 19 +- .../react-19/references/migration-18-19.md | 18 + .../skills/react-19/references/new-hooks.md | 33 +- .../skills/react-19/references/profiling.md | 2 +- .../react-19/references/react-compiler.md | 8 +- .../skills/react-19/references/ref-as-prop.md | 20 + .../react-19/references/suspense-patterns.md | 31 + .../fuse-react/skills/react-forms/SKILL.md | 14 +- .../skills/react-forms/references/devtools.md | 8 +- .../references/templates/basic-form.md | 2 - .../references/templates/devtools-form.md | 26 +- .../references/templates/form-composition.md | 2 - .../references/templates/optimistic-form.md | 2 - .../references/templates/react-native-form.md | 5 +- .../react-forms/references/yup-valibot.md | 7 +- .../react-forms/references/zod-validation.md | 6 +- .../fuse-react/skills/react-i18n/SKILL.md | 2 +- .../references/language-detection.md | 6 +- .../references/templates/basic-setup.md | 42 +- .../templates/date-number-formatter.md | 64 +- .../templates/form-validation-i18n.md | 40 +- .../references/templates/language-switcher.md | 12 +- .../templates/lazy-loading-routes.md | 4 +- .../templates/plural-interpolation.md | 74 +- .../references/templates/testing-i18n.md | 72 +- .../templates/typed-translations.md | 4 +- .../fuse-react/skills/react-shadcn/SKILL.md | 76 +- .../react-shadcn/references/accordion.md | 62 +- .../react-shadcn/references/alert-dialog.md | 69 +- .../skills/react-shadcn/references/alert.md | 6 + .../react-shadcn/references/aspect-ratio.md | 74 +- .../skills/react-shadcn/references/avatar.md | 13 +- .../skills/react-shadcn/references/badge.md | 49 +- .../react-shadcn/references/breadcrumb.md | 88 +- .../skills/react-shadcn/references/button.md | 78 +- .../react-shadcn/references/calendar.md | 147 +- .../skills/react-shadcn/references/card.md | 26 +- .../react-shadcn/references/carousel.md | 33 +- .../skills/react-shadcn/references/chart.md | 64 +- .../react-shadcn/references/checkbox.md | 64 +- .../react-shadcn/references/collapsible.md | 81 +- .../skills/react-shadcn/references/command.md | 228 +- .../react-shadcn/references/configuration.md | 385 +- .../react-shadcn/references/context-menu.md | 239 +- .../skills/react-shadcn/references/dialog.md | 87 +- .../skills/react-shadcn/references/drawer.md | 255 +- .../react-shadcn/references/dropdown.md | 124 +- .../react-shadcn/references/field-patterns.md | 73 + .../react-shadcn/references/form-examples.md | 72 +- .../react-shadcn/references/hover-card.md | 198 +- .../react-shadcn/references/input-otp.md | 22 +- .../skills/react-shadcn/references/input.md | 28 +- .../react-shadcn/references/installation.md | 257 +- .../skills/react-shadcn/references/label.md | 8 + .../skills/react-shadcn/references/menubar.md | 18 +- .../references/navigation-menu.md | 506 +-- .../react-shadcn/references/pagination.md | 27 +- .../skills/react-shadcn/references/popover.md | 101 +- .../react-shadcn/references/progress.md | 72 +- .../react-shadcn/references/radio-group.md | 20 +- .../react-shadcn/references/resizable.md | 79 +- .../react-shadcn/references/scroll-area.md | 11 +- .../skills/react-shadcn/references/select.md | 215 +- .../react-shadcn/references/separator.md | 10 +- .../skills/react-shadcn/references/sheet.md | 234 +- .../skills/react-shadcn/references/sidebar.md | 638 +-- .../react-shadcn/references/skeleton.md | 13 + .../skills/react-shadcn/references/slider.md | 71 +- .../skills/react-shadcn/references/spinner.md | 24 +- .../skills/react-shadcn/references/switch.md | 20 +- .../skills/react-shadcn/references/table.md | 12 +- .../skills/react-shadcn/references/tabs.md | 17 +- .../react-shadcn/references/textarea.md | 17 +- .../skills/react-shadcn/references/theming.md | 705 ++-- .../skills/react-shadcn/references/toast.md | 184 +- .../react-shadcn/references/toggle-group.md | 121 +- .../skills/react-shadcn/references/toggle.md | 26 +- .../skills/react-shadcn/references/tooltip.md | 112 +- .../skills/react-tanstack-router/SKILL.md | 4 +- .../references/code-splitting.md | 5 +- .../references/devtools.md | 4 +- .../references/installation.md | 21 +- .../references/search-params.md | 7 +- .../templates/auth-protected-routes.md | 3 +- .../references/templates/basic-setup.md | 13 +- .../references/templates/feature-module.md | 3 +- .../references/templates/search-filters.md | 3 +- .../references/typescript.md | 2 +- .../fuse-react/skills/react-testing/SKILL.md | 8 +- .../react-testing/references/installation.md | 10 +- .../plugins/fuse-rust/agents/rust-expert.md | 4 +- .../skills/rust-async-concurrency/SKILL.md | 4 +- .../references/templates/graceful-shutdown.md | 2 +- .../references/templates/task-patterns.md | 2 +- .../skills/rust-core-language/SKILL.md | 12 +- .../references/templates/cargo-toml-stack.md | 12 +- .../skills/rust-error-handling/SKILL.md | 2 +- .../skills/rust-testing-quality/SKILL.md | 2 +- .../references/property-and-mutation.md | 2 +- .../references/templates/criterion-bench.md | 6 +- .../skills/rust-tooling-cicd/SKILL.md | 2 +- .../rust-tooling-cicd/references/ci-gate.md | 2 + .../skills/rust-web-backend/SKILL.md | 4 +- .../references/architecture.md | 4 +- .../references/templates/rest-service.md | 4 +- .../skills/seo/02-onpage-seo/twitter-cards.md | 6 +- .../fuse-shadcn-ui/agents/shadcn-ui-expert.md | 35 +- .../skills/shadcn-components/SKILL.md | 88 +- .../references/baseui-components.md | 43 +- .../references/radix-components.md | 20 +- .../references/templates/dialog-example.md | 80 +- .../skills/shadcn-detection/SKILL.md | 53 +- .../references/baseui-patterns.md | 34 +- .../references/detection-algorithm.md | 64 +- .../references/radix-patterns.md | 17 +- .../references/templates/detection-script.md | 46 +- .../skills/shadcn-migration/SKILL.md | 35 +- .../references/baseui-to-radix.md | 26 +- .../references/radix-to-baseui.md | 29 +- .../references/templates/migration-dialog.md | 10 +- .../skills/shadcn-registries/SKILL.md | 71 +- .../references/registry-config.md | 106 +- .../references/templates/registry-setup.md | 88 +- .../skills/shadcn-theming/SKILL.md | 31 +- .../references/templates/theme-setup.md | 46 +- .../references/theming-guide.md | 44 +- .../fuse-solid/skills/solid-csharp/SKILL.md | 6 +- .../solid-csharp/references/patterns.md | 2 +- .../solid-csharp/references/principles.md | 2 +- .../skills/solid-detection/SKILL.md | 2 +- .../fuse-solid/skills/solid-go/SKILL.md | 4 +- .../solid-go/references/solid-principles.md | 2 +- .../fuse-solid/skills/solid-java/SKILL.md | 4 +- .../solid-java/references/solid-principles.md | 2 +- .../fuse-solid/skills/solid-python/SKILL.md | 4 +- .../solid-python/references/patterns.md | 2 +- .../solid-python/references/principles.md | 2 +- .../fuse-solid/skills/solid-ruby/SKILL.md | 4 +- .../solid-ruby/references/solid-principles.md | 2 +- .../solid-rust/references/open-closed.md | 2 +- .../solid-rust/references/templates/error.md | 2 +- .../agents/swift-expert.md | 2 +- .../skills/build-distribution/SKILL.md | 2 +- .../references/app-store.md | 1 + .../skills/ios/SKILL.md | 6 +- .../skills/ipados/SKILL.md | 4 +- .../skills/macos/SKILL.md | 6 +- .../skills/macos/references/build-tools.md | 2 + .../skills/mcp-tools/SKILL.md | 2 +- .../mcp-tools/references/xcodebuild-mcp.md | 2 +- .../skills/solid-swift/SKILL.md | 6 +- .../skills/swift-core/SKILL.md | 4 +- .../swift-core/references/concurrency.md | 46 +- .../skills/swift-core/references/i18n.md | 1 + .../skills/swift-core/references/testing.md | 2 + .../skills/swiftui-core/SKILL.md | 2 +- .../swiftui-core/references/liquid-glass.md | 19 +- .../references/state-management.md | 3 +- .../references/views-modifiers.md | 34 +- .../skills/tvos/SKILL.md | 4 +- .../skills/visionos/SKILL.md | 4 +- .../skills/watchos/SKILL.md | 4 +- .../agents/tailwindcss-expert.md | 6 +- .../skills/tailwindcss-accessibility/SKILL.md | 6 +- .../references/wcag-utilities.md | 2 +- .../skills/tailwindcss-backgrounds/SKILL.md | 7 +- .../references/colors.md | 12 +- .../references/gradients.md | 4 +- .../skills/tailwindcss-borders/SKILL.md | 13 +- .../tailwindcss-borders/references/border.md | 12 + .../tailwindcss-borders/references/outline.md | 2 +- .../skills/tailwindcss-core/SKILL.md | 30 +- .../tailwindcss-core/references/config.md | 38 +- .../tailwindcss-core/references/directives.md | 126 +- .../tailwindcss-core/references/theme.md | 6 +- .../skills/tailwindcss-custom-styles/SKILL.md | 22 +- .../skills/tailwindcss-effects/SKILL.md | 69 +- .../tailwindcss-effects/references/filters.md | 4 +- .../tailwindcss-effects/references/opacity.md | 6 +- .../tailwindcss-effects/references/shadows.md | 45 +- .../skills/tailwindcss-interactivity/SKILL.md | 13 +- .../references/scroll.md | 56 + .../skills/tailwindcss-layout/SKILL.md | 8 +- .../tailwindcss-layout/references/flexbox.md | 4 +- .../tailwindcss-layout/references/grid.md | 4 +- .../tailwindcss-layout/references/position.md | 20 +- .../skills/tailwindcss-responsive/SKILL.md | 10 + .../skills/tailwindcss-sizing/SKILL.md | 16 +- .../references/width-height.md | 2 +- .../skills/tailwindcss-spacing/SKILL.md | 29 +- .../tailwindcss-spacing/references/margin.md | 27 +- .../tailwindcss-spacing/references/padding.md | 27 +- .../skills/tailwindcss-transforms/SKILL.md | 9 +- .../references/animation.md | 4 +- .../references/transform.md | 34 +- .../references/transition.md | 4 +- .../skills/tailwindcss-typography/SKILL.md | 16 +- .../references/fonts.md | 27 +- .../references/spacing.md | 4 +- .../tailwindcss-typography/references/text.md | 42 +- .../skills/tailwindcss-v4/SKILL.md | 8 +- .../references/configuration.md | 3 + .../references/installation-support.md | 28 +- .../skills/solid-tanstack-start/SKILL.md | 4 +- .../skills/start-core/SKILL.md | 4 +- .../start-core/references/project-setup.md | 9 +- .../references/templates/minimal-project.md | 16 +- .../skills/start-deployment/SKILL.md | 6 +- .../references/build-and-adapters.md | 10 +- .../references/prerendering.md | 19 +- .../templates/vite-config-adapters.md | 9 +- .../skills/start-execution-model/SKILL.md | 4 +- .../references/environment-boundaries.md | 24 + .../skills/start-middleware/SKILL.md | 4 +- .../skills/start-server-functions/SKILL.md | 4 +- .../references/creating.md | 5 + .../skills/start-server-routes/SKILL.md | 4 +- .../agents/typescript-expert.md | 14 +- .../fuse-typescript/skills/ts-config/SKILL.md | 30 +- .../ts-config/references/bundler-track.md | 12 +- .../ts-config/references/deprecations-6.md | 56 +- .../skills/ts-config/references/node-track.md | 4 +- .../references/templates/tsconfig.bundler.md | 9 +- .../references/templates/tsconfig.node.md | 6 +- .../skills/ts-language-patterns/SKILL.md | 18 +- .../references/decorators.md | 1 + .../references/generics-and-inference.md | 25 +- .../references/llm-pitfalls.md | 10 +- .../skills/ts-lint-format/SKILL.md | 14 +- .../ts-lint-format/references/eslint-typed.md | 35 +- .../references/templates/config-examples.md | 16 +- .../ts-lint-format/references/tool-choice.md | 7 +- .../skills/ts-packaging/SKILL.md | 2 +- .../references/templates/package-json-dual.md | 13 +- .../ts-packaging/references/validation.md | 2 +- .../skills/ts-runtime-bun/SKILL.md | 8 +- .../references/build-compile.md | 13 +- .../ts-runtime-bun/references/bun-vs-node.md | 6 +- .../ts-runtime-bun/references/bunfig-test.md | 12 +- .../references/templates/bun-project-setup.md | 6 +- .../ts-runtime-bun/references/workspaces.md | 11 +- .../skills/ts-runtime-node/SKILL.md | 8 +- .../references/node24-features.md | 34 +- .../references/templates/node-esm-setup.md | 3 +- .../references/type-stripping.md | 10 +- .../skills/ts-testing/SKILL.md | 8 +- .../skills/ts-testing/references/bun-test.md | 7 +- .../ts-testing/references/choosing-runner.md | 8 +- .../references/templates/vitest-setup.md | 24 +- .../skills/ts-testing/references/vitest.md | 29 +- 707 files changed, 29430 insertions(+), 27844 deletions(-) diff --git a/.cursor-plugin/plugins/fuse-astro/agents/astro-expert.md b/.cursor-plugin/plugins/fuse-astro/agents/astro-expert.md index 18da274..bb88e42 100644 --- a/.cursor-plugin/plugins/fuse-astro/agents/astro-expert.md +++ b/.cursor-plugin/plugins/fuse-astro/agents/astro-expert.md @@ -138,7 +138,7 @@ This agent activates when ANY of the following are detected: ## Content Strategy - **Static sites** — `output: 'static'` + Content Collections for blogs/docs -- **Hybrid sites** — `output: 'hybrid'` with `prerender = false` for dynamic pages +- **Hybrid sites** — `output: 'static'` + adapter, with `prerender = false` for dynamic pages (there is no `output: 'hybrid'`) - **Full SSR** — `output: 'server'` + adapter for apps with auth/session --- diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/SKILL.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/SKILL.md index b064320..b812af1 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/SKILL.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/SKILL.md @@ -1,6 +1,6 @@ --- name: astro-7 -description: Use when building Astro 7 sites, choosing an output mode (static/server/hybrid), configuring middleware, or upgrading from Astro 5/6. +description: Use when building Astro 7 sites, choosing an output mode (static/server, hybrid via per-route prerender), configuring middleware, or upgrading from Astro 5/6. versions: astro: "7" node: "22.12+" @@ -11,7 +11,7 @@ related-skills: astro-content, astro-actions, astro-islands, astro-integrations, --- -Configures and explains Astro 7 (stable, 7.0.9) core framework mechanics: file-based routing, the three output modes (static/server/hybrid) and per-route `prerender`, middleware for auth/redirects/headers, the Vite Environment API, the single Rust compiler (Go compiler removed, strict HTML parsing), stable Content Security Policy, Live Content Collections, and the built-in Fonts API. +Configures and explains Astro 7 (stable, 7.3.5) core framework mechanics: file-based routing, the two output modes (`static`/`server`) plus hybrid rendering via per-route `prerender`, middleware for auth/redirects/headers, the Vite Environment API, the single Rust compiler (Go compiler removed, strict HTML parsing), stable Content Security Policy, Live Content Collections, and the built-in Fonts API. Covers initial project setup and migration from Astro 5/6, including breaking changes and Node 22.12+ requirements. Does not cover Content Layer API details (astro-content), Server Actions (astro-actions), Islands hydration directives (astro-islands), UI framework integrations (astro-integrations), or deployment adapters (astro-deployment) — those live in their own skills. @@ -38,7 +38,7 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. - Building new content-driven websites or blogs - Migrating from Astro 6 to version 7 -- Configuring static, server, or hybrid output modes +- Configuring static or server output (hybrid = per-route `prerender`) - Setting up middleware for auth or redirects - Leveraging the new Rust compiler for large sites - Implementing Content Security Policy (CSP) headers @@ -54,6 +54,8 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. | Built-in Fonts API (stable) | Zero-config font loading with performance optimization | | CSP Support (stable) | Built-in Content Security Policy nonce management | | Cloudflare Workers | First-class support with workerd runtime in dev | +| Route caching (stable in 7.0) | Top-level `cache` + `routeRules`, `Astro.cache.set({ maxAge, swr, tags })` | +| Advanced Routing (7.0) | Optional `src/fetch.ts` entrypoint (`astro/fetch`, `astro/hono`) | --- @@ -65,7 +67,7 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. |------|-------------|----------| | `static` (default) | All pages prerendered at build | Blogs, docs, marketing | | `server` | All pages rendered on demand | Apps, dashboards, auth | -| `hybrid` | Mix static + on-demand | Most production sites | +| Hybrid (not an `output` value) | `static` or `server` + per-route `export const prerender` | Most production sites | ### Routing @@ -94,8 +96,8 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. ## Best Practices 1. **Use `output: 'static'` by default** — Add server only when needed -2. **Per-route `prerender`** — Fine-grained control in hybrid mode +2. **Per-route `prerender`** — Fine-grained hybrid control (`output` only accepts `'static' | 'server'`; there is no `'hybrid'` value) 3. **Middleware for cross-cutting concerns** — Auth, redirects, headers 4. **No compiler flag needed** — the Rust compiler is the only compiler now (Go removed); watch for strict HTML parsing errors on unclosed tags -5. **CSP nonces** — Use built-in stable support instead of custom headers +5. **CSP hashes** — Use built-in stable `security.csp` (hash-based, plus the `Astro.csp` runtime API) instead of custom headers 6. **Node 22.12+ required** — odd-numbered Node versions are unsupported; stay on stable TypeScript tooling, the native `tsgo` compiler can make `astro check`/typecheck fail opaquely (see installation.md) diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/config.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/config.md index 55ffdf9..bcde7c5 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/config.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/config.md @@ -6,7 +6,7 @@ keywords: config, defineConfig, integrations, vite, base, site, server priority: high --- -# Astro 6 Configuration +# Astro 7 Configuration ## When to Use @@ -23,7 +23,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ site: 'https://example.com', base: '/', - output: 'static', // 'static' | 'server' | 'hybrid' + output: 'static', // 'static' | 'server' (no 'hybrid' — use per-route prerender) trailingSlash: 'ignore', // 'always' | 'never' | 'ignore' compressHTML: 'jsx', // default in Astro 7 — JSX-style whitespace stripping }); @@ -41,6 +41,10 @@ export default defineConfig({ | `adapter` | object | Server runtime adapter | | `vite` | object | Vite config passthrough (Vite 8) | | `srcDir` | string | Source directory (default: `./src`) | +| `session` | `object \| false` | Session driver config; `false` opts out entirely (7.2+) — runtime tree-shaken, adapters skip their default driver | +| `logger.entrypoint` | `URL \| string` | Custom logger module (option since 7.0; URL form 7.1+, relative string 7.2+) | +| `fetchFile` | `string \| null` | Advanced Routing entrypoint (default `src/fetch.ts`); `null` disables it | +| `cache` / `routeRules` | object | Stable route caching (7.0), e.g. `cache: { provider: memoryCache() }` | | `publicDir` | string | Public assets (default: `./public`) | ## Removed Experimental Flags (Astro 7) diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/installation.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/installation.md index f598087..51d9a41 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/installation.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/installation.md @@ -1,24 +1,24 @@ --- name: installation -description: Astro 6 installation, upgrade from v5, Node requirements -when-to-use: new project, upgrading from Astro 5, setting up TypeScript +description: Astro 7 installation, upgrade from v5/v6, Node requirements +when-to-use: new project, upgrading from Astro 5/6, setting up TypeScript keywords: setup, init, create, upgrade, node, requirements priority: high --- -# Astro 6 Installation +# Astro 7 Installation ## When to Use -- Starting a new Astro 6 project -- Upgrading from Astro 4/5 -- Configuring Node 22+ environment +- Starting a new Astro 7 project (latest stable: 7.3.5) +- Upgrading from Astro 5/6 (see the official v7 upgrade guide) +- Configuring Node 22.12+ environment ## Requirements | Requirement | Version | |-------------|---------| -| Node.js | 22.12+ (odd-numbered Node versions unsupported) | +| Node.js | 22.12+ (`engines.node >=22.12.0`; odd-numbered Node versions unsupported) | | TypeScript | 5.1+ | ## TS7 / `tsgo` Warning diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/middleware.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/middleware.md index 4a59692..4537366 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/middleware.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/middleware.md @@ -1,12 +1,12 @@ --- name: middleware -description: Astro 6 middleware — request/response interception, auth, redirects, locals +description: Astro 7 middleware — request/response interception, auth, redirects, locals when-to-use: auth guards, redirects, request logging, setting locals keywords: middleware, locals, auth, redirect, request, response priority: medium --- -# Astro 6 Middleware +# Astro 7 Middleware ## When to Use diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/new-features.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/new-features.md index 3a803d8..8877e39 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/new-features.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/new-features.md @@ -10,7 +10,7 @@ priority: medium ## When to Use -- Leveraging new Astro 6 stable features +- Leveraging Astro 6/7 stable features (7.1–7.3 additions at the end) - Setting up font optimization - Implementing Content Security Policy - Using Live Content Collections for real-time data @@ -40,28 +40,51 @@ export default defineConfig({ ## Content Security Policy (stable) -CSP is stable since Astro 6.0 — `experimental.csp` no longer exists, configure it as a top-level option: +CSP is stable since Astro 6.0 — `experimental.csp` no longer exists, configure it under `security.csp`: ```typescript export default defineConfig({ - csp: true, // Generates nonces automatically + security: { + csp: true, // Hash-based: auto-hashes bundled scripts/styles (SHA-256 default) + }, }); ``` ## Live Content Collections -Fetch real-time external data through the content layer: +Fetch real-time external data at request time (adapter required). Live collections live in `src/live.config.ts` (not `content.config.ts`) and use `defineLiveCollection()`: ```typescript -// src/content.config.ts -import { defineCollection } from 'astro:content'; +// src/live.config.ts +import { defineLiveCollection } from 'astro:content'; import { myLiveLoader } from './loaders/live'; -const news = defineCollection({ +const news = defineLiveCollection({ loader: myLiveLoader({ url: 'https://api.example.com/news' }), }); + +export const collections = { news }; ``` +Query with `getLiveCollection()` / `getLiveEntry()`. + ## Single Rust Compiler (Astro 7) Astro 7 removed the Go compiler entirely — the Rust compiler is now the only `.astro` file compiler, no flag needed (`experimental.rustCompiler` no longer exists). It also enforces **strict HTML parsing**: unclosed tags and invalid HTML now raise a build error instead of being silently auto-corrected. Audit existing `.astro` templates for unclosed tags before upgrading. + +## Astro 7.1 – 7.3 Additions + +| Version | Feature | Usage | +|---------|---------|-------| +| 7.1 | Fine-grained CSP directives | `kind: 'element' \| 'attribute'` on CSP hashes/resources → `script-src-elem`, `script-src-attr`, `style-src-elem`, `style-src-attr` | +| 7.1 | Pagination URL control | `paginate(items, { pageSize, format: (url) => url + '.html' })` | +| 7.1 | Multiple dev servers | `astro dev --ignore-lock` (bypasses the dev lockfile) | +| 7.1 | Lower sync memory | `glob({ ..., deferRender: true })` renders entries on demand | +| 7.1 | Logger entrypoint as URL (option exists since 7.0) | `logger: { entrypoint: new URL('./src/custom-logger.js', import.meta.url) }` + `AstroRuntimeLogger` type | +| 7.2 | Opt out of sessions | `session: false` — session runtime removed from the SSR bundle | +| 7.2 | Background preview | `astro preview --background`, then `astro preview status \| logs \| stop` | +| 7.2 | Relative logger entrypoint | `logger: { entrypoint: './src/custom-logger.js' }` | +| 7.3 | Multiple preview servers | `astro preview --ignore-lock` | +| 7.3 | Logger in extension points | Custom image services (`transform(..., logger)`) and cache providers (`onRequest({ logger }, next)`) receive Astro's logger | + +Experimental (opt-in, not stable): `experimental.collectionStorage: 'chunked'` (7.1) and `experimental.incrementalBuild` + per-path `cacheKey` in `getStaticPaths()` (7.2). diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/output-modes.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/output-modes.md index 0352c11..dcdb830 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/output-modes.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/output-modes.md @@ -1,12 +1,12 @@ --- name: output-modes -description: Astro 6 output modes — static, server, hybrid — and when to use each +description: Astro 7 output modes — static, server, and hybrid rendering via per-route prerender — and when to use each when-to-use: configuring project output, choosing rendering strategy keywords: output, static, server, hybrid, prerender, SSR, SSG priority: high --- -# Astro 6 Output Modes +# Astro 7 Output Modes ## When to Use @@ -20,7 +20,9 @@ priority: high |------|--------|----------| | `static` | Default | All pages prerendered at build time | | `server` | `output: 'server'` | All pages rendered on demand | -| `hybrid` | `output: 'hybrid'` | Static by default, opt-in to server per route | +| Hybrid | `output: 'static'` + adapter | Static by default, opt-in to on-demand per route with `prerender = false` | + +`output` only accepts `'static' | 'server'` — the former `'hybrid'` value was merged into `'static'` (Astro 5) and is invalid in Astro 7. ## Configuration @@ -30,7 +32,7 @@ import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ - output: 'server', // or 'hybrid' + output: 'server', // or 'static' (default) + per-route prerender = false adapter: node({ mode: 'standalone' }), }); ``` @@ -44,7 +46,7 @@ export const prerender = true; --- --- -// In 'hybrid' mode — this route is server-rendered +// In 'static' mode (with an adapter) — this route is rendered on demand export const prerender = false; --- ``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/routing.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/routing.md index 634bebe..42446c5 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/routing.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/routing.md @@ -1,12 +1,12 @@ --- name: routing -description: Astro 6 file-based routing, dynamic routes, catch-all routes, endpoints +description: Astro 7 file-based routing, dynamic routes, catch-all routes, endpoints when-to-use: creating pages, dynamic routes, API endpoints keywords: routing, pages, dynamic, slug, catch-all, endpoint priority: high --- -# Astro 6 Routing +# Astro 7 Routing ## When to Use @@ -43,11 +43,26 @@ const { slug } = Astro.params; --- ``` +## Pagination URL Format (7.1+) + +`paginate()` accepts a `format` function to rewrite the generated `next`/`prev`/`first`/`last` URLs (e.g. for `build.format: 'file'` hosts without rewrites): + +```astro +--- +import { getCollection } from 'astro:content'; + +export async function getStaticPaths({ paginate }) { + const posts = await getCollection('blog'); + return paginate(posts, { pageSize: 10, format: (url) => `${url}.html` }); +} +--- +``` + ## Per-Route Prerender Override ```astro --- -// In hybrid/server mode: opt out of prerendering +// In static mode (with an adapter): render this route on demand export const prerender = false; --- @@ -71,3 +86,15 @@ export function GET({ request }) { ## `src/fetch.ts` (Advanced Routing) Reserved file, structured like `src/middleware.ts`, for advanced routing scenarios. Its resolution is controlled by the `fetchFile` config option, which can override the path or be set to `null` to disable it. + +```ts +// src/fetch.ts +import { astro, FetchState } from 'astro/fetch'; + +export default { + fetch(request: Request) { + const state = new FetchState(request); + return astro(state); // or compose astro/hono handlers: actions(), middleware(), pages(), i18n() + }, +}; +``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/basic-setup.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/basic-setup.md index 5a00d44..0eb6f18 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/basic-setup.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/basic-setup.md @@ -1,11 +1,11 @@ --- name: basic-setup -description: Complete Astro 6 project setup with TypeScript, output mode, and layout -when-to-use: starting a new Astro 6 project from scratch +description: Complete Astro 7 project setup with TypeScript, output mode, and layout +when-to-use: starting a new Astro 7 project from scratch keywords: setup, project, layout, typescript, config --- -# Astro 6 Basic Project Setup +# Astro 7 Basic Project Setup ## Project Structure @@ -68,7 +68,7 @@ const { title, description = 'My Astro site' } = Astro.props; import BaseLayout from '../layouts/BaseLayout.astro'; --- -

Welcome to Astro 6

+

Welcome to Astro 7

``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/config-example.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/config-example.md index 047f7cf..645c890 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/config-example.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-7/references/templates/config-example.md @@ -1,11 +1,11 @@ --- name: config-example -description: astro.config.ts examples for static, server, and hybrid modes with adapters +description: astro.config.ts examples for static, server, and hybrid (per-route prerender) setups with adapters when-to-use: configuring Astro output mode with adapter keywords: config, adapter, node, cloudflare, vercel, netlify, hybrid --- -# Astro 6 Config Examples +# Astro 7 Config Examples ## Static (Default) @@ -30,29 +30,31 @@ export default defineConfig({ }); ``` -## Hybrid Mode (Cloudflare) +## Hybrid (Cloudflare) + +There is no `output: 'hybrid'` — keep `output: 'static'` (default) and opt routes into on-demand rendering with `export const prerender = false`. ```typescript import { defineConfig } from 'astro/config'; -import cloudflare from '@astrojs/cloudflare'; +import cloudflare from '@astrojs/cloudflare'; // v14+ for Astro 7 import react from '@astrojs/react'; export default defineConfig({ - output: 'hybrid', - adapter: cloudflare({ mode: 'directory' }), + output: 'static', + adapter: cloudflare(), integrations: [react()], }); ``` ## Stable Fonts + CSP (Astro 7) -`fonts` and `csp` are stable top-level options — no `experimental` wrapper. The Rust compiler is now the only compiler and needs no flag. +`fonts` (top-level) and `security.csp` are stable — no `experimental` wrapper. The Rust compiler is now the only compiler and needs no flag. ```typescript import { defineConfig, fontProviders } from 'astro/config'; export default defineConfig({ - csp: true, + security: { csp: true }, fonts: [{ provider: fontProviders.google(), name: 'Inter', diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/SKILL.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/SKILL.md index 1470c31..1f9b063 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/SKILL.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/SKILL.md @@ -24,7 +24,7 @@ Before ANY implementation, use `TeamCreate` to spawn 3 agents: 1. **fuse-ai-pilot:explore-codebase** - Analyze existing image usage and asset patterns 2. **fuse-ai-pilot:research-expert** - Verify astro:assets API via Context7/Exa -3. **mcp__context7__query-docs** - Check Astro 6 Fonts API and image component docs +3. **mcp__context7__query-docs** - Check Astro 7 Fonts API and image component docs After implementation, run **fuse-ai-pilot:sniper** for validation. diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/fonts-api.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/fonts-api.md index 4431be6..8d88af9 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/fonts-api.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/fonts-api.md @@ -99,7 +99,7 @@ export default defineConfig({ ## Key Behaviors - Stable since Astro 6.0 — no `experimental` flag, safe for production use -- Automatic `font-display: optional` to eliminate CLS +- `font-display` defaults to `swap` (configurable per font via `display`); optimized fallbacks (`optimizedFallbacks`) limit CLS - Fonts subsetted and served locally at build time - `preload` on `` component adds `` - No external CDN requests in production diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/templates/image-setup.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/templates/image-setup.md index 95bc1ba..c1586ec 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/templates/image-setup.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-assets/references/templates/image-setup.md @@ -1,6 +1,6 @@ --- name: image-setup-template -description: Complete image optimization setup for Astro 6 with sharp, responsive images, and fonts +description: Complete image optimization setup for Astro 7 with sharp, responsive images, and fonts type: template --- @@ -9,7 +9,7 @@ type: template ## astro.config.mjs ```js -import { defineConfig } from 'astro/config'; +import { defineConfig, fontProviders } from 'astro/config'; export default defineConfig({ image: { @@ -17,15 +17,14 @@ export default defineConfig({ domains: ['images.unsplash.com', 'cdn.example.com'], remotePatterns: [{ protocol: 'https', hostname: '*.cloudinary.com' }], }, - experimental: { - fonts: [ - { - provider: 'google', - name: 'Inter', - cssVariable: '--font-sans', - }, - ], - }, + // Stable top-level option since Astro 6.0 (no experimental wrapper) + fonts: [ + { + provider: fontProviders.google(), + name: 'Inter', + cssVariable: '--font-sans', + }, + ], }); ``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/loaders.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/loaders.md index 79e45c9..c1c2c71 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/loaders.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/loaders.md @@ -31,6 +31,14 @@ const blog = defineCollection({ Supports: `.md`, `.mdx`, `.json`, `.yaml`, `.yml`, `.toml` +### `deferRender` (Astro 7.1+) + +By default `glob()` renders Markdown during sync and caches the HTML. For large collections, `deferRender: true` stores entries unrendered and renders on demand (like `.mdx`), lowering sync memory at the cost of cross-build HTML caching: + +```typescript +loader: glob({ pattern: '**/*.md', base: './src/content/docs', deferRender: true }), +``` + ## file() Loader ```typescript diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/mdx.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/mdx.md index ed1a7a8..fd28bb6 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/mdx.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-content/references/mdx.md @@ -22,25 +22,33 @@ Astro 7 switched the default Markdown renderer to **Sätteri** (PR #16966); `@as ```bash npx astro add mdx +# Only if you need remark/rehype plugins (unified pipeline): +npm install @astrojs/markdown-remark ``` ```typescript // astro.config.ts import { defineConfig } from 'astro/config'; import mdx from '@astrojs/mdx'; -import remarkGfm from 'remark-gfm'; +import { unified } from '@astrojs/markdown-remark'; +import remarkToc from 'remark-toc'; import rehypePrettyCode from 'rehype-pretty-code'; export default defineConfig({ integrations: [ + // `processor` (mdx 6+): MDX inherits `markdown.processor` by default; override it here mdx({ - remarkPlugins: [remarkGfm], - rehypePlugins: [[rehypePrettyCode, { theme: 'github-dark' }]], + processor: unified({ + remarkPlugins: [remarkToc], + rehypePlugins: [[rehypePrettyCode, { theme: 'github-dark' }]], + }), }), ], }); ``` +Top-level `markdown.remarkPlugins` / `markdown.rehypePlugins` are deprecated in Astro 7 (still work only with `@astrojs/markdown-remark` installed) — pass plugins to the processor instead. Sätteri has GFM, SmartyPants, heading IDs, math, and directives built in, and its own `mdastPlugins` / `hastPlugins` API (`satteri()` from `@astrojs/markdown-satteri`). + ## Using Components in MDX ```mdx @@ -69,7 +77,7 @@ const blog = defineCollection({ | Plugin | Purpose | |--------|---------| -| `remark-gfm` | GitHub-flavored Markdown (tables, strikethrough) | +| `remark-gfm` | GitHub-flavored Markdown (tables, strikethrough) — built into Sätteri and on by default | | `remark-toc` | Auto-generate table of contents | | `rehype-pretty-code` | Syntax highlighting | | `rehype-slug` | Auto-add IDs to headings | diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-db/SKILL.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-db/SKILL.md index 52074b1..49f477b 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-db/SKILL.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-db/SKILL.md @@ -11,14 +11,14 @@ related-skills: astro-7, astro-actions, astro-deployment Implements Astro DB (`@astrojs/db`): schema definition with `defineDb`/`defineTable` in `db/config.ts`, column types (`text`, `number`, `boolean`, `date`, `json`), type-safe CRUD via `db.select/insert/update/delete`, development seeding in `db/seed.ts`, and production deployment to Turso (libSQL) with `ASTRO_DB_REMOTE_URL`/`ASTRO_DB_APP_TOKEN` and `astro db push`. -Also covers integration with Astro Actions for end-to-end type-safe form-to-database flows. `@astrojs/db` is deprecated and no longer actively maintained (still published, v0.21.3, not removed from Astro 7) — for new projects this skill recommends Drizzle, Kysely, or a direct libSQL client instead; existing projects can keep using it but should plan a migration. +Also covers integration with Astro Actions for end-to-end type-safe form-to-database flows. `@astrojs/db` is deprecated on npm (last release v0.21.3, June 2026) and listed as **Removed** in the official Astro v7 upgrade guide — for new projects this skill recommends Drizzle, Kysely, `node:sqlite`, or a direct libSQL client instead; existing Astro 6 projects must migrate off it before upgrading to Astro 7. # Astro DB Type-safe SQL database built into Astro, powered by libSQL/Turso. Use for structured data without external backend services. -> **⚠️ Deprecation notice**: `@astrojs/db` is **deprecated and no longer actively maintained** (still published on npm, currently v0.21.3 — it has not been removed from Astro 7). For new projects, prefer **Drizzle**, **Kysely**, or a direct **libSQL** client instead. Existing projects can keep using it, but should plan a migration. +> **⚠️ Removal notice**: `@astrojs/db` is **deprecated on npm** ("Use a database client (Drizzle, Kysely, etc.) directly instead"; last release v0.21.3) and the **official Astro v7 upgrade guide lists it under "Removed"** — remove it from dependencies when upgrading. Replacements: Node's built-in **`node:sqlite`** (Node adapter), **Drizzle** directly, **Kysely**, or a **libSQL/Turso** client. The content below documents the legacy Astro 6 API for maintaining/migrating existing projects. ## Agent Workflow (MANDATORY) @@ -100,4 +100,4 @@ Combine with `astro:actions` for end-to-end type safety: Zod input validation 3. **`.returning()` after insert** - Get back inserted rows 4. **Push before deploy** - Run `astro db push` in CI/CD 5. **Turso free tier** - 500 databases, generous for production -6. **New projects: consider Drizzle/Kysely/libSQL instead** - `@astrojs/db` is deprecated and unmaintained; still usable for existing projects, but not recommended as a starting point +6. **New projects: use Drizzle/Kysely/`node:sqlite`/libSQL instead** - `@astrojs/db` is deprecated and listed as removed in the Astro v7 upgrade guide; migrate existing projects before upgrading to Astro 7 diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/SKILL.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/SKILL.md index 4e5ce6e..3d02797 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/SKILL.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/SKILL.md @@ -9,9 +9,9 @@ related-skills: astro-7, astro-db, astro-islands --- -Configures Astro 7 deployment across the four major adapters: `@astrojs/cloudflare` (Workers runtime, D1/KV/R2 bindings, workerd local dev via `platformProxy`, v13+ required), `@astrojs/vercel` (Serverless/Edge, built-in Image CDN, skew protection), `@astrojs/netlify` (Deno-based Edge Functions), and `@astrojs/node` (standalone server). +Configures Astro 7 deployment across the four major adapters: `@astrojs/cloudflare` v14 (Workers runtime, D1/KV/R2 bindings via `cloudflare:workers`, `astro dev` on workerd through the Cloudflare Vite plugin), `@astrojs/vercel` v11 (Serverless/Edge, built-in Image CDN, skew protection), `@astrojs/netlify` v8 (Deno-based Edge Functions), and `@astrojs/node` v11 (standalone server). -Also covers output-mode selection (`static`/`server`, per-page `prerender`), ISR patterns implemented via platform caching (Cloudflare KV or Vercel `stale-while-revalidate`, since Astro has no native ISR), and edge middleware for auth/redirects/A-B testing. Does not cover Astro DB setup itself (astro-db) or Islands hydration directives (astro-islands) beyond what's needed to pick a server adapter. +Also covers output-mode selection (`static`/`server`, per-page `prerender`), Astro 7's stable route caching (`cache` provider + `routeRules`, experimental CDN providers per adapter) alongside platform ISR (Vercel `isr`, Cloudflare KV, `stale-while-revalidate` headers), and edge middleware for auth/redirects/A-B testing. Does not cover Astro DB setup itself (astro-db) or Islands hydration directives (astro-islands) beyond what's needed to pick a server adapter. # Astro Deployment @@ -45,10 +45,10 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. | Platform | Package | Runtime | Notes | |----------|---------|---------|-------| -| Cloudflare | `@astrojs/cloudflare` v13+ | workerd | Astro 6: `astro dev` runs on workerd | -| Vercel | `@astrojs/vercel` | Node/Edge | Image CDN built-in | -| Netlify | `@astrojs/netlify` | Edge | Deno-based edge functions | -| Node.js | `@astrojs/node` | Node | Standalone server mode | +| Cloudflare | `@astrojs/cloudflare` v14 (Astro 7) | workerd | `astro dev` runs on workerd since Astro 6 (v13) | +| Vercel | `@astrojs/vercel` v11 | Node/Edge | Image CDN built-in | +| Netlify | `@astrojs/netlify` v8 | Edge | Deno-based edge functions | +| Node.js | `@astrojs/node` v11 | Node | Standalone server mode | --- @@ -62,11 +62,11 @@ After implementation, run **fuse-ai-pilot:sniper** for validation. ### Cloudflare Astro -Astro 6 runs `astro dev` on workerd — same runtime as production. Enables D1, KV, R2 bindings in local dev via `platformProxy`. No more simulation gaps. Requires `@astrojs/cloudflare` v13+ and Node.js 22+. +Since Astro 6, `astro dev` and `astro preview` run on workerd via the Cloudflare Vite plugin — same runtime as production, so D1, KV, R2 bindings work locally without `platformProxy` (no longer a documented adapter option). Access bindings with `import { env } from 'cloudflare:workers'` (`Astro.locals.runtime` was removed). Astro 7 requires `@astrojs/cloudflare` v14 (v13 peers `astro ^6`) and Node.js 22.12+. ### ISR Pattern -Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's `Cache-Control` with `stale-while-revalidate`. +Astro 7 ships stable route caching: set a `cache.provider` (`memoryCache()`, or the experimental `cacheVercel()` / `cacheNetlify()` / `cacheCloudflare()` CDN providers) and call `Astro.cache.set({ maxAge, swr, tags })` or declare `routeRules`. Platform alternatives remain: Vercel `isr`, Cloudflare KV as cache layer, or `Cache-Control` with `stale-while-revalidate`. ### Skew Protection @@ -99,7 +99,7 @@ On Vercel, enable skew protection to prevent asset mismatches between old client ## Best Practices 1. **Match adapter to platform early** - Switching adapters mid-project is painful -2. **Cloudflare: use v13+ for Astro 7** - Required for workerd local dev -3. **Node.js 22+ for Astro 7** - Drops Node 18/20 support +2. **Cloudflare: use v14 for Astro 7** - v13 targets Astro 6; workerd local dev since v13 +3. **Node.js 22.12+ for Astro 7** - `engines.node >=22.12.0`; Node 18/20 unsupported 4. **Per-page prerender** - Mix static and SSR for optimal performance -5. **Test bindings locally** - Cloudflare platformProxy enables local D1/KV/R2 +5. **Test bindings locally** - `astro dev` on workerd exposes local D1/KV/R2 (no `platformProxy` needed) diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/cloudflare-adapter.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/cloudflare-adapter.md index 591b00e..0a66e1c 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/cloudflare-adapter.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/cloudflare-adapter.md @@ -1,8 +1,8 @@ --- name: cloudflare-adapter -description: "@astrojs/cloudflare v13+ adapter for Astro 6 — Workers, D1, KV, R2, wrangler config" +description: "@astrojs/cloudflare v14 adapter for Astro 7 — Workers, D1, KV, R2, wrangler config" when-to-use: Deploying Astro to Cloudflare Workers with platform bindings -keywords: Cloudflare, Workers, D1, KV, R2, wrangler, platformProxy, astrojs/cloudflare +keywords: Cloudflare, Workers, D1, KV, R2, wrangler, cloudflare:workers, astrojs/cloudflare priority: high --- @@ -12,14 +12,14 @@ priority: high - Deploying to Cloudflare Workers (edge computing) - Using Cloudflare D1 (SQLite), KV (key-value), or R2 (object storage) -- Astro 6: `astro dev` runs on workerd (same as production) +- Since Astro 6: `astro dev` / `astro preview` run on workerd (same as production) ## Requirements -- `@astrojs/cloudflare` v13+ -- Astro 6+ -- Node.js 22+ -- Wrangler 4.x +- `@astrojs/cloudflare` v14 for Astro 7 (v13 targets Astro 6) +- Astro 7.2+ (peer range of v14) +- Node.js 22.12+ +- Wrangler 4.x (peer `^4.125.0`) ## Install @@ -36,14 +36,17 @@ import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ output: 'server', adapter: cloudflare({ - imageService: 'cloudflare', // Use Cloudflare's image resizing - platformProxy: { enabled: true }, // Enable D1/KV/R2 in dev + imageService: 'cloudflare-binding', // default since v13 (Cloudflare Images binding) }), }); ``` +Local bindings (D1/KV/R2) work in `astro dev` out of the box — the adapter runs the Cloudflare Vite plugin on workerd; `platformProxy` is no longer a documented option. + ## wrangler.toml +Optional for simple projects (Astro generates a default config). `wrangler.jsonc` is also supported and is what the official docs use. + ```toml name = "my-astro-app" compatibility_date = "2024-09-23" @@ -67,7 +70,8 @@ bucket_name = "my-bucket" ```ts // In .astro frontmatter or API routes -const { DB, KV, STORAGE } = Astro.locals.runtime.env; +import { env } from 'cloudflare:workers'; +const { DB, KV } = env; // D1 query const result = await DB.prepare('SELECT * FROM posts').all(); @@ -75,6 +79,10 @@ const result = await DB.prepare('SELECT * FROM posts').all(); // KV get/set await KV.put('key', 'value'); const val = await KV.get('key'); + +// cf object and execution context +const country = Astro.request.cf?.country; +Astro.locals.cfContext.waitUntil(somePromise); ``` ## Per-Page Prerender @@ -85,6 +93,24 @@ export const prerender = true; // Static export const prerender = false; // SSR (default in server mode) ``` -## Key Breaking Change (Astro 6) +## Key Breaking Change (Astro 6 / adapter v13) + +`Astro.locals.runtime` was removed: use `import { env } from 'cloudflare:workers'` for env/bindings, `Astro.request.cf` for the `cf` object, global `caches`, and `Astro.locals.cfContext` for the `ExecutionContext`. Cloudflare Pages deployment is no longer supported (Workers only). `Astro.glob()` removed — use `import.meta.glob()`. -`Astro.locals.runtime` API replaced. Access via `Astro.locals.runtime.env` directly. `Astro.glob()` removed — use `import.meta.glob()`. +## Astro 7.3: `finalize()` for Custom Worker Entrypoints + +With `@astrojs/cloudflare` 14.3+, custom `astro/fetch` pipelines should pass the response through `finalize()` to apply cookies and CDN cache defaults: + +```ts +import { astro, FetchState } from 'astro/fetch'; +import { cf, finalize } from '@astrojs/cloudflare/fetch'; + +export default { + async fetch(request: Request, env: Env, ctx: ExecutionContext) { + const state = new FetchState(request); + const asset = await cf(state, env, ctx); + if (asset) return asset; + return finalize(state, await astro(state)); + }, +}; +``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/edge-middleware.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/edge-middleware.md index 2fe1c2f..38fd980 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/edge-middleware.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/edge-middleware.md @@ -42,8 +42,8 @@ export const onRequest = defineMiddleware(async (context, next) => { import { defineMiddleware } from 'astro:middleware'; export const onRequest = defineMiddleware(async (context, next) => { - const runtime = context.locals.runtime; - const country = runtime?.cf?.country ?? 'US'; + // Astro.locals.runtime was removed in @astrojs/cloudflare v13 — read cf from the request + const country = context.request.cf?.country ?? 'US'; // Redirect to locale-specific page if (context.url.pathname === '/' && country === 'FR') { diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/isr-patterns.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/isr-patterns.md index 64fdd37..c4c6eeb 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/isr-patterns.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/isr-patterns.md @@ -14,7 +14,36 @@ priority: medium - Avoiding full site rebuilds for content updates - High-traffic pages needing both freshness and performance -## Astro Has No Native ISR +## Route Caching (Astro 7, stable) + +Astro has no Vercel-style ISR, but since 7.0 it ships a stable, platform-agnostic route cache for on-demand routes: + +```js +// astro.config.mjs +import { defineConfig, memoryCache } from 'astro/config'; +import node from '@astrojs/node'; + +export default defineConfig({ + adapter: node({ mode: 'standalone' }), + cache: { provider: memoryCache() }, // or cacheVercel() / cacheNetlify() / cacheCloudflare() (experimental CDN providers) + routeRules: { + '/blog/[...path]': { maxAge: 300, swr: 60 }, + }, +}); +``` + +```astro +--- +export const prerender = false; +if (Astro.cache.enabled) { + Astro.cache.set({ maxAge: 120, swr: 60, tags: ['home'] }); // context.cache in endpoints/middleware +} +--- +``` + +Invalidate with `cache.invalidate({ path })` or by tag. CDN providers: `@astrojs/vercel/cache` (v11+), `@astrojs/netlify/cache` (v8+), `@astrojs/cloudflare/cache` (v14+). + +## Platform Caching Alternatives Implement ISR-like behavior using platform caching: @@ -49,9 +78,10 @@ export async function GET() { ```ts // src/pages/api/blog/[slug].ts import type { APIRoute } from 'astro'; +import { env } from 'cloudflare:workers'; -export const GET: APIRoute = async ({ params, locals }) => { - const { KV } = locals.runtime.env; +export const GET: APIRoute = async ({ params }) => { + const { KV } = env; const cacheKey = `post:${params.slug}`; // Check cache first @@ -88,6 +118,7 @@ return new Response(html, { | Need | Solution | |------|----------| +| Any adapter, Astro 7 | `cache` provider + `Astro.cache.set()` / `routeRules` | | Vercel + simple TTL | Vercel ISR adapter option | | Cloudflare + fine control | KV cache with manual invalidation | | Any platform + headers | `Cache-Control: s-maxage + stale-while-revalidate` | diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/netlify-adapter.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/netlify-adapter.md index 425ceba..1b9b4d8 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/netlify-adapter.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/netlify-adapter.md @@ -29,7 +29,7 @@ import netlify from '@astrojs/netlify'; export default defineConfig({ output: 'server', adapter: netlify({ - edgeMiddleware: true, // Run middleware at edge + middlewareMode: 'edge', // Run middleware on Edge Functions (replaces edgeMiddleware) imageCDN: true, // Use Netlify Image CDN }), }); diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/cloudflare-setup.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/cloudflare-setup.md index 3f18300..860e99e 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/cloudflare-setup.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/cloudflare-setup.md @@ -1,6 +1,6 @@ --- name: cloudflare-setup-template -description: Complete Cloudflare Workers setup for Astro 6 with D1, KV, and R2 bindings +description: Complete Cloudflare Workers setup for Astro 7 (@astrojs/cloudflare v14) with D1, KV, and R2 bindings type: template --- @@ -25,16 +25,19 @@ export default defineConfig({ output: 'server', adapter: cloudflare({ imageService: 'cloudflare', - platformProxy: { enabled: true }, }), }); ``` +Bindings work in `astro dev` (workerd) without extra options — `platformProxy` is no longer a documented adapter option. + ## wrangler.toml +`main` is optional: when set, it must point to `@astrojs/cloudflare/entrypoints/server` (or your custom worker), not a built file. + ```toml name = "my-astro-app" -main = "./dist/server/index.js" +main = "@astrojs/cloudflare/entrypoints/server" compatibility_date = "2024-09-23" compatibility_flags = ["nodejs_compat"] @@ -66,9 +69,10 @@ CLOUDFLARE_ACCOUNT_ID=your-account-id ```ts import type { APIRoute } from 'astro'; +import { env } from 'cloudflare:workers'; -export const GET: APIRoute = async ({ locals }) => { - const { DB, CACHE } = locals.runtime.env; +export const GET: APIRoute = async () => { + const { DB, CACHE } = env; // Try cache first const cached = await CACHE.get('data'); diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/vercel-setup.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/vercel-setup.md index 1787a9b..eac6d55 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/vercel-setup.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/templates/vercel-setup.md @@ -1,6 +1,6 @@ --- name: vercel-setup-template -description: Complete Vercel setup for Astro 6 with Image CDN, ISR, and edge functions +description: Complete Vercel setup for Astro 7 (@astrojs/vercel v11) with Image CDN, ISR, and edge functions type: template --- @@ -28,7 +28,7 @@ export default defineConfig({ bypassToken: process.env.ISR_BYPASS_TOKEN, }, skewProtection: true, // Prevent asset mismatch on deploy - edgeMiddleware: false, // true = run middleware on edge + middlewareMode: 'classic', // 'edge' = run middleware as an edge function (replaces edgeMiddleware) }), }); ``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/vercel-adapter.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/vercel-adapter.md index 99dad47..923f5e6 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/vercel-adapter.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-deployment/references/vercel-adapter.md @@ -32,7 +32,7 @@ export default defineConfig({ imageService: true, // Use Vercel Image CDN isr: true, // Enable ISR skewProtection: true, // Prevent asset mismatches on deploy - edgeMiddleware: false, // Run middleware at edge (optional) + // middlewareMode: 'edge', // Run middleware as an edge function (replaces edgeMiddleware) }), }); ``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/content-translation.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/content-translation.md index 3b14b7f..1a13f63 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/content-translation.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/content-translation.md @@ -12,7 +12,7 @@ src/content/ ├── en/ │ ├── getting-started.mdx │ └── tutorial.mdx - ├── fr/ + ├── it/ │ ├── getting-started.mdx │ └── tutorial.mdx └── es/ @@ -20,7 +20,7 @@ src/content/ ``` ```typescript -// src/content/config.ts +// src/content.config.ts import { defineCollection, z } from 'astro:content'; const blog = defineCollection({ @@ -29,7 +29,7 @@ const blog = defineCollection({ title: z.string(), description: z.string(), pubDate: z.coerce.date(), - locale: z.enum(['en', 'fr', 'es']).optional() + locale: z.enum(['en', 'it', 'es']).optional() }) }); @@ -63,9 +63,9 @@ const translations = { nav: { home: 'Home', about: 'About', blog: 'Blog' }, hero: { title: 'Welcome', cta: 'Get Started' } }, - fr: { - nav: { home: 'Accueil', about: 'À propos', blog: 'Blog' }, - hero: { title: 'Bienvenue', cta: 'Commencer' } + es: { + nav: { home: 'Inicio', about: 'Acerca de', blog: 'Blog' }, + hero: { title: 'Bienvenido', cta: 'Empezar' } } } as const; diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/fallback.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/fallback.md index 668c4de..9804a54 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/fallback.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/fallback.md @@ -11,9 +11,9 @@ When a page doesn't exist for a specific locale, Astro can automatically serve t export default defineConfig({ i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es', 'pt'], + locales: ['en', 'it', 'es', 'pt'], fallback: { - fr: 'en', // French falls back to English + it: 'en', // Italian falls back to English es: 'en', // Spanish falls back to English pt: 'es' // Portuguese falls back to Spanish } @@ -23,17 +23,17 @@ export default defineConfig({ ## How It Works -If `/fr/new-feature` doesn't exist but `/new-feature` (English) does: +If `/it/new-feature` doesn't exist but `/new-feature` (English) does: -- Astro serves the English content at the `/fr/new-feature` URL +- Astro serves the English content at the `/it/new-feature` URL - No redirect — the URL stays the same - Useful during incremental translation ## Fallback Routing Strategy ```text -Request: /fr/about -→ Check: src/pages/fr/about.astro (missing) +Request: /it/about +→ Check: src/pages/it/about.astro (missing) → Fallback to 'en' → Serve: src/pages/about.astro (found → return English content) ``` diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/helper-functions.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/helper-functions.md index 7279cc4..de44d00 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/helper-functions.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/helper-functions.md @@ -23,12 +23,12 @@ Returns a relative URL for a locale. Respects routing strategy. --- import { getRelativeLocaleUrl } from 'astro:i18n'; -const frAbout = getRelativeLocaleUrl('fr', 'about'); // /fr/about -const frHome = getRelativeLocaleUrl('fr'); // /fr/ +const itAbout = getRelativeLocaleUrl('it', 'about'); // /it/about +const itHome = getRelativeLocaleUrl('it'); // /it/ const enAbout = getRelativeLocaleUrl('en', 'about'); // /about (no prefix) --- -Blog FR +Blog IT ``` ### getAbsoluteLocaleUrl(locale, path?, options?) @@ -36,8 +36,8 @@ const enAbout = getRelativeLocaleUrl('en', 'about'); // /about (no prefix) Returns an absolute URL. Requires `site` configured in `astro.config.mjs`. ```javascript -getAbsoluteLocaleUrl('fr', 'about') -// → https://example.com/fr/about +getAbsoluteLocaleUrl('it', 'about') +// → https://example.com/it/about ``` ### getRelativeLocaleUrlList(path?, options?) @@ -46,7 +46,7 @@ Returns relative URLs for ALL configured locales. ```javascript getRelativeLocaleUrlList('about') -// → ['/about', '/fr/about', '/es/about'] +// → ['/about', '/it/about', '/es/about'] ``` ### getAbsoluteLocaleUrlList(path?, options?) @@ -55,7 +55,7 @@ Returns absolute URLs for ALL configured locales. Used for hreflang generation. ```javascript getAbsoluteLocaleUrlList('about') -// → ['https://example.com/about', 'https://example.com/fr/about'] +// → ['https://example.com/about', 'https://example.com/it/about'] ``` ## Locale Mapping @@ -65,7 +65,7 @@ getAbsoluteLocaleUrlList('about') Returns the URL path segment for a locale. ```javascript -getPathByLocale('fr') // → 'fr' +getPathByLocale('it') // → 'it' ``` ### getLocaleByPath(path) @@ -73,7 +73,7 @@ getPathByLocale('fr') // → 'fr' Returns the locale for a given path segment. ```javascript -getLocaleByPath('fr') // → 'fr' +getLocaleByPath('it') // → 'it' ``` ## Options Parameter @@ -89,7 +89,7 @@ interface GetLocaleOptions { ## Active Link Detection -Unlike some frameworks that strip the locale from the routable path, Astro **keeps the locale prefix** in `Astro.url.pathname` (e.g. `/fr/about`). A naive `pathname === href` comparison breaks active-link highlighting once i18n is added — the helper below strips the locale prefix and the trailing slash before comparing, and treats the locale-root path as an exact match for the home link. +Unlike some frameworks that strip the locale from the routable path, Astro **keeps the locale prefix** in `Astro.url.pathname` (e.g. `/it/about`). A naive `pathname === href` comparison breaks active-link highlighting once i18n is added — the helper below strips the locale prefix and the trailing slash before comparing, and treats the locale-root path as an exact match for the home link. ```typescript // src/utils/isActiveLink.ts @@ -134,7 +134,7 @@ const links = [ import { getAbsoluteLocaleUrlList } from 'astro:i18n'; const currentPath = Astro.url.pathname.replace(/^\/[a-z]{2}(?=\/|$)/, '') || '/'; -const locales = ['en', 'fr', 'es']; +const locales = ['en', 'it', 'es']; --- diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/routing-config.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/routing-config.md index 888a75b..659ad34 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/routing-config.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/routing-config.md @@ -15,9 +15,9 @@ export default defineConfig({ i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es', 'de'], + locales: ['en', 'it', 'es', 'de'], routing: { - prefixDefaultLocale: false // /about (en), /fr/about, /es/about + prefixDefaultLocale: false // /about (en), /it/about, /es/about } } }); @@ -31,9 +31,9 @@ With `prefixDefaultLocale: false`: src/pages/ ├── index.astro # / → English (default) ├── about.astro # /about → English -├── fr/ -│ ├── index.astro # /fr/ → French -│ └── about.astro # /fr/about → French +├── it/ +│ ├── index.astro # /it/ → Italian +│ └── about.astro # /it/about → Italian └── es/ ├── index.astro # /es/ → Spanish └── about.astro # /es/about → Spanish @@ -44,7 +44,7 @@ src/pages/ ```astro --- // Available in any .astro page or component -const currentLocale = Astro.currentLocale; // 'en' | 'fr' | 'es' +const currentLocale = Astro.currentLocale; // 'en' | 'it' | 'es' --- @@ -55,9 +55,9 @@ const currentLocale = Astro.currentLocale; // 'en' | 'fr' | 'es' ```javascript i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es'], + locales: ['en', 'it', 'es'], fallback: { - fr: 'en', // Missing French pages fall back to English + it: 'en', // Missing Italian pages fall back to English es: 'en' } } diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/sitemap-hreflang.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/sitemap-hreflang.md index 0f3d990..cb3b20c 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/sitemap-hreflang.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/sitemap-hreflang.md @@ -26,7 +26,7 @@ export default defineConfig({ defaultLocale: 'en', locales: { en: 'en-US', // Path key → language attribute - fr: 'fr-FR', + it: 'it-IT', es: 'es-ES', de: 'de-DE' } @@ -36,7 +36,7 @@ export default defineConfig({ i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es', 'de'] + locales: ['en', 'it', 'es', 'de'] } }); ``` @@ -47,7 +47,7 @@ export default defineConfig({ https://example.com/about - + @@ -69,7 +69,7 @@ const { path } = Astro.props; const localeMap = { en: 'en-US', - fr: 'fr-FR', + it: 'it-IT', es: 'es-ES' }; diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/strategies.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/strategies.md index b6fffc2..d280745 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/strategies.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/strategies.md @@ -11,8 +11,8 @@ Default locale has no prefix. Other locales are prefixed. ``` / → English (default) /about → English -/fr/ → French -/fr/about → French +/it/ → Italian +/it/about → Italian /es/ → Spanish ``` @@ -27,8 +27,8 @@ All locales have a prefix, including the default. ``` /en/ → English /en/about → English -/fr/ → French -/fr/about → French +/it/ → Italian +/it/about → Italian ``` **Best for:** Sites with equal language weight, or when you want explicit locale in all URLs. @@ -39,7 +39,7 @@ All locales have a prefix, including the default. // prefix-other-locales (default) i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es'], + locales: ['en', 'it', 'es'], routing: { prefixDefaultLocale: false } @@ -48,7 +48,7 @@ i18n: { // prefix-always i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es'], + locales: ['en', 'it', 'es'], routing: { prefixDefaultLocale: true } @@ -62,11 +62,11 @@ i18n: { ```javascript // With prefixDefaultLocale: false getRelativeLocaleUrl('en', 'about') // → /about -getRelativeLocaleUrl('fr', 'about') // → /fr/about +getRelativeLocaleUrl('it', 'about') // → /it/about // With prefixDefaultLocale: true getRelativeLocaleUrl('en', 'about') // → /en/about -getRelativeLocaleUrl('fr', 'about') // → /fr/about +getRelativeLocaleUrl('it', 'about') // → /it/about ``` ## Choosing a Strategy diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/i18n-config.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/i18n-config.md index 52f097d..7e4632a 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/i18n-config.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/i18n-config.md @@ -17,7 +17,7 @@ export default defineConfig({ defaultLocale: 'en', locales: { en: 'en-US', - fr: 'fr-FR', + it: 'it-IT', es: 'es-ES' } } @@ -26,12 +26,12 @@ export default defineConfig({ i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'es'], + locales: ['en', 'it', 'es'], routing: { prefixDefaultLocale: false }, fallback: { - fr: 'en', + it: 'en', es: 'en' } } @@ -49,9 +49,9 @@ const translations = { nav: { home: 'Home', about: 'About', blog: 'Blog' }, footer: { copyright: '© 2026 Example. All rights reserved.' } }, - fr: { - nav: { home: 'Accueil', about: 'À propos', blog: 'Blog' }, - footer: { copyright: '© 2026 Example. Tous droits réservés.' } + it: { + nav: { home: 'Home', about: 'Chi siamo', blog: 'Blog' }, + footer: { copyright: '© 2026 Example. Tutti i diritti riservati.' } }, es: { nav: { home: 'Inicio', about: 'Acerca de', blog: 'Blog' }, @@ -72,7 +72,7 @@ export function useTranslations(locale: string): Translations { } ``` -## src/content/config.ts +## src/content.config.ts ```typescript import { defineCollection, z } from 'astro:content'; diff --git a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/language-switcher.md b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/language-switcher.md index e5f57eb..b3cb117 100644 --- a/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/language-switcher.md +++ b/.cursor-plugin/plugins/fuse-astro/skills/astro-i18n/references/templates/language-switcher.md @@ -17,12 +17,12 @@ const currentLocale = Astro.currentLocale ?? 'en'; const locales = [ { code: 'en', label: 'English', flag: '🇬🇧' }, - { code: 'fr', label: 'Français', flag: '🇫🇷' }, + { code: 'it', label: 'Italiano', flag: '🇮🇹' }, { code: 'es', label: 'Español', flag: '🇪🇸' } ]; // Strip locale prefix from current path for cross-locale linking -const cleanPath = currentPath.replace(/^\/(en|fr|es)\//, '/'); +const cleanPath = currentPath.replace(/^\/(en|it|es)\//, '/'); ---