-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
fix: og:image tags for /area/ and /climbs/ #1200
Conversation
@julianlam just to point out I think the change you made to useClimbSeo only applies to the (soon to be deprecated/removed) /climbs/ page. The new /climb/ page does not have a generateMetadata() function yet, but should be added (out of scope for this issue). it is inheriting from open-tacos/src/app/(default)/layout.tsx Lines 13 to 21 in 4f4c7ba
|
@clintonlunn Correct, I realized that earlier, which is why I made the commit. There still is an extra slash there, so having it removed is better, as the image 404s otherwise. |
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.
This looks good to me. There are some discrepancies between the image url generation in useClimbSeo()
(/climbs/
page) and the metadata for /area/
page maybe we can improve on that in the future since we're still seeing errors about an incorrect aspect ratio.
What type of PR is this?(check all applicable)
Description
og:image tags for climbs do not work (shows default south africa image)og:image
is not properly retrieved the first time due to null uidog:image tags for profiles do not work (arguments are double escaped)&
cause them to be escaped. There are workarounds but none that look simple (or maintainable) enough to implement.useUserProfileSeo
is called to load the photos forog:image
null
uid (causing theog:image
tag to be the default image), and a second time in-client causing the tags to be properly set in DOM. However, that is too late for link-preview services, because they don't parse js.What this PR achieves
Fixed the above issues.
Screenshots, recordings
Notes
Query parameters are being escaped but I can't work around them. e.g.
?w=600&q=75
has the&
replaced with&
which isn't read correctly by the image server. (full quality image is sent)