Has anyone been able to override the payload meta tags, I know in admin we can edit the favicon and og:image tag but was wondering on the rest. I tried to directly import
import Meta from "payload/dist/admin/components/utilities/Meta";
but it only added my tags vs override the tags with the same property
I thought helmet handled this under the hood but possibly not, not sure
Did you try redefining helmet tags with a value set to
null
?
https://github.com/nfl/react-helmet/issues/156#issuecomment-464422403
No luck :/
Looking at the source code, this is currently not possible since these values are hard-coded into each view. Here's the default edit view, for instance
https://github.com/payloadcms/payload/blob/ec2933c49a778f49eb1430ca43d71365df0e2a79/src/admin/components/views/collections/Edit/Default.tsx#L113. I see the value here, though. This could make a nice feature.
What @ElliotYoYo is getting at might also work as a temporary solution. Try and render the
Meta
or
Helmet
components somewhere on the page
afterthe line I pasted above. This way
react-helmet
consolidates your tags. You might be able to do this within a custom UI field component described here
https://payloadcms.com/docs/fields/ui#ui-field
Overriding Default Meta Tags
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.