Skip to content

(SP: 2) [Frontend] Open Graph (OG) meta + Twitter Card#289

Merged
ViktorSvertoka merged 1 commit into
developfrom
chore/og-metadata-and-social-preview
Feb 7, 2026
Merged

(SP: 2) [Frontend] Open Graph (OG) meta + Twitter Card#289
ViktorSvertoka merged 1 commit into
developfrom
chore/og-metadata-and-social-preview

Conversation

@ViktorSvertoka
Copy link
Copy Markdown
Member

@ViktorSvertoka ViktorSvertoka commented Feb 7, 2026

  • Adds Open Graph metadata for consistent link previews across Telegram/LinkedIn/Facebook
  • Adds Twitter Card metadata (summary_large_image)
  • Uses /public/og.png (1200×630) as the preview image
  • Includes site icons for light/dark color schemes

#288

Summary by CodeRabbit

  • New Features
    • Enhanced SEO and social media metadata with title, description, and platform-specific preview information
    • Improved social media card support for OpenGraph and Twitter, enabling richer link previews
    • Added support for images, locale details, and site name metadata for better discoverability when sharing across social platforms

@ViktorSvertoka ViktorSvertoka self-assigned this Feb 7, 2026
@ViktorSvertoka ViktorSvertoka added the performance Performance and efficiency optimizations without functional changes. label Feb 7, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 7, 2026

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

Project Deployment Actions Updated (UTC)
devlovers-net Ready Ready Preview, Comment Feb 7, 2026 2:57pm

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 7, 2026

Deploy Preview for develop-devlovers ready!

Name Link
🔨 Latest commit efc5acd
🔍 Latest deploy log https://app.netlify.com/projects/develop-devlovers/deploys/698752d689188a0008b96d6c
😎 Deploy Preview https://deploy-preview-289--develop-devlovers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

Augments the Next.js layout metadata object by adding SEO and social media preview fields including title, description, openGraph configuration with social preview images, and Twitter card metadata. No functional changes; purely static metadata configuration.

Changes

Cohort / File(s) Summary
SEO & Social Metadata
frontend/app/layout.tsx
Extends metadata export with title, description, openGraph (title, description, url, siteName, images, locale, type), and twitter (card, title, description, images) fields for enhanced SEO and social preview optimization.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • AM1007

Poem

🐰 With metadata so bright and so fine,
Social cards and descriptions align,
SEO hops forward with OpenGraph delight,
Twitter cards gleaming, what a precious sight!
Our little warren now shares with such grace,

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding Open Graph and Twitter Card metadata to the frontend layout, which matches the primary objective of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/og-metadata-and-social-preview

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/app/layout.tsx (1)

1-7: ⚠️ Potential issue | 🟡 Minor

Duplicate globals.css import.

Lines 1 and 7 both import ./globals.css. One of them should be removed.

Proposed fix
-import './globals.css';
-
 import type { Metadata } from 'next';
 import { Geist, Geist_Mono } from 'next/font/google';
 import { Analytics } from '@vercel/analytics/next';
 import { SpeedInsights } from '@vercel/speed-insights/next';
 import './globals.css';
🤖 Fix all issues with AI agents
In `@frontend/app/layout.tsx`:
- Line 27: The OG locale setting locale: 'en_US' conflicts with the page HTML
lang attribute <html lang="uk">; update one to match the intended site
language—either change locale: 'en_US' to locale: 'uk_UA' to match <html
lang="uk"> (and update any related metadata strings) or change <html lang="uk">
to <html lang="en"> if English is the target; ensure consistency between the
locale property and the HTML lang attribute (search for locale: 'en_US' and the
<html lang="uk"> declaration to apply the fix).
🧹 Nitpick comments (1)
frontend/app/layout.tsx (1)

10-35: Three distinct description strings across metadata.description, openGraph.description, and twitter.description.

Having different descriptions is technically valid, but it creates a maintenance burden and inconsistent previews across platforms. Consider defining a single description constant and reusing it, or at most two variants (a full one and a shortened one).

Also, title is duplicated verbatim three times — extracting it into a constant would reduce repetition.

Example refactor
+const SITE_TITLE = 'DevLovers — Technical Interview Platform';
+const SITE_DESCRIPTION =
+  'DevLovers is a modern platform for developers to prepare for technical interviews: Q&A, quizzes, leaderboards, AI explanations, and multi-language support.';
+
 export const metadata: Metadata = {
-  title: 'DevLovers — Technical Interview Platform',
-  description:
-    'DevLovers is a modern platform for developers to prepare for technical interviews: Q&A, quizzes, leaderboards, AI explanations, and multi-language support.',
+  title: SITE_TITLE,
+  description: SITE_DESCRIPTION,
   openGraph: {
-    title: 'DevLovers — Technical Interview Platform',
-    description:
-      'Prepare for technical interviews with Q&A, quizzes, leaderboards, and AI-powered explanations.',
+    title: SITE_TITLE,
+    description: SITE_DESCRIPTION,
     url: 'https://devlovers.net',
     siteName: 'DevLovers',
     ...
   },
   twitter: {
     card: 'summary_large_image',
-    title: 'DevLovers — Technical Interview Platform',
-    description: 'Modern interview preparation platform for developers.',
+    title: SITE_TITLE,
+    description: SITE_DESCRIPTION,
     images: ['https://devlovers.net/og.png'],
   },

Comment thread frontend/app/layout.tsx
alt: 'DevLovers — Technical Interview Platform',
},
],
locale: 'en_US',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Locale mismatch: en_US in OG metadata vs lang="uk" on <html> tag (Line 66).

The Open Graph locale is set to en_US, but the HTML document declares lang="uk" (Ukrainian). This sends conflicting language signals to social platform crawlers and search engines. Either the OG locale should be uk_UA to match the HTML lang, or the HTML lang should be en if the site is primarily English. Align these based on the actual target audience language.

🤖 Prompt for AI Agents
In `@frontend/app/layout.tsx` at line 27, The OG locale setting locale: 'en_US'
conflicts with the page HTML lang attribute <html lang="uk">; update one to
match the intended site language—either change locale: 'en_US' to locale:
'uk_UA' to match <html lang="uk"> (and update any related metadata strings) or
change <html lang="uk"> to <html lang="en"> if English is the target; ensure
consistency between the locale property and the HTML lang attribute (search for
locale: 'en_US' and the <html lang="uk"> declaration to apply the fix).

@ViktorSvertoka ViktorSvertoka merged commit 2918760 into develop Feb 7, 2026
11 checks passed
@ViktorSvertoka ViktorSvertoka deleted the chore/og-metadata-and-social-preview branch February 7, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance and efficiency optimizations without functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant