Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • update og image

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Dec 22, 2025 8:54pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 22, 2025

Greptile Summary

Simplified the Open Graph image generation by removing the category and description parameters, resulting in cleaner and more focused social media preview cards that only display the page title.

Key Changes:

  • Removed category and description query parameters from OG image URLs across all documentation pages
  • Simplified the OG image route handler to only accept and display the title parameter
  • Updated the image layout to show only logo, title, and footer (docs.sim.ai)
  • Increased footer font size from 15px to 20px and adjusted color for better readability
  • Removed conditional description rendering logic and category label from the image template
  • Updated both OpenGraph and Twitter metadata in root layout to use simplified URL format

The changes are consistent across all affected files and maintain backward compatibility since the route still accepts the title parameter as before.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward, well-scoped, and consistently applied across all relevant files. The simplification removes unused functionality without breaking existing behavior, as the route still accepts the title parameter. All OG image URL references have been properly updated to match the new simplified format.
  • No files require special attention

Important Files Changed

Filename Overview
apps/docs/app/api/og/route.tsx Simplified OG image generation by removing category and description parameters, resulting in cleaner, more focused social media cards
apps/docs/app/[lang]/[[...slug]]/page.tsx Updated OG image URL to only include title parameter, removing category and description query parameters
apps/docs/app/layout.tsx Updated default OG and Twitter image URLs to match simplified format with only title parameter

Sequence Diagram

sequenceDiagram
    participant Browser
    participant Page as Documentation Page
    participant Metadata as generateMetadata
    participant OG as /api/og Route
    participant Font as Google Fonts API

    Browser->>Page: Request documentation page
    Page->>Metadata: Generate metadata
    Metadata->>Metadata: Extract page.data.title
    Metadata->>Metadata: Build OG URL with title only
    Note over Metadata: /api/og?title={encodedTitle}
    Metadata-->>Page: Return metadata with ogImageUrl
    
    Browser->>OG: Request OG image with title param
    OG->>OG: Extract title from searchParams
    OG->>OG: Construct allText = title + "docs.sim.ai"
    OG->>Font: Load Geist font for allText
    Font-->>OG: Return font data
    OG->>OG: Generate ImageResponse
    Note over OG: - Logo<br/>- Title (dynamic font size)<br/>- Footer "docs.sim.ai"
    OG-->>Browser: Return 1200x630 PNG image
Loading

@waleedlatif1 waleedlatif1 merged commit 086982c into staging Dec 22, 2025
11 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/docs branch December 22, 2025 21:49
waleedlatif1 added a commit that referenced this pull request Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants