next-seo
next-seo copied to clipboard
Is there a way to exclude the next seo component from certain page?
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?
I would lean on React for that. Create a wrapper component which checks the path and conditionally renders the NextSeo component.
Yup, I used conditional rendering to work around this issue.
See sample code here: https://github.com/garmeeh/next-seo/issues/934#issuecomment-1459418985.