<head> <meta name="description" content="This website is a Vike demo."> <meta property="og:description" content="This website is a Vike demo."></head>
You can set its value using a pageContext function:
// pages/some-page/+description.js// Environment: server, clientexport function description(pageContext) { return pageContext.data.product.description}
// pages/some-page/+description.ts// Environment: server, clientimport type { Data } from './+data'import type { PageContext } from 'vike/types'export function description(pageContext: PageContext<Data>) { return pageContext.data.product.description}
Under the hood
On the server, upon rendering the HTML of the first page, the +description setting adds the <meta name="description"> and <meta property="og:description"> tags to the <head> tag.
On the client, upon client-side page navigation, the +description setting dynamically updates these tags by mutating the DOM.