// pages/some-page/+title.js// Environment: server, clientimport type { Data } from './+data'import type { PageContext } from 'vike/types'export function title(pageContext: PageContext<Data>) { return pageContext.data.product.title}
Under the hood
On the server-side, upon rendering the HTML of the first page, the title setting adds the <title> tag to the <head> tag.