OG Image Fix - #30
Merged
Merged
Conversation
- Changed the Open Graph image endpoint to use a generated route (`/api/og`) instead of a static asset. - Updated environment variables in `.env.example` for clarity and production readiness. - Adjusted metadata handling in `lib/metadata.ts` to reflect the new OG image path and production URL. - Added a new SVG logo asset for the Open Graph image. - Enhanced tests to verify the new metadata behavior and ensure proper URL resolution.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates how metadata and Open Graph (OG) images are handled across the app, focusing on ensuring absolute URLs are used for social image tags and switching to a new SVG logo for OG images. It also sets production as the default site URL and updates documentation and tests to reflect these changes.
Metadata and URL handling improvements:
https://teacherbuddy.mrbubbles-src.dev), and all metadata URLs (including OG and Twitter images) are generated as absolute URLs using the newbuildAbsoluteMetadataUrlutility. This ensures social crawlers can reliably fetch images and canonical URLs. [1] [2] [3] [4] [5] [6]lib/__tests__/metadata.test.tsare updated to expect absolute production URLs in metadata fields and for the fallback site URL. [1] [2] [3]Open Graph image updates:
lib/og-image.tsxnow returns an SVG logo instead of a styled PNG, and the alt text is updated to "TeacherBuddy Logo". The content type is changed toimage/svg+xml. [1] [2]Documentation updates:
metadataBase. [1] [2]Environment variable changes:
.env.examplefile is simplified to clarify thatNEXT_PUBLIC_SITE_URLshould be set in production, and is now left blank for local development.