next-wordpress-starter
next-wordpress-starter copied to clipboard
Social Preview Images
Can we provide generated social preview images for posts without requiring an additional service?
https://github.com/tkrkt/text2png
Support added to Post pages via https://github.com/colbyfayock/next-wordpress-starter/pull/91
We should add a "default" image that shows up on any page that doesn't have one specified as well as one for Pages
hey @colbyfayock can I work on this with next-seo package?
hey! what did you haev in mind with using next-seo?
the original idea for the ticket was to work on top of https://github.com/colbyfayock/next-wordpress-starter/pull/91
where we're currently generating images for each post, but we're not generating images for any Pages which would also be handy
https://github.com/colbyfayock/next-wordpress-starter/blob/main/plugins/socialImages.js
im open to ideas with next-seo though if you think it adds particular value
this is currently how we're managing SEO metadata https://github.com/colbyfayock/next-wordpress-starter/blob/main/src/pages/posts/%5Bslug%5D.js#L67
Next-SEO is more useful IMO because it is not linked to any other components and is very easy to use.
I don't think I'm following, does Next-SEO generate social images automatically?
Umm no, I meant you can pass in the metadata, and images very easily. You can even have dynamic data like the image cover probably
yeah this particular ticket is about generating the images like we're doing for the Posts in the links I added there
while Next SEO looks nice i dont know that it's adding anything that we dont already have if im not mistaken
im open to a different solution though if you think there would be a lot of benefit, I would open a new issue for that discussion though
Ah okay, I will try to do with the existing way.
the way i would imagine the change happening would be to modify the data collection inside this file:
https://github.com/colbyfayock/next-wordpress-starter/blob/main/plugins/socialImages.js#L28
currently its getting all posts, where it should also get the pages
then inside of the pages template, it needs to reference that image similar to how it does in posts
https://github.com/colbyfayock/next-wordpress-starter/blob/main/src/pages/posts/%5Bslug%5D.js#L147