Skip to content

Commit

Permalink
Fix custom sitemaps (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored Jul 10, 2024
1 parent e574841 commit 6ef3bab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Sitemap/CustomSitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

class CustomSitemap extends BaseSitemap
{
protected Collection $urls;

public function __construct(protected string $handle)
{
$this->urls = collect();
Expand Down
9 changes: 8 additions & 1 deletion src/Sitemap/CustomSitemapUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ class CustomSitemapUrl extends BaseSitemapUrl
{
use FluentlyGetsAndSets;

public function __construct(protected string $loc) {}
public function __construct(
protected string $loc,
protected ?string $alternates = null,
protected ?string $lastmod = null,
protected ?string $changefreq = null,
protected ?string $priority = null,
protected ?string $site = null,
) {}

public function loc(?string $loc = null): string|self
{
Expand Down

0 comments on commit 6ef3bab

Please sign in to comment.