TurboJet
SEO

Overview

Set per-page title and description with generateMetadata and i18n.

Meta tags describe the content of a page. Set them for each marketing route so search engines understand the page and your SEO stays strong.

Base title

The marketing root layout (apps/marketing/src/app/layout.tsx) is a passthrough. Default title and template live on the locale layout:

apps/marketing/src/app/[locale]/layout.tsx
export async function generateMetadata({
	params,
}: LocaleLayoutProps): Promise<Metadata> {
	const { locale } = await params;
	setRequestLocale(locale);
	const t = await getTranslations("meta");

	return {
		title: {
			template: t("titleTemplate"),
			default: t("defaultTitle"),
		},
	};
}

Brand strings come from the marketing catalog — not a shared config.appName:

packages/i18n/src/marketing/en.json
{
	"meta": {
		"titleTemplate": "%s | TurboJet",
		"defaultTitle": "TurboJet"
	}
}
  • Pages without a title use defaultTitle (for example TurboJet).
  • Pages that set a title apply the template. If the page title is Privacy Policy, the document title becomes Privacy Policy | TurboJet.

Keep en.json and id.json in sync when you change these keys. See i18n.

Per-page metadata

Export generateMetadata from the page and return title / description. Prefer translations so each locale gets the right copy:

apps/marketing/src/app/[locale]/(landing)/page.tsx
export async function generateMetadata(): Promise<Metadata> {
	const t = await getTranslations("meta");

	return {
		title: t("homeTitle"),
		description: t("homeDescription"),
	};
}

Other marketing pages follow the same shape:

PageTranslation namespace / keys
Homemeta.homeTitle / homeDescription
Privacy Policymeta.privacyTitle / privacyDescription
Terms of Servicemeta.termsTitle / termsDescription
Licensemeta.licenseTitle / licenseDescription
Checkout successcheckoutSuccess.metaTitle / metaDescription

Add new strings under packages/i18n/src/marketing/en.json and id.json, then wire them in that page’s generateMetadata.

Learn more in the Next.js generateMetadata docs.

Guides

On this page