Skip to content

Commit

Permalink
remove x-default from opengraph alternate
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Sep 14, 2024
1 parent 4010420 commit 23e3ba6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SeoManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ public function setAlternates(?array $value): static
if ($this->opengraph) {
$this->opengraph->locale = new Locale(
locale: $this->opengraph->locale?->locale ?? App::getLocale(),
alternate: array_map(fn ($item) => $item->toOpenGraph(), $value ?? [])
alternate: collect($value)
->where('hreflang', '!=', 'x-default')
->map(fn ($item) => $item->toOpenGraph())
->toArray()
);
}

Expand Down

0 comments on commit 23e3ba6

Please sign in to comment.