fimo 2.4.0-staging.1 → 2.4.0-staging.11

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.
Files changed (77) hide show
  1. package/assets/skills/fimo-cli/SKILL.md +3 -2
  2. package/assets/skills/fimo-cli/references/agent-setup.md +2 -1
  3. package/assets/skills/fimo-cli/references/agents.md +13 -1
  4. package/assets/skills/fimo-cli/references/branches.md +4 -4
  5. package/assets/skills/fimo-cli/references/deploy.md +3 -6
  6. package/assets/skills/fimo-cli/references/domains.md +5 -5
  7. package/assets/skills/fimo-cli/references/forms.md +4 -2
  8. package/assets/skills/fimo-cli/references/history.md +2 -1
  9. package/assets/skills/fimo-cli/references/hosting.md +5 -4
  10. package/assets/skills/fimo-cli/references/preview.md +1 -1
  11. package/assets/skills/fimo-cli/references/projects.md +5 -5
  12. package/assets/skills/fimo-cli/references/site-checks.md +73 -0
  13. package/assets/skills/fimo-code/SKILL.md +1 -0
  14. package/assets/skills/fimo-code/references/assets.md +4 -2
  15. package/assets/skills/fimo-code/references/best-practices/next.md +0 -2
  16. package/assets/skills/fimo-code/references/content/schema.md +4 -1
  17. package/assets/skills/fimo-code/references/design.md +2 -2
  18. package/assets/skills/fimo-code/references/frameworks/astro.md +37 -1
  19. package/assets/skills/fimo-code/references/frameworks/compatibility.md +5 -5
  20. package/assets/skills/fimo-code/references/frameworks/hosting.md +23 -2
  21. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +7 -21
  22. package/assets/skills/fimo-code/references/frameworks/next/seo.md +168 -0
  23. package/assets/skills/fimo-code/references/frameworks/next.md +1 -1
  24. package/assets/skills/fimo-code/references/frameworks/seo-head.md +78 -0
  25. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +57 -4
  26. package/assets/skills/fimo-migration/SKILL.md +33 -33
  27. package/assets/skills/fimo-migration/references/content.md +1 -1
  28. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +7 -0
  29. package/assets/skills/fimo-migration/references/import-contract.md +4 -6
  30. package/assets/skills/fimo-migration/references/manifest.md +4 -3
  31. package/assets/skills/fimo-migration/references/qa.md +6 -0
  32. package/assets/skills/fimo-migration/references/questions-and-improvements.md +1 -1
  33. package/assets/skills/fimo-migration/references/workflow.md +7 -5
  34. package/assets/skills/fimo-studio/references/agents.md +7 -1
  35. package/assets/skills/fimo-studio/references/billing-and-credits.md +21 -7
  36. package/assets/skills/fimo-studio/references/seo-settings.md +2 -0
  37. package/dist/cli/bundle.json +2 -2
  38. package/dist/cli/index.js +502 -986
  39. package/dist/runtime/astro/server-runtime.js +2 -2
  40. package/dist/runtime/paths/get-fimo-paths.js +1 -1
  41. package/dist/runtime/seo/head.d.ts +31 -0
  42. package/dist/runtime/seo/head.js +47 -0
  43. package/dist/runtime/seo/index.d.ts +2 -0
  44. package/dist/runtime/seo/index.js +1 -0
  45. package/dist/runtime/seo/resolver.d.ts +16 -2
  46. package/dist/runtime/seo/resolver.js +10 -0
  47. package/dist/runtime/seo/server.d.ts +13 -0
  48. package/dist/runtime/seo/server.js +23 -0
  49. package/dist/runtime/shared/branch-identity.d.ts +3 -5
  50. package/dist/runtime/shared/branch-identity.js +3 -5
  51. package/dist/runtime/shared/fimo-config.server.d.ts +2 -0
  52. package/dist/runtime/shared/fimo-config.server.js +18 -14
  53. package/dist/scripts/export-static.d.ts +3 -4
  54. package/dist/scripts/export-static.js +3 -20
  55. package/dist/scripts/sync-schemas.js +12 -5
  56. package/package.json +12 -8
  57. package/templates/astro/.fimo/config.json +1 -0
  58. package/templates/astro/AGENTS.md +1 -1
  59. package/templates/astro/astro.config.mjs +1 -0
  60. package/templates/astro/package.json +2 -2
  61. package/templates/astro/src/layouts/Base.astro +20 -4
  62. package/templates/astro/src/pages/[locale]/index.astro +1 -1
  63. package/templates/astro/src/pages/[locale]/projects/[slug].astro +4 -1
  64. package/templates/astro/src/pages/index.astro +1 -1
  65. package/templates/astro/src/pages/projects/[slug].astro +4 -1
  66. package/templates/nextjs/AGENTS.md +1 -1
  67. package/templates/nextjs/package.json +3 -3
  68. package/templates/nextjs/src/app/layout.tsx +5 -3
  69. package/templates/nextjs/src/app/page.tsx +6 -0
  70. package/templates/react-router/package.json +4 -4
  71. package/templates/sveltekit/AGENTS.md +1 -1
  72. package/templates/sveltekit/package.json +2 -2
  73. package/templates/sveltekit/src/routes/+layout.server.ts +4 -0
  74. package/templates/sveltekit/src/routes/+layout.svelte +12 -0
  75. package/templates/sveltekit/src/routes/[[locale=locale]]/+page.svelte +0 -5
  76. package/templates/vite/package.json +4 -4
  77. package/assets/skills/fimo-migration/scripts/build-canonical-manifest.mjs +0 -595
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@tanstack/react-query": "^5.80.6",
15
- "fimo": "2.4.0-staging.1",
16
- "fimo-next": "2.4.0-staging.1",
17
- "fimo-react": "2.4.0-staging.1",
15
+ "fimo": "2.4.0-staging.11",
16
+ "fimo-next": "2.4.0-staging.11",
17
+ "fimo-react": "2.4.0-staging.11",
18
18
  "next": "^16.3.3",
