-
Notifications
You must be signed in to change notification settings - Fork 63
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
Azbl/588 improve social media thumbnail and title #684
Azbl/588 improve social media thumbnail and title #684
Conversation
…-social-media-thumbnail-and-title
@AZBL is attempting to deploy a commit to the Clean and Green Philly Team on Vercel. A member of the Team first needs to authorize it. |
"The ultimate toolkit to help community groups clean and green vacant properties to reduce gun violence in Philadelphia."; | ||
const siteUrl = new URL("https://staging.cleanandgreenphilly.org/"); | ||
|
||
/* REPLACE WITH URL BELOW BEFORE PUSHING TO PRODUCTION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AZBL thanks for pointing this out.
|
||
//imageUrl and imageAlt included to allow different images to be used for different pages in the future if desired | ||
|
||
export function generateMetadata({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use of a reusable method. Helps keep the codebase tidy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AZBL can you remove the //?
comments from this PR?
As we discussed, let's change the URL from staging to prod before merging the PR. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AZBL changes look good. I checked the URLs for each page's social media metadata, and they're all correct. Thanks for your contribution!
Addresses issue #588
Updates social media thumbnail, title, and description for the homepage and all other pages of the site. This naturally changes/improves the metadata for the site as well.
Screenshots of how it should look for both the homepage as well as an example of how it'll look for another page are below. For the different pages, the title it will be [Page Title] - Clean and Green Philly. For instance, Find Properties - Clean & Green Philly.
For the descriptions I used the sub-header when available, for other pages that didn't have them I used what I thought made sense. Please @thansidwell or @nlebovits let me know what you think for them (you can check them out it in the code as the description in each page's layout file).
Added thumbnail.png to the public directory.
Creates generateMetaData function in utilities/ which accepts the root metadata and opengraph data from app/layout.tsx as a parameter and can be used in various pages' layout.tsx to easily create that pages metadata.
If we decide to change the thumbnail image for different pages in the future it should be a simple change.
As discussed with @CodeWritingCow for now this uses the staging url, and it'll have to be changed to the production url eventually. I think it'd also make sense to test to make sure everything works smoothly by either messaging each other on various social medias or using a site like Social Share Preview (I couldn't really do that during development since the url was my local host).