T
TanStack3w ago
fair-rose

Meta title template

Is there an easier way to do this templating thing with <title>?
function getPageTitle(title: string) {
return `${title} - Dashboard`
}

export const Route = createFileRoute('/')({
head: () => ({
meta: [{ title: getPageTitle('Home') }],
}),
component: RouteComponent,
})
function getPageTitle(title: string) {
return `${title} - Dashboard`
}

export const Route = createFileRoute('/')({
head: () => ({
meta: [{ title: getPageTitle('Home') }],
}),
component: RouteComponent,
})
Like Next.js title template https://nextjs.org/docs/app/api-reference/functions/generate-metadata#template ?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?