parent
d1b27854ea
commit
4f9917bc5c
6 changed files with 55 additions and 41 deletions
@ -0,0 +1,19 @@ |
|||||||
|
type GuideOpenGraphParams = { |
||||||
|
type: 'guide'; |
||||||
|
authorName: string; |
||||||
|
authorAvatar?: string; |
||||||
|
title: string; |
||||||
|
description: string; |
||||||
|
}; |
||||||
|
|
||||||
|
type RoadmapOpenGraphParams = { |
||||||
|
type: 'roadmap'; |
||||||
|
title: string; |
||||||
|
description: string; |
||||||
|
}; |
||||||
|
|
||||||
|
export function getOpenGraphImageUrl( |
||||||
|
params: GuideOpenGraphParams | RoadmapOpenGraphParams, |
||||||
|
) { |
||||||
|
return `${import.meta.env.PUBLIC_API_URL}/v1-open-graph?${new URLSearchParams(params)}`; |
||||||
|
} |
Loading…
Reference in new issue