19
19
  "react": "^19.2.7",
20
20
  "react-dom": "^19.2.7"
@@ -1,12 +1,14 @@
1
- import { FimoProvider, buildFimoMetadata, buildFimoViewport } from 'fimo-next';
1
+ import { FimoProvider } from 'fimo-next';
2
+ import { toNextMetadata, toNextViewport } from 'fimo-next/seo';
3
+ import { getFimoSeo } from 'fimo/seo/server';
2
4
  import type { ReactNode } from 'react';
3
5
 
4
6
  import { defaultLocale } from '../locales';
5
7
 
6
8
  import './globals.css';
7
9
 
8
- export const generateMetadata = () => buildFimoMetadata();
9
- export const generateViewport = () => buildFimoViewport();
10
+ export const generateMetadata = () => toNextMetadata(getFimoSeo());
11
+ export const generateViewport = () => toNextViewport(getFimoSeo());
10
12
 
11
13
  export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
12
14
  return (
@@ -1,3 +1,9 @@
1
+ import { toNextMetadata, toNextViewport } from 'fimo-next/seo';
2
+ import { getFimoSeo } from 'fimo/seo/server';
3
+
4
+ export const generateMetadata = () => toNextMetadata(getFimoSeo({ pathname: '/' }));
5
+ export const generateViewport = () => toNextViewport(getFimoSeo({ pathname: '/' }));
6
+
1
7
  export default function HomePage() {
2
8
  return (
3
9
  <div className="starter">
@@ -21,10 +21,10 @@
21
21
  "cn": "0.2.4",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "2.4.0-staging.1",
25
- "fimo-react": "2.4.0-staging.1",
26
- "fimo-react-router": "2.4.0-staging.1",
27
- "fimo-vite": "2.4.0-staging.1",
24
+ "fimo": "2.4.0-staging.11",
25
+ "fimo-react": "2.4.0-staging.11",
26
+ "fimo-react-router": "2.4.0-staging.11",
27
+ "fimo-vite": "2.4.0-staging.11",
28
28
  "input-otp": "^1.4.2",
29
29
  "isbot": "^5",
30
30
  "lucide-react": "^0.577.0",
@@ -32,7 +32,7 @@ a code-only task, or use `npx fimo@latest` for project-local code generation and
32
32
  - Preserve the native `[[locale=locale]]` route boundary. The optional parameter keeps the default locale at `/`; the matcher prevents ordinary top-level routes from being mistaken for locales. The root server layout passes the tracked `event.params` through `resolveLocale`, then sends that locale to `getLabels` and `FimoProvider`. Remove the extra brackets only when every locale must be prefixed.
33
33
  - Keep the document language request-aware: `src/hooks.server.ts` renders the initial `<html lang>`, and the root layout updates it after client navigation.
34
34
  - Keep `.fimo/config.json#routes` as Studio metadata aligned with SvelteKit's route files. It does not configure SvelteKit routing.
35
- - The application owns routes, locale resolution, links, HTML language/direction, and SEO. Fimo connects to those decisions.
35
+ - The application owns routes, locale resolution, links and SEO. Return final `seoHead` from route loads using `resolveSeoForPath` and `toSeoHead` from `fimo/seo`. The root renders `page.data.seoHead` once. Content pages supply route data; do not add competing page head tags. Check client navigation for stale tags.
36
36
  - Do not add a second deployment platform.
37
37
  - Never edit `.fimo/project.json`; it links this directory to the remote project.
38
38
  - 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`.
@@ -11,8 +11,8 @@
11
11
  "prepare": "svelte-kit sync"
12
12
  },
13
13
  "dependencies": {
14
- "fimo": "2.4.0-staging.1",
15
- "fimo-sveltekit": "2.4.0-staging.1"
14
+ "fimo": "2.4.0-staging.11",
15
+ "fimo-sveltekit": "2.4.0-staging.11"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@sveltejs/kit": "^2.70.2",
@@ -1,12 +1,16 @@
1
1
  import { getLabels } from 'fimo-sveltekit';
2
+ import { resolveSeoForPath, toSeoHead } from 'fimo/seo';
2
3
 
4
+ import fimoConfig from '../../.fimo/config.json';
3
5
  import { resolveLocale } from '../locales';
4
6
 
5
7
  export async function load(event) {
6
8
  const locale = resolveLocale(event.params);
9
+ const seo = resolveSeoForPath(event.url.pathname, fimoConfig);
7
10
 
8
11
  return {
9
12
  locale,
13
+ seoHead: toSeoHead(seo, { canonicalUrl: seo?.url ? new URL(event.url.pathname, seo.url).href : undefined }),
10
14
  labels: await getLabels({ event, locale }),
11
15
  };
12
16
  }
@@ -1,17 +1,29 @@
1
1
  <script lang="ts">
2
2
  import { afterNavigate } from '$app/navigation';
3
+ import { page } from '$app/state';
3
4
  import { FimoProvider } from 'fimo-sveltekit/components';
4
5
  import type { Snippet } from 'svelte';
5
6
 
6
7
  import type { LayoutData } from './$types';
7
8
 
8
9
  let { data, children }: { data: LayoutData; children: Snippet } = $props();
10
+ const head = $derived(page.data.seoHead ?? { meta: [], links: [] });
9
11
 
10
12
  afterNavigate(() => {
11
13
  document.documentElement.lang = data.locale;
12
14
  });
13
15
  </script>
14
16
 
17
+ <svelte:head>
18
+ <title>{head.title ?? 'Fimo + SvelteKit'}</title>
19
+ {#each head.meta as attributes}
20
+ <meta {...attributes} />
21
+ {/each}
22
+ {#each head.links as attributes}
23
+ <link {...attributes} />
24
+ {/each}
25
+ </svelte:head>
26
+
15
27
  <FimoProvider labels={data.labels}>
16
28
  {@render children()}
17
29
  </FimoProvider>
@@ -1,8 +1,3 @@
1
- <svelte:head>
2
- <title>Fimo + SvelteKit</title>
3
- <meta name="description" content="A new Fimo project." />
4
- </svelte:head>
5
-
6
1
  <div class="starter">
7
2
  <main class="starter-main">
8
3
  <div class="starter-panel">
@@ -11,10 +11,10 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@tanstack/react-query": "^5.80.6",
14
- "fimo": "2.4.0-staging.1",
15
- "fimo-react": "2.4.0-staging.1",
16
- "fimo-react-router": "2.4.0-staging.1",
17
- "fimo-vite": "2.4.0-staging.1",
14
+ "fimo": "2.4.0-staging.11",
15
+ "fimo-react": "2.4.0-staging.11",
16
+ "fimo-react-router": "2.4.0-staging.11",
17
+ "fimo-vite": "2.4.0-staging.11",
18
18
  "react": "^19.2.7",
19
19
  "react-dom": "^19.2.7",
20
20
  "react-router": "^8.3.0"