Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Preview Images #13

Open
colbyfayock opened this issue Oct 1, 2020 · 10 comments
Open

Social Preview Images #13

colbyfayock opened this issue Oct 1, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@colbyfayock
Copy link
Owner

Can we provide generated social preview images for posts without requiring an additional service?

@colbyfayock colbyfayock added the enhancement New feature or request label Oct 1, 2020
@colbyfayock
Copy link
Owner Author

@colbyfayock
Copy link
Owner Author

colbyfayock commented Jan 31, 2021

Support added to Post pages via #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

@avneesh0612
Copy link
Contributor

hey @colbyfayock can I work on this with next-seo package?

@colbyfayock
Copy link
Owner Author

hey! what did you haev in mind with using next-seo?

the original idea for the ticket was to work on top of #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

@avneesh0612
Copy link
Contributor

Next-SEO is more useful IMO because it is not linked to any other components and is very easy to use.

@colbyfayock
Copy link
Owner Author

I don't think I'm following, does Next-SEO generate social images automatically?

@avneesh0612
Copy link
Contributor

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

@colbyfayock
Copy link
Owner Author

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

@avneesh0612
Copy link
Contributor

Ah okay, I will try to do with the existing way.

@colbyfayock
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants