You can set its value using a pageContext function:
// pages/some-page/+title.js// Environment: server, clientexport function title(pageContext) { return pageContext.data.product.title}
// pages/some-page/+title.ts// 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, upon rendering the HTML of the first page, the +title setting adds the <title> and <meta property="og:title"> tags to the <head> tag.
On the client, upon client-side page navigation, the +title setting dynamically updates these tags by mutating the DOM.