Skip to content

Commit

Permalink
fix: article open graph image
Browse files Browse the repository at this point in the history
  • Loading branch information
valerymelou committed Aug 4, 2024
1 parent 5bc6f82 commit ad5dade
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/shared/seo/src/lib/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export class MetadataService {
}

private buildImageUrl(image: string): string {
if (image.startsWith('//')) {
return `https:${image}`;
}

return image.startsWith('http') || image.startsWith('//')
? image
: this.window.location.origin + image;
Expand Down

0 comments on commit ad5dade

Please sign in to comment.