--- title: Deduping Nodes description: How to add multiple of the same node to your schema graph. --- ## Deduplicating a node When generating many of the Schema.org nodes a default global `@id` is used to help with best practices. For example: ```ts import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineOrganization() // generates the nodes with an #identity id ]) ``` This allows the node relations to be automatically mapped for best practices. ```ts import { defineWebPage, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineWebPage() // knows to link the #identity id ]) ``` However, it can get in the way of configuring multiple nodes of the same type. To get around this you should provide your own `@id` on the node: ```ts import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineOrganization({ '@id': '#some-company' }) ]) ``` ## Replacing a node If you're likd to replace a node, you can use provide a `tagDuplicateStrategy` to the `useSchemaOrg` composable. ```ts import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineOrganization({ '@id': '#some-company', 'name': 'Bar Company', 'url': 'https://bar.com', }), ]) useSchemaOrg([ defineOrganization({ '@id': '#some-company', 'name': 'Foo Company', }) ], { tagDuplicateStrategy: 'replace' }) // Replaced! // { // '@id': '#some-company', // name: 'Foo Company', // } ```