create-smoodly-app 0.0.39 → 0.0.41
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/blank/app/(site)/layout.tsx +4 -3
- package/templates/blank/package.json +1 -1
- package/templates/blank-intl/app/[locale]/layout.tsx +4 -3
- package/templates/blank-intl/package.json +1 -1
- package/templates/lorem/app/(site)/layout.tsx +4 -3
- package/templates/lorem/package.json +1 -1
- package/templates/lorem-intl/app/[locale]/layout.tsx +4 -3
- package/templates/lorem-intl/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import { siteUrl } from "smoodly";
|
|
2
3
|
import { q } from "@/smoodly/server";
|
|
3
4
|
import "../globals.css";
|
|
4
5
|
|
|
@@ -7,11 +8,11 @@ import "../globals.css";
|
|
|
7
8
|
// a child of this one. The `site` global item (smoodly/globals.ts) gives
|
|
8
9
|
// the document title and the footer line: read through `q`, cached under
|
|
9
10
|
// its tag, null until published.
|
|
10
|
-
// metadataBase makes Smoodly's hreflang
|
|
11
|
-
// absolute; SITE_URL
|
|
11
|
+
// metadataBase makes Smoodly's canonical, hreflang and social image URLs
|
|
12
|
+
// absolute; siteUrl() reads SITE_URL, the deployed address, and names a bad one.
|
|
12
13
|
export async function generateMetadata() {
|
|
13
14
|
const site = await q().getGlobal("site");
|
|
14
|
-
return { metadataBase:
|
|
15
|
+
return { metadataBase: siteUrl(), title: site?.fields.name ?? "Smoodly site" };
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export default async function RootLayout({ children }: { children: ReactNode }) {
|
|
@@ -2,6 +2,7 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import { notFound } from "next/navigation";
|
|
3
3
|
import { hasLocale, NextIntlClientProvider } from "next-intl";
|
|
4
4
|
import { routing } from "@/i18n/routing";
|
|
5
|
+
import { siteUrl } from "smoodly";
|
|
5
6
|
import { q } from "@/smoodly/server";
|
|
6
7
|
import "../globals.css";
|
|
7
8
|
|
|
@@ -14,12 +15,12 @@ import "../globals.css";
|
|
|
14
15
|
// from its own `locales` map, landing on the same page in the other
|
|
15
16
|
// language (spec 2026-09-15). They are the visitor's only language switch,
|
|
16
17
|
// since locale detection is off (see i18n/routing.ts).
|
|
17
|
-
// metadataBase makes Smoodly's hreflang
|
|
18
|
-
// absolute; SITE_URL
|
|
18
|
+
// metadataBase makes Smoodly's canonical, hreflang and social image URLs
|
|
19
|
+
// absolute; siteUrl() reads SITE_URL, the deployed address, and names a bad one.
|
|
19
20
|
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
|
|
20
21
|
const { locale } = await params;
|
|
21
22
|
const site = await q().getGlobal("site", { locale });
|
|
22
|
-
return { metadataBase:
|
|
23
|
+
return { metadataBase: siteUrl(), title: site?.fields.name ?? "Smoodly site" };
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export default async function LocaleLayout({ children, params }: { children: ReactNode; params: Promise<{ locale: string }> }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { Instrument_Sans, Newsreader } from "next/font/google";
|
|
3
3
|
import { FooterView } from "@/components/sections/Footer";
|
|
4
|
+
import { siteUrl } from "smoodly";
|
|
4
5
|
import { q } from "@/smoodly/server";
|
|
5
6
|
import "../globals.css";
|
|
6
7
|
|
|
@@ -8,9 +9,9 @@ import "../globals.css";
|
|
|
8
9
|
const serif = Newsreader({ subsets: ["latin", "latin-ext"], style: ["normal", "italic"], variable: "--font-serif" });
|
|
9
10
|
const sans = Instrument_Sans({ subsets: ["latin", "latin-ext"], weight: ["400", "500", "600"], variable: "--font-sans" });
|
|
10
11
|
|
|
11
|
-
// metadataBase makes Smoodly's hreflang
|
|
12
|
-
// absolute; SITE_URL
|
|
13
|
-
export const metadata = { metadataBase:
|
|
12
|
+
// metadataBase makes Smoodly's canonical, hreflang and social image URLs
|
|
13
|
+
// absolute; siteUrl() reads SITE_URL, the deployed address, and names a bad one.
|
|
14
|
+
export const metadata = { metadataBase: siteUrl(), title: "Lorem Co." };
|
|
14
15
|
|
|
15
16
|
// The site's root layout, in its own route group so the admin's layout
|
|
16
17
|
// under app/(smoodly)/admin is a second root layout beside it rather than
|
|
@@ -4,6 +4,7 @@ import { Instrument_Sans, Newsreader } from "next/font/google";
|
|
|
4
4
|
import { hasLocale, NextIntlClientProvider } from "next-intl";
|
|
5
5
|
import { routing } from "@/i18n/routing";
|
|
6
6
|
import { FooterView } from "@/components/sections/Footer";
|
|
7
|
+
import { siteUrl } from "smoodly";
|
|
7
8
|
import { q } from "@/smoodly/server";
|
|
8
9
|
import "../globals.css";
|
|
9
10
|
|
|
@@ -11,9 +12,9 @@ import "../globals.css";
|
|
|
11
12
|
const serif = Newsreader({ subsets: ["latin", "latin-ext"], style: ["normal", "italic"], variable: "--font-serif" });
|
|
12
13
|
const sans = Instrument_Sans({ subsets: ["latin", "latin-ext"], weight: ["400", "500", "600"], variable: "--font-sans" });
|
|
13
14
|
|
|
14
|
-
// metadataBase makes Smoodly's hreflang
|
|
15
|
-
// absolute; SITE_URL
|
|
16
|
-
export const metadata = { metadataBase:
|
|
15
|
+
// metadataBase makes Smoodly's canonical, hreflang and social image URLs
|
|
16
|
+
// absolute; siteUrl() reads SITE_URL, the deployed address, and names a bad one.
|
|
17
|
+
export const metadata = { metadataBase: siteUrl(), title: "Lorem Co." };
|
|
17
18
|
|
|
18
19
|
// The site's root layout. The admin has its own under app/(smoodly)/admin —
|
|
19
20
|
// two root layouts, a full page load between them, which is fine: they
|