useHead
useHead lets you declare document head tags from React components or custom layouts.
- Type:
(input: UseHeadInput) => ActiveHeadEntry | void
Rspress re-exports this hook from @rspress/core/runtime, so you can use the same head API in custom pages, theme components, and layout code.
Use useHead when your head data is easier to build from JavaScript objects or depends on component state and props.
If you prefer authoring tags directly in MDX, use the
Headcomponent instead.