---
title: "Page `openGraph` replaces the layout's (shallow merge drops images/siteName) (lint/og-merge-drops-parent)"
description: "lint/og-merge-drops-parent: Next merges metadata shallowly: when a page sets `openGraph`, the parent's whole `openGraph` object is replaced."
canonical: https://void-design.vercel.app/rules/lint/og-merge-drops-parent
lastModified: 2026-09-16
---

# Page `openGraph` replaces the layout's (shallow merge drops images/siteName)

`lint/og-merge-drops-parent` · severity **warn** · category Lint · detected by `void lint` and `void audit`

## Why it matters

Next merges metadata shallowly: when a page sets `openGraph`, the parent's whole `openGraph` object is replaced. Images, `siteName`, `locale` defined in the layout silently disappear from that page's link previews. Same for `alternates` (`types`, `languages`).

## How to fix it

Spread shared fields back in (`openGraph: { ...sharedOpenGraph, title }`) or use file-based `opengraph-image` in the segment.

## Example

```ts
import { sharedOpenGraph } from '@/lib/seo'
export const metadata = { openGraph: { ...sharedOpenGraph, title: 'Pricing', url: '/pricing' } }
```

## References

- https://nextjs.org/docs/app/api-reference/functions/generate-metadata#merging

## More lint rules

`void lint` reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.

- `hardcoded-colors` Hard-coded colors in components instead of tokens — [lint/hardcoded-colors](https://void-design.vercel.app/rules/lint/hardcoded-colors)
- `missing-metadata` Page has no `metadata` / `generateMetadata` and inherits only the root title — [lint/missing-metadata](https://void-design.vercel.app/rules/lint/missing-metadata)
- `missing-metadata-base` Root layout metadata has no `metadataBase` — [lint/missing-metadata-base](https://void-design.vercel.app/rules/lint/missing-metadata-base)
- `canonical-in-root-layout` Canonical URL set in the root layout — [lint/canonical-in-root-layout](https://void-design.vercel.app/rules/lint/canonical-in-root-layout)
- `not-found-in-suspense` `notFound()`/`redirect()` inside a component rendered under `<Suspense>` — [lint/not-found-in-suspense](https://void-design.vercel.app/rules/lint/not-found-in-suspense)
- `missing-sitemap` No sitemap — [lint/missing-sitemap](https://void-design.vercel.app/rules/lint/missing-sitemap)
- `missing-robots` No robots.txt — [lint/missing-robots](https://void-design.vercel.app/rules/lint/missing-robots)
- `missing-og-image` No Open Graph image anywhere — [lint/missing-og-image](https://void-design.vercel.app/rules/lint/missing-og-image)

Detected by `void lint` and `void audit`. Explain it in a terminal: `void rules lint/og-merge-drops-parent`
