strapi / nextjs-corporate-starter

Strapi Demo application for Corporate Websites using Next.js
MIT License
959 stars 285 forks source link

Adding SEO to page Issue: #32 #57

Closed PaulBratslavsky closed 1 year ago

PaulBratslavsky commented 1 year ago

This is in regards to this issue https://github.com/strapi/nextjs-corporate-starter/issues/32

@KennyAtCodin had a PR to fix this https://github.com/strapi/nextjs-corporate-starter/pull/55, but I did not test it well when merging and did not realized it would break yarn strapi import.

I realized that after making changes to the schema it is alway important to update the seed-file to reflect the changes. Otherwise the import is going to break.

I used the code from previous PR by @KennyAtCodin and implemented these changes to work with the SEO plugin we already have installed.

@KennyAtCodin if you have a chance take a look at the changes and let me know if have any issues. Thank you for all your awesome help.

KennyAtCodin commented 1 year ago

sorry my bad, forgot to update the seed files (maybe add a section in the readme how to do that).

The rest of the code looks good to me, we could change the populate field in the middleware for the seo to include the shareImage, altough it's not used yet.

PaulBratslavsky commented 1 year ago

@KennyAtCodin thanks for the feedback, I will add to include the sharedImage. And will make another PR to the README mentioning making sure to update the seed file when changing the schema.