Skip to content

Commit

Permalink
Remove default lastModificationDate = now() (#510)
Browse files Browse the repository at this point in the history
Based on the latest Google' Search documentation (https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping#the-lastmod-element)

> Second, it needs to consistently match reality: if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore when it comes to the last modified date of your pages.
  • Loading branch information
robindirksen1 authored Jun 27, 2023
1 parent fc362d4 commit eadf327
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Tags/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public function __construct(string $url)
{
$this->url = $url;

$this->lastModificationDate = Carbon::now();

$this->changeFrequency = static::CHANGE_FREQUENCY_DAILY;
}

Expand Down

1 comment on commit eadf327

@abordage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit broke the tests. @robindirksen1, could you fix it? I want to send a new PR, but I think it won't pass because of the tests

Please # to comment.