Skip to content

Commit 31ffc5e

Browse files
committed
Remove unreachable legacy relative sitemap link resolving
This does not seem to be reachable from the actual commands, only by unit tests and direct code access. Since it's a protected method it is not covered by BC.
1 parent 8e7969e commit 31ffc5e

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

packages/framework/src/Framework/Features/XmlGenerators/SitemapGenerator.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
use Hyde\Pages\DocumentationPage;
1919
use Hyde\Foundation\Facades\Routes;
2020

21-
use function blank;
2221
use function in_array;
2322
use function date;
24-
use function str_starts_with;
2523

2624
/**
2725
* @see https://www.sitemaps.org/protocol.html
@@ -98,17 +96,6 @@ protected function getChangeFrequency(string $pageClass, string $identifier): st
9896

9997
protected function resolveRouteLink(Route $route): string
10098
{
101-
$baseUrl = Config::getNullableString('hyde.url');
102-
103-
if (blank($baseUrl) || str_starts_with($baseUrl, 'http://localhost')) {
104-
// TODO: This does not seem to be reachable from the actual commands, and should be removed.
105-
106-
// While the sitemap spec requires a full URL, we rather fall back
107-
// to using relative links instead of using localhost links.
108-
109-
return $route->getLink();
110-
}
111-
11299
return Hyde::url($route->getOutputPath());
113100
}
114101
}

0 commit comments

Comments
 (0)