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

fix: og:image tags for /area/ and /climbs/ #1200

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/(default)/area/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export async function generateMetadata ({ params }: PageWithCatchAllUuidProps):

const name = sanitizeName(areaName)

const previewImage = media.length > 0 ? `${CLIENT_CONFIG.CDN_BASE_URL}/${media[0].mediaUrl}?w=1200q=75` : null
const previewImage = media.length > 0 ? `${CLIENT_CONFIG.CDN_BASE_URL}${media[0].mediaUrl}?w=1200&q=75` : null

const description = `Community knowledge • ${wall}${name}`

Expand Down
2 changes: 1 addition & 1 deletion src/js/hooks/seo/useClimbSeo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export const useClimbSeo = ({ climb }: ClimbSeoProps): SeoHookType => {
*/
const getRandomPreviewImages = (list: MediaWithTags[]): string[] => {
const shortList = shuffle(list.slice(0, 10)) // shuffle the first 10
return shortList.slice(0, 4).map(image => (`${CLIENT_CONFIG.CDN_BASE_URL}/${image.mediaUrl}?w=1200&ch=630&cy=center&format=jpg&q=85`))
return shortList.slice(0, 4).map(image => (`${CLIENT_CONFIG.CDN_BASE_URL}${image.mediaUrl}?w=1200&ch=630&cy=center&format=jpg&q=85`))
}
Loading