create-smoodly-app 0.0.49 → 0.0.50
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.
- package/package.json +1 -1
- package/templates/astro-blank/package.json +1 -1
- package/templates/astro-blank-intl/package.json +1 -1
- package/templates/astro-lorem/package.json +1 -1
- package/templates/astro-lorem-intl/package.json +1 -1
- package/templates/blank/README.md +1 -2
- package/templates/blank/app/(site)/[[...path]]/page.tsx +23 -0
- package/templates/blank/package.json +1 -1
- package/templates/blank/smoodly/server.ts +10 -10
- package/templates/blank-intl/README.md +1 -2
- package/templates/blank-intl/app/[locale]/[[...path]]/page.tsx +25 -0
- package/templates/blank-intl/package.json +1 -1
- package/templates/blank-intl/smoodly/server.ts +10 -10
- package/templates/lorem/README.md +1 -2
- package/templates/lorem/app/(site)/[[...path]]/page.tsx +23 -0
- package/templates/lorem/package.json +1 -1
- package/templates/lorem/smoodly/server.ts +10 -10
- package/templates/lorem-intl/README.md +1 -2
- package/templates/lorem-intl/app/[locale]/[[...path]]/page.tsx +25 -0
- package/templates/lorem-intl/package.json +1 -1
- package/templates/lorem-intl/smoodly/server.ts +10 -10
- package/templates/blank/app/(site)/[...path]/page.tsx +0 -15
- package/templates/blank/app/(site)/page.tsx +0 -11
- package/templates/blank-intl/app/[locale]/[...path]/page.tsx +0 -18
- package/templates/blank-intl/app/[locale]/page.tsx +0 -15
- package/templates/lorem/app/(site)/[...path]/page.tsx +0 -15
- package/templates/lorem/app/(site)/page.tsx +0 -11
- package/templates/lorem-intl/app/[locale]/[...path]/page.tsx +0 -18
- package/templates/lorem-intl/app/[locale]/page.tsx +0 -15
package/package.json
CHANGED
|
@@ -8,8 +8,7 @@ for an agent (or a person) building the site.
|
|
|
8
8
|
|
|
9
9
|
## Where things are
|
|
10
10
|
|
|
11
|
-
- `app/(site)/page.tsx` — the home page
|
|
12
|
-
- `app/(site)/[...path]/page.tsx` — every other page and every collection entry, at any depth.
|
|
11
|
+
- `app/(site)/[[...path]]/page.tsx` — every CMS URL: the home, every page at any depth and every collection entry, rendered on first visit and cached until a publish expires it.
|
|
13
12
|
- `app/(site)/layout.tsx` — the site's root layout: `app/globals.css`, the footer line from the `site` item. The admin is one route, `app/(smoodly)/admin/[[...segments]]/route.ts`, and takes no layout.
|
|
14
13
|
- `components/pages/` — the page shapes and the entry page: `Home` (fixed at /, one freeform zone), `Page` (open, editors create many), `Post` (the entry page for posts).
|
|
15
14
|
- `components/sections/Text.schema.ts` and `Text.tsx` — the one section: a title and a richtext body. The schema is listed in `smoodly/sections.ts`, the component in `smoodly/views.ts`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
+
|
|
3
|
+
type Params = Promise<{ path?: string[] }>;
|
|
4
|
+
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
|
|
6
|
+
// Smoodly: every CMS URL — the home (no segments), pages at any depth and
|
|
7
|
+
// collection entries under their `path`. A route file of your own beside
|
|
8
|
+
// this one, app/(site)/<segment>/page.tsx, wins for that exact path; deeper
|
|
9
|
+
// paths still resolve here. Each address renders on its first visit and is
|
|
10
|
+
// served from the cache until a publish expires it, so nothing in a page
|
|
11
|
+
// under this route may read cookies, headers or search params (a page that
|
|
12
|
+
// needs them is its own route file).
|
|
13
|
+
export function generateStaticParams() {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function generateMetadata({ params }: { params: Params }) {
|
|
18
|
+
return smoodlyMetadata((await params).path ?? []);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
22
|
+
return renderSmoodlyPath((await params).path ?? [], { searchParams });
|
|
23
|
+
}
|
|
@@ -16,8 +16,7 @@ import {
|
|
|
16
16
|
// The admin's server pieces: the sign-in check and the content API. No browser code lives in the package's
|
|
17
17
|
// entries; the admin itself is prebuilt and served by app/(smoodly)/admin/[[...segments]]/route.ts.
|
|
18
18
|
import { createSmoodlyContent, supabaseAdminAuth, type AdminAuth, type AuthConfig, type SmoodlyContent } from "smoodly/admin";
|
|
19
|
-
import { createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
20
|
-
import { connection } from "next/server";
|
|
19
|
+
import { buildGate, createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
21
20
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
22
21
|
import { collections, config, globals } from "./config";
|
|
23
22
|
import { views } from "./views";
|
|
@@ -97,16 +96,17 @@ export const href = (path: string, _locale: string) => path;
|
|
|
97
96
|
export const q = (): Queries =>
|
|
98
97
|
new Proxy({} as Queries, {
|
|
99
98
|
get: (_, name) => async (...args: unknown[]) => {
|
|
100
|
-
await
|
|
99
|
+
await buildGate();
|
|
101
100
|
return (bound().q as unknown as Record<string | symbol, (...a: unknown[]) => unknown>)[name](...args);
|
|
102
101
|
},
|
|
103
102
|
});
|
|
104
103
|
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
// reading a global through q() included (2026-10-02, tester round 6).
|
|
104
|
+
// The gate first, then the env: `buildGate()` waits for a request while `next build` prerenders, so a
|
|
105
|
+
// route file without a dynamic segment reads nothing at build and the build needs no keys — a layout
|
|
106
|
+
// reading a global through q() included (2026-10-02, tester round 6). At run time it does nothing: a
|
|
107
|
+
// CMS route renders on its first visit and is cached until a publish expires it (plan 2026-10-09).
|
|
108
108
|
/** The two route files call these. */
|
|
109
|
-
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await
|
|
110
|
-
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await
|
|
111
|
-
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await
|
|
112
|
-
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await
|
|
109
|
+
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPath(...args); };
|
|
110
|
+
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyMetadata(...args); };
|
|
111
|
+
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPage(...args); };
|
|
112
|
+
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyPageMetadata(...args); };
|
|
@@ -8,8 +8,7 @@ for an agent (or a person) building the site.
|
|
|
8
8
|
|
|
9
9
|
## Where things are
|
|
10
10
|
|
|
11
|
-
- `app/[locale]/page.tsx` — the home page
|
|
12
|
-
- `app/[locale]/[...path]/page.tsx` — every other page and every collection entry, at any depth, with translated segments per locale.
|
|
11
|
+
- `app/[locale]/[[...path]]/page.tsx` — every CMS URL: the home, every page at any depth and every collection entry, with translated segments per locale, rendered on first visit and cached until a publish expires it.
|
|
13
12
|
- `app/[locale]/layout.tsx` — the site's root layout: `app/globals.css`, the footer line from the `site` item. The admin is one route, `app/(smoodly)/admin/[[...segments]]/route.ts`, and takes no layout.
|
|
14
13
|
- `i18n/routing.ts` — the locales and the default; `smoodly/config.ts` reads them from here. `i18n/request.ts` and `i18n/navigation.ts` are next-intl's stock files; `proxy.ts` is its locale routing (`/admin` excluded). UI strings go in `messages/<locale>.json`.
|
|
15
14
|
- `components/pages/` — the page shapes and the entry page: `Home` (fixed at /, one freeform zone), `Page` (open, editors create many), `Post` (the entry page for posts).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
+
|
|
3
|
+
type Params = Promise<{ locale: string; path?: string[] }>;
|
|
4
|
+
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
|
|
6
|
+
// Smoodly: every CMS URL in this language — the home (no segments), pages
|
|
7
|
+
// at any depth and collection entries under their `path`. A route file of
|
|
8
|
+
// your own beside this one, app/[locale]/<segment>/page.tsx, wins for that
|
|
9
|
+
// exact path; deeper paths still resolve here. Each address renders on its
|
|
10
|
+
// first visit and is served from the cache until a publish expires it, so
|
|
11
|
+
// nothing in a page under this route may read cookies, headers or search
|
|
12
|
+
// params (a page that needs them is its own route file).
|
|
13
|
+
export function generateStaticParams() {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function generateMetadata({ params }: { params: Params }) {
|
|
18
|
+
const { locale, path = [] } = await params;
|
|
19
|
+
return smoodlyMetadata(path, { locale });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
23
|
+
const { locale, path = [] } = await params;
|
|
24
|
+
return renderSmoodlyPath(path, { locale, searchParams });
|
|
25
|
+
}
|
|
@@ -16,8 +16,7 @@ import {
|
|
|
16
16
|
// The admin's server pieces: the sign-in check and the content API. No browser code lives in the package's
|
|
17
17
|
// entries; the admin itself is prebuilt and served by app/(smoodly)/admin/[[...segments]]/route.ts.
|
|
18
18
|
import { createSmoodlyContent, supabaseAdminAuth, type AdminAuth, type AuthConfig, type SmoodlyContent } from "smoodly/admin";
|
|
19
|
-
import { createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
20
|
-
import { connection } from "next/server";
|
|
19
|
+
import { buildGate, createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
21
20
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
22
21
|
import { getPathname } from "@/i18n/navigation";
|
|
23
22
|
import { collections, config, globals } from "./config";
|
|
@@ -98,16 +97,17 @@ export const href = (path: string, locale: string) => getPathname({ locale, href
|
|
|
98
97
|
export const q = (): Queries =>
|
|
99
98
|
new Proxy({} as Queries, {
|
|
100
99
|
get: (_, name) => async (...args: unknown[]) => {
|
|
101
|
-
await
|
|
100
|
+
await buildGate();
|
|
102
101
|
return (bound().q as unknown as Record<string | symbol, (...a: unknown[]) => unknown>)[name](...args);
|
|
103
102
|
},
|
|
104
103
|
});
|
|
105
104
|
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// reading a global through q() included (2026-10-02, tester round 6).
|
|
105
|
+
// The gate first, then the env: `buildGate()` waits for a request while `next build` prerenders, so a
|
|
106
|
+
// route file without a dynamic segment reads nothing at build and the build needs no keys — a layout
|
|
107
|
+
// reading a global through q() included (2026-10-02, tester round 6). At run time it does nothing: a
|
|
108
|
+
// CMS route renders on its first visit and is cached until a publish expires it (plan 2026-10-09).
|
|
109
109
|
/** The two route files call these. */
|
|
110
|
-
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await
|
|
111
|
-
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await
|
|
112
|
-
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await
|
|
113
|
-
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await
|
|
110
|
+
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPath(...args); };
|
|
111
|
+
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyMetadata(...args); };
|
|
112
|
+
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPage(...args); };
|
|
113
|
+
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyPageMetadata(...args); };
|
|
@@ -8,8 +8,7 @@ for an agent (or a person) building the site.
|
|
|
8
8
|
|
|
9
9
|
## Where things are
|
|
10
10
|
|
|
11
|
-
- `app/(site)/page.tsx` — the home page
|
|
12
|
-
- `app/(site)/[...path]/page.tsx` — every other page and every collection entry, at any depth.
|
|
11
|
+
- `app/(site)/[[...path]]/page.tsx` — every CMS URL: the home, every page at any depth and every collection entry, rendered on first visit and cached until a publish expires it.
|
|
13
12
|
- `app/(site)/layout.tsx` — the site's root layout: fonts, `app/globals.css`, the footer from global content. The admin is one route, `app/(smoodly)/admin/[[...segments]]/route.ts`, and takes no layout.
|
|
14
13
|
- `components/pages/` — the page shapes and the entry page: `Home` (locked hero, freeform body), `Articles` (a fixed page at the collection's path — its index — with a code-fetched grid), `Page` (open; About lives here), `Article` (the entry page), `News` and `NewsPost` (a collection at the nested address `company/news`, its index and entry page).
|
|
15
14
|
- `components/PageFrame.tsx` — the header and `<main>` every page view renders (a layout cannot know which page is on screen); with more than one locale, the language links from the page's `locales` map — the same page in the other language, or its home when there is no translation.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
+
|
|
3
|
+
type Params = Promise<{ path?: string[] }>;
|
|
4
|
+
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
|
|
6
|
+
// Smoodly: every CMS URL — the home (no segments), pages at any depth and
|
|
7
|
+
// collection entries under their `path`. A route file of your own beside
|
|
8
|
+
// this one, app/(site)/<segment>/page.tsx, wins for that exact path; deeper
|
|
9
|
+
// paths still resolve here. Each address renders on its first visit and is
|
|
10
|
+
// served from the cache until a publish expires it, so nothing in a page
|
|
11
|
+
// under this route may read cookies, headers or search params (a page that
|
|
12
|
+
// needs them is its own route file).
|
|
13
|
+
export function generateStaticParams() {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function generateMetadata({ params }: { params: Params }) {
|
|
18
|
+
return smoodlyMetadata((await params).path ?? []);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
22
|
+
return renderSmoodlyPath((await params).path ?? [], { searchParams });
|
|
23
|
+
}
|
|
@@ -16,8 +16,7 @@ import {
|
|
|
16
16
|
// The admin's server pieces: the sign-in check and the content API. No browser code lives in the package's
|
|
17
17
|
// entries; the admin itself is prebuilt and served by app/(smoodly)/admin/[[...segments]]/route.ts.
|
|
18
18
|
import { createSmoodlyContent, supabaseAdminAuth, type AdminAuth, type AuthConfig, type SmoodlyContent } from "smoodly/admin";
|
|
19
|
-
import { createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
20
|
-
import { connection } from "next/server";
|
|
19
|
+
import { buildGate, createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
21
20
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
22
21
|
import { collections, config, globals } from "./config";
|
|
23
22
|
import { views } from "./views";
|
|
@@ -97,16 +96,17 @@ export const href = (path: string, _locale: string) => path;
|
|
|
97
96
|
export const q = (): Queries =>
|
|
98
97
|
new Proxy({} as Queries, {
|
|
99
98
|
get: (_, name) => async (...args: unknown[]) => {
|
|
100
|
-
await
|
|
99
|
+
await buildGate();
|
|
101
100
|
return (bound().q as unknown as Record<string | symbol, (...a: unknown[]) => unknown>)[name](...args);
|
|
102
101
|
},
|
|
103
102
|
});
|
|
104
103
|
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
// reading a global through q() included (2026-10-02, tester round 6).
|
|
104
|
+
// The gate first, then the env: `buildGate()` waits for a request while `next build` prerenders, so a
|
|
105
|
+
// route file without a dynamic segment reads nothing at build and the build needs no keys — a layout
|
|
106
|
+
// reading a global through q() included (2026-10-02, tester round 6). At run time it does nothing: a
|
|
107
|
+
// CMS route renders on its first visit and is cached until a publish expires it (plan 2026-10-09).
|
|
108
108
|
/** The two route files call these. */
|
|
109
|
-
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await
|
|
110
|
-
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await
|
|
111
|
-
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await
|
|
112
|
-
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await
|
|
109
|
+
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPath(...args); };
|
|
110
|
+
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyMetadata(...args); };
|
|
111
|
+
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPage(...args); };
|
|
112
|
+
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyPageMetadata(...args); };
|
|
@@ -8,8 +8,7 @@ for an agent (or a person) building the site.
|
|
|
8
8
|
|
|
9
9
|
## Where things are
|
|
10
10
|
|
|
11
|
-
- `app/[locale]/page.tsx` — the home page
|
|
12
|
-
- `app/[locale]/[...path]/page.tsx` — every other page and every collection entry, at any depth, with translated segments per locale.
|
|
11
|
+
- `app/[locale]/[[...path]]/page.tsx` — every CMS URL: the home, every page at any depth and every collection entry, with translated segments per locale, rendered on first visit and cached until a publish expires it.
|
|
13
12
|
- `app/[locale]/layout.tsx` — the site's root layout: fonts, `app/globals.css`, the footer from global content. The admin is one route, `app/(smoodly)/admin/[[...segments]]/route.ts`, and takes no layout.
|
|
14
13
|
- `i18n/routing.ts` — the locales and the default; `smoodly/config.ts` reads them from here. `i18n/request.ts` and `i18n/navigation.ts` are next-intl's stock files; `proxy.ts` is its locale routing (`/admin` excluded).
|
|
15
14
|
- `components/pages/` — the page shapes and the entry page: `Home` (locked hero, freeform body), `Articles` (a fixed page at the collection's path — its index — with a code-fetched grid), `Page` (open; About lives here), `Article` (the entry page), `News` and `NewsPost` (a collection at the nested address `company/news`, its index and entry page).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
+
|
|
3
|
+
type Params = Promise<{ locale: string; path?: string[] }>;
|
|
4
|
+
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
|
|
6
|
+
// Smoodly: every CMS URL in this language — the home (no segments), pages
|
|
7
|
+
// at any depth and collection entries under their `path`. A route file of
|
|
8
|
+
// your own beside this one, app/[locale]/<segment>/page.tsx, wins for that
|
|
9
|
+
// exact path; deeper paths still resolve here. Each address renders on its
|
|
10
|
+
// first visit and is served from the cache until a publish expires it, so
|
|
11
|
+
// nothing in a page under this route may read cookies, headers or search
|
|
12
|
+
// params (a page that needs them is its own route file).
|
|
13
|
+
export function generateStaticParams() {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function generateMetadata({ params }: { params: Params }) {
|
|
18
|
+
const { locale, path = [] } = await params;
|
|
19
|
+
return smoodlyMetadata(path, { locale });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
23
|
+
const { locale, path = [] } = await params;
|
|
24
|
+
return renderSmoodlyPath(path, { locale, searchParams });
|
|
25
|
+
}
|
|
@@ -16,8 +16,7 @@ import {
|
|
|
16
16
|
// The admin's server pieces: the sign-in check and the content API. No browser code lives in the package's
|
|
17
17
|
// entries; the admin itself is prebuilt and served by app/(smoodly)/admin/[[...segments]]/route.ts.
|
|
18
18
|
import { createSmoodlyContent, supabaseAdminAuth, type AdminAuth, type AuthConfig, type SmoodlyContent } from "smoodly/admin";
|
|
19
|
-
import { createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
20
|
-
import { connection } from "next/server";
|
|
19
|
+
import { buildGate, createPageRenderer, createSmoodlyQueries } from "smoodly/next";
|
|
21
20
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
22
21
|
import { getPathname } from "@/i18n/navigation";
|
|
23
22
|
import { collections, config, globals } from "./config";
|
|
@@ -98,16 +97,17 @@ export const href = (path: string, locale: string) => getPathname({ locale, href
|
|
|
98
97
|
export const q = (): Queries =>
|
|
99
98
|
new Proxy({} as Queries, {
|
|
100
99
|
get: (_, name) => async (...args: unknown[]) => {
|
|
101
|
-
await
|
|
100
|
+
await buildGate();
|
|
102
101
|
return (bound().q as unknown as Record<string | symbol, (...a: unknown[]) => unknown>)[name](...args);
|
|
103
102
|
},
|
|
104
103
|
});
|
|
105
104
|
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// reading a global through q() included (2026-10-02, tester round 6).
|
|
105
|
+
// The gate first, then the env: `buildGate()` waits for a request while `next build` prerenders, so a
|
|
106
|
+
// route file without a dynamic segment reads nothing at build and the build needs no keys — a layout
|
|
107
|
+
// reading a global through q() included (2026-10-02, tester round 6). At run time it does nothing: a
|
|
108
|
+
// CMS route renders on its first visit and is cached until a publish expires it (plan 2026-10-09).
|
|
109
109
|
/** The two route files call these. */
|
|
110
|
-
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await
|
|
111
|
-
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await
|
|
112
|
-
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await
|
|
113
|
-
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await
|
|
110
|
+
export const renderSmoodlyPath: Renderer["renderSmoodlyPath"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPath(...args); };
|
|
111
|
+
export const smoodlyMetadata: Renderer["smoodlyMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyMetadata(...args); };
|
|
112
|
+
export const renderSmoodlyPage: Renderer["renderSmoodlyPage"] = async (...args) => { await buildGate(); return bound().renderer.renderSmoodlyPage(...args); };
|
|
113
|
+
export const smoodlyPageMetadata: Renderer["smoodlyPageMetadata"] = async (...args) => { await buildGate(); return bound().renderer.smoodlyPageMetadata(...args); };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ path: string[] }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: everything else — pages at any depth and collection entries
|
|
7
|
-
// under their `path`. Add app/(site)/<segment>/page.tsx beside this file
|
|
8
|
-
// and it wins for that exact path; deeper paths still resolve here.
|
|
9
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
10
|
-
return smoodlyMetadata((await params).path);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
14
|
-
return renderSmoodlyPath((await params).path, { searchParams });
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
4
|
-
|
|
5
|
-
// Smoodly: the home page. Editing this file replaces or wraps the CMS
|
|
6
|
-
// home; the shapes it can render live in components/pages/.
|
|
7
|
-
export const generateMetadata = () => smoodlyMetadata([]);
|
|
8
|
-
|
|
9
|
-
export default async function Page({ searchParams }: { searchParams: SearchParams }) {
|
|
10
|
-
return renderSmoodlyPath([], { searchParams });
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ locale: string; path: string[] }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: everything else — pages at any depth and collection entries
|
|
7
|
-
// under their `path`, with translated segments per locale. Add
|
|
8
|
-
// app/[locale]/<segment>/page.tsx beside this file and it wins for that
|
|
9
|
-
// exact path; deeper paths still resolve here.
|
|
10
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
11
|
-
const { locale, path } = await params;
|
|
12
|
-
return smoodlyMetadata(path, { locale });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
16
|
-
const { locale, path } = await params;
|
|
17
|
-
return renderSmoodlyPath(path, { locale, searchParams });
|
|
18
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ locale: string }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: the home page, in the locale next-intl's proxy resolved. Editing
|
|
7
|
-
// this file replaces or wraps the CMS home; the shapes it can render live
|
|
8
|
-
// in components/pages/.
|
|
9
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
10
|
-
return smoodlyMetadata([], { locale: (await params).locale });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
14
|
-
return renderSmoodlyPath([], { locale: (await params).locale, searchParams });
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ path: string[] }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: everything else — pages at any depth and collection entries
|
|
7
|
-
// under their `path`. Add app/(site)/<segment>/page.tsx beside this file
|
|
8
|
-
// and it wins for that exact path; deeper paths still resolve here.
|
|
9
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
10
|
-
return smoodlyMetadata((await params).path);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
14
|
-
return renderSmoodlyPath((await params).path, { searchParams });
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
4
|
-
|
|
5
|
-
// Smoodly: the home page. Editing this file replaces or wraps the CMS
|
|
6
|
-
// home; the shapes it can render live in components/pages/.
|
|
7
|
-
export const generateMetadata = () => smoodlyMetadata([]);
|
|
8
|
-
|
|
9
|
-
export default async function Page({ searchParams }: { searchParams: SearchParams }) {
|
|
10
|
-
return renderSmoodlyPath([], { searchParams });
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ locale: string; path: string[] }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: everything else — pages at any depth and collection entries
|
|
7
|
-
// under their `path`, with translated segments per locale. Add
|
|
8
|
-
// app/[locale]/<segment>/page.tsx beside this file and it wins for that
|
|
9
|
-
// exact path; deeper paths still resolve here.
|
|
10
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
11
|
-
const { locale, path } = await params;
|
|
12
|
-
return smoodlyMetadata(path, { locale });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
16
|
-
const { locale, path } = await params;
|
|
17
|
-
return renderSmoodlyPath(path, { locale, searchParams });
|
|
18
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderSmoodlyPath, smoodlyMetadata } from "@/smoodly/server";
|
|
2
|
-
|
|
3
|
-
type Params = Promise<{ locale: string }>;
|
|
4
|
-
type SearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
-
|
|
6
|
-
// Smoodly: the home page, in the locale next-intl's proxy resolved. Editing
|
|
7
|
-
// this file replaces or wraps the CMS home; the shapes it can render live
|
|
8
|
-
// in components/pages/.
|
|
9
|
-
export async function generateMetadata({ params }: { params: Params }) {
|
|
10
|
-
return smoodlyMetadata([], { locale: (await params).locale });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default async function Page({ params, searchParams }: { params: Params; searchParams: SearchParams }) {
|
|
14
|
-
return renderSmoodlyPath([], { locale: (await params).locale, searchParams });
|
|
15
|
-
}
|