Skip to content
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
4 changes: 2 additions & 2 deletions app/(app)/articles/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
openGraph: {
description: post.excerpt,
type: "article",
images: [`/api/og?title=${encodeURIComponent(post.title)}`],
images: [`/og?title=${encodeURIComponent(post.title)}`],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistency Found in OG Image References

The /api prefix was successfully removed from app/(app)/articles/[slug]/page.tsx, but it still exists in the following file:

  • app/(app)/[username]/page.tsx

Please ensure that the /api prefix is removed consistently across all relevant files to resolve the issue with Twitter card previews.

🔗 Analysis chain

LGTM! Changes align with PR objectives.

The removal of the /api prefix from the image paths in both openGraph and twitter metadata should resolve the issue with Twitter card previews. This change aligns well with the PR objectives and the linked issue #1041.

To ensure the changes are effective, please run the following verification script:

Also applies to: 46-46

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the /api prefix has been removed from all OG image references

# Test: Search for any remaining /api/og references in TSX files
rg --type tsx '/api/og'

# Test: Confirm the new /og path is used consistently
rg --type tsx '/og\?title='

# Note: If the first command returns results or the second command doesn't, 
# there might be inconsistencies in the implementation.

Length of output: 109


Script:

#!/bin/bash
# Description: Verify that the /api prefix has been removed from all OG image references

# Test: Search for any remaining /api/og references in .tsx files
rg '/api/og' --glob '*.tsx'

# Test: Confirm the new /og path is used consistently in .tsx files
rg '/og\?title=' --glob '*.tsx'

# Note: If the first command returns results or the second command doesn't, 
# there might be inconsistencies in the implementation.

Length of output: 673

siteName: "Codú",
},
twitter: {
description: post.excerpt,
images: [`/api/og?title=${encodeURIComponent(post.title)}`],
images: [`/og?title=${encodeURIComponent(post.title)}`],
},
alternates: {
canonical: post.canonicalUrl,
Expand Down
File renamed without changes.