Skip to content

Conversation

@NebraskaCoder
Copy link
Member

Summary

  • Add Open Graph protocol meta tags to news pages for better social media sharing
  • Add JSON-LD structured data (NewsArticle schema) for improved Google Search indexing
  • Include sanitized JSON-LD utility with XSS protection and unit tests
  • Shorten excerpt length to 150 characters for optimal OG description

Changes

  • app/[locale]/news/page.tsx - OG metadata for news listing
  • app/[locale]/news/[slug]/page.tsx - OG metadata and JSON-LD for articles
  • lib/news.ts - Reduced excerpt length from 200 to 150 chars
  • utils/jsonLd.ts - Safe JSON-LD stringify utility
  • utils/__tests__/jsonLd.test.ts - Unit tests for sanitizer

🤖 Generated with Claude Code

NebraskaCoder and others added 5 commits December 4, 2025 02:47
Add OG protocol tags to improve social media sharing for news content:
- /news listing: og:title, og:description, og:url, og:site_name, og:locale, og:type
- /news/[slug] articles: article-specific tags including published_time and authors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add NewsArticle schema.org structured data for better Google Search indexing.
Includes sanitized JSON-LD output utility to prevent XSS in PR contributions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Reduces auto-generated excerpt from 200 to 150 characters to meet
Open Graph description guidelines (110-160 characters optimal).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add & -> \u0026 escaping for comprehensive XSS protection
- Add unit tests covering script injection, HTML entities, nested objects, and arrays

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…data

Add Open Graph and JSON-LD metadata to news pages
@NebraskaCoder NebraskaCoder self-assigned this Dec 4, 2025
@vercel
Copy link

vercel bot commented Dec 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
rockylinux-org Ready Ready Preview Comment Dec 4, 2025 9:14am

@NebraskaCoder NebraskaCoder merged commit da59e2b into main Dec 4, 2025
3 checks passed
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