mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 02:38:32 +07:00
feat: add ogMetaImage support for blog posts and update metadata generation (#506)
- Introduced an optional `ogMetaImage` field in the blog configuration to enhance Open Graph image support. - Updated the metadata generation logic to prioritize `ogMetaImage` over the default `ogImage`. - Added a new Open Graph image for the 2026 roadmap blog post to improve social sharing visibility.
This commit is contained in:
@@ -88,7 +88,7 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
|
||||
const post = findPost(params.slug)
|
||||
if (!post) notFound()
|
||||
|
||||
const ogImage = post.ogImage ?? '/images/socialcards/default-blog-image.png'
|
||||
const ogImage = post.ogMetaImage ?? post.ogImage ?? '/images/socialcards/default-blog-image.png'
|
||||
|
||||
return {
|
||||
title: post.title,
|
||||
|
||||
@@ -7,6 +7,7 @@ tags:
|
||||
- roadmap
|
||||
- 2026
|
||||
ogImage: /images/blog/2026-02-18_2026_roadmap.png
|
||||
ogMetaImage: /images/blog/2026-02-18_2026_roadmap_og.png
|
||||
ogImagePosition: center 10%
|
||||
author: danny
|
||||
---
|
||||
|
||||
BIN
public/images/blog/2026-02-18_2026_roadmap_og.png
Normal file
BIN
public/images/blog/2026-02-18_2026_roadmap_og.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 311 KiB |
@@ -14,6 +14,7 @@ export const blog = defineCollections({
|
||||
date: z.string().or(z.date()),
|
||||
author: z.string().optional(),
|
||||
ogImage: z.string().optional(),
|
||||
ogMetaImage: z.string().optional(),
|
||||
ogImagePosition: z.string().optional(),
|
||||
category: z.enum(['release', 'feature', 'guide', 'announcement']).optional(),
|
||||
featured: z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user