close

Head

The Head component lets you inject custom head content (built on unhead).

If you prefer declaring head entries as objects, or need to compute them from component state and props, use the useHead hook.

Usage

index.mdx
import { Head } from '@rspress/core/runtime';

<Head>
  <meta property="og:description" content="Out-of-box Rspack build tools" />
  <link rel="canonical" href="https://example.com" />
</Head>

Use it inside MDX or React pages to add meta tags, canonical links, Open Graph data, favicons, and more.