fimo 2.2.0-staging.15 → 2.2.0-staging.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,7 +109,18 @@ Do not add `'use client'` to a page solely because Fimo is present. Keep promise
109
109
 
110
110
  ## Metadata
111
111
 
112
- Next remains in control through `generateMetadata`. Resolve labels/content on the server and convert tracked strings only where Next expects primitives:
112
+ Fimo owns the site-wide defaults; the application owns per-page overrides. Keep (or add) the starter wiring in the root layout — it maps `.fimo/config.json#seo` (Studio's Settings → SEO: title, description, favicon, share image, robots, theme color, canonical) onto Next `Metadata`/`Viewport`:
113
+
114
+ ```ts
115
+ import { buildFimoMetadata, buildFimoViewport } from 'fimo-next';
116
+
117
+ export const generateMetadata = () => buildFimoMetadata();
118
+ export const generateViewport = () => buildFimoViewport();
119
+ ```
120
+
121
+ If the root layout lacks this wiring, add it (updating the fimo packages if `fimo-next` does not export the helpers); without it, Settings → SEO never reaches the rendered head.
122
+
123
+ Per-page `metadata`/`generateMetadata` exports override the defaults field by field. Resolve labels/content on the server and convert tracked strings only where Next expects primitives:
113
124
 
114
125
  ```ts
115
126
  export async function generateMetadata() {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this reference when `fimo describe --json` reports `framework.slug: "nextjs"`, or the project uses an App Router (`app/` or `src/app/`) or Pages Router (`pages/` or `src/pages/`) tree.
4
4
 
5
- Fimo supports schema-first content in both routers across static generation, ISR, request-time rendering, and Client Components. The application owns routes, locale resolution, links, `<html lang/dir>`, and SEO. Fimo receives the resolved locale and supplies content, labels, source metadata, and client editing context.
5
+ Fimo supports schema-first content in both routers across static generation, ISR, request-time rendering, and Client Components. The application owns routes, locale resolution, links, `<html lang/dir>`, and per-page SEO overrides. Fimo receives the resolved locale and supplies content, labels, source metadata, client editing context, and the site-wide SEO defaults (App Router: `buildFimoMetadata`/`buildFimoViewport` in the root layout — see the router reference's Metadata section).
6
6
 
7
7
  ## Choose the router reference
8
8
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-09-01T10:25:33.582Z",
4
+ "bundledAt": "2026-09-01T11:14:02.951Z",
5
5
  "cliVersion": "2.1.0",
6
6
  "external": [
7
7
  "oxc-parser",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "2.2.0-staging.15",
3
+ "version": "2.2.0-staging.16",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "keywords": [
6
6
  "astro-component"
@@ -189,13 +189,13 @@
189
189
  "devDependencies": {
190
190
  "@clack/core": "^1.2.0",
191
191
  "@clack/prompts": "^1.2.0",
192
- "@fimo/agents-bundle": "2.2.0-staging.15",
193
- "@fimo/api-contracts": "2.2.0-staging.15",
194
- "@fimo/cli-kit": "2.2.0-staging.15",
195
- "@fimo/framework-detect": "2.2.0-staging.15",
196
- "@fimo/routes": "2.2.0-staging.15",
197
- "@fimo/sdk": "2.2.0-staging.15",
198
- "@fimo/tsconfig": "2.2.0-staging.15",
192
+ "@fimo/agents-bundle": "2.2.0-staging.16",
193
+ "@fimo/api-contracts": "2.2.0-staging.16",
194
+ "@fimo/cli-kit": "2.2.0-staging.16",
195
+ "@fimo/framework-detect": "2.2.0-staging.16",
196
+ "@fimo/routes": "2.2.0-staging.16",
197
+ "@fimo/sdk": "2.2.0-staging.16",
198
+ "@fimo/tsconfig": "2.2.0-staging.16",
199
199
  "@types/node": "22.18.6",
200
200
  "agent-install": "^0.0.5",
201
201
  "astro": "^7.1.6",
@@ -9,8 +9,8 @@
9
9
  "check": "astro sync && astro check"
10
10
  },
11
11
  "dependencies": {
12
- "fimo": "2.2.0-staging.15",
13
- "fimo-astro": "2.2.0-staging.15"
12
+ "fimo": "2.2.0-staging.16",
13
+ "fimo-astro": "2.2.0-staging.16"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@astrojs/check": "^0.9.10",
@@ -40,7 +40,7 @@ The scaffolded homepage is disposable. Replace it on the first real generation.
40
40
  - Next's `app` tree is the router and stays authoritative: the default shell is one ordinary root layout plus `/` as the homepage, and unknown paths get Next's native 404. When a product requires locale URLs, implement the framework-native strategy (`[locale]` segments, middleware, cookies, domains, or an i18n library), pass the resolved locale into Fimo server reads and `FimoProvider`, and load `fimo skills get fimo-code --ref frameworks/next/locales` first. Do not impose locale-prefixed URLs on a default-only project.
41
41
  - `FimoProvider` owns the optional Studio preview runtime. Do not add a preview bridge component, read Fimo preview environment variables, or inject Fimo scripts in application code.
42
42
  - Keep `.fimo/config.json#routes` as Studio metadata, not as the Next.js router. Describe only URLs the application actually serves; add a `:locale` segment to a route's metadata only after the application implements that locale routing. There, `params.locale.optional: true` means omit the configured default locale from the URL; use `optional: false` only when every locale, including the default, must be prefixed.
43
- - The application owns routes, locale resolution, links, HTML language/direction, and SEO. Fimo connects to those decisions.
43
+ - The application owns routes, locale resolution, links, HTML language/direction, and per-page SEO overrides. Fimo supplies the site-wide SEO defaults (title, description, favicon, share image) from `.fimo/config.json#seo` through the root layout's `generateMetadata`/`generateViewport` (`buildFimoMetadata`/`buildFimoViewport` from `fimo-next`); keep that wiring, and add page-level `metadata`/`generateMetadata` exports where a page needs its own values — they merge over the defaults.
44
44
  - Do not add a second deployment platform.
45
45
  - Never edit `.fimo/project.json`; it links this directory to the remote project.
46
46
  - Keep `.fimo/config.json#runtime` true to the code: framework, `dev`/`build`/`install` commands, output directory. Update it when you rename a package script, move the build output, or change framework; the reference is `fimo skills get fimo-code --ref frameworks/hosting`.
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@tanstack/react-query": "^5.80.6",
15
- "fimo": "2.2.0-staging.15",
16
- "fimo-next": "2.2.0-staging.15",
17
- "fimo-react": "2.2.0-staging.15",
15
+ "fimo": "2.2.0-staging.16",
16
+ "fimo-next": "2.2.0-staging.16",
17
+ "fimo-react": "2.2.0-staging.16",
18
18
  "next": "^16.3.3",
19
19
  "react": "^19.2.7",
20
20
  "react-dom": "^19.2.7"
@@ -1,10 +1,13 @@
1
- import { FimoProvider } from 'fimo-next';
1
+ import { FimoProvider, buildFimoMetadata, buildFimoViewport } from 'fimo-next';
2
2
  import type { ReactNode } from 'react';
3
3
 
4
4
  import { defaultLocale } from '../locales';
5
5
 
6
6
  import './globals.css';
7
7
 
8
+ export const generateMetadata = () => buildFimoMetadata();
9
+ export const generateViewport = () => buildFimoViewport();
10
+
8
11
  export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
9
12
  return (
10
13
  <html lang={defaultLocale}>
@@ -21,10 +21,10 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "2.2.0-staging.15",
25
- "fimo-react": "2.2.0-staging.15",
26
- "fimo-react-router": "2.2.0-staging.15",
27
- "fimo-vite": "2.2.0-staging.15",
24
+ "fimo": "2.2.0-staging.16",
25
+ "fimo-react": "2.2.0-staging.16",
26
+ "fimo-react-router": "2.2.0-staging.16",
27
+ "fimo-vite": "2.2.0-staging.16",
28
28
  "input-otp": "^1.4.2",
29
29
  "isbot": "^5",
30
30
  "lucide-react": "^0.577.0",
@@ -11,8 +11,8 @@
11
11
  "prepare": "svelte-kit sync"
12
12
  },
13
13
  "dependencies": {
14
- "fimo": "2.2.0-staging.15",
15
- "fimo-sveltekit": "2.2.0-staging.15"
14
+ "fimo": "2.2.0-staging.16",
15
+ "fimo-sveltekit": "2.2.0-staging.16"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@sveltejs/kit": "^2.70.2",
@@ -11,10 +11,10 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@tanstack/react-query": "^5.80.6",
14
- "fimo": "2.2.0-staging.15",
15
- "fimo-react": "2.2.0-staging.15",
16
- "fimo-react-router": "2.2.0-staging.15",
17
- "fimo-vite": "2.2.0-staging.15",
14
+ "fimo": "2.2.0-staging.16",
15
+ "fimo-react": "2.2.0-staging.16",
16
+ "fimo-react-router": "2.2.0-staging.16",
17
+ "fimo-vite": "2.2.0-staging.16",
18
18
  "react": "^19.2.7",
19
19
  "react-dom": "^19.2.7",
20
20
  "react-router": "^8.3.0"