next-seo icon indicating copy to clipboard operation
next-seo copied to clipboard

Is there a way to exclude the next seo component from certain page?

Open chea1tei opened this issue 1 year ago • 2 comments

Hi,

Is there a way to exclude the next seo component from certain page? We are currently placing the component under _app.js file and its pulling for every page. If there is a certain page we want to exclude from, is there away for it?

chea1tei avatar Mar 01 '23 03:03 chea1tei

I would lean on React for that. Create a wrapper component which checks the path and conditionally renders the NextSeo component.

neilhsmith avatar Mar 15 '23 18:03 neilhsmith

Yup, I used conditional rendering to work around this issue.

See sample code here: https://github.com/garmeeh/next-seo/issues/934#issuecomment-1459418985.

GonzaloZiadi avatar Mar 15 '23 20:03 GonzaloZiadi