Skip to content

Commit c28b2b6

Browse files
committed
fix: edit this page url
1 parent 65b85d7 commit c28b2b6

File tree

2 files changed

+53
-35
lines changed

2 files changed

+53
-35
lines changed

composer.lock

Lines changed: 46 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Web/Documentation/Chapter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use App\Web\Meta\MetaImageController;
88

99
use function Tempest\Router\uri;
10+
use function Tempest\Support\str;
1011

1112
final class Chapter
1213
{
@@ -48,6 +49,11 @@ public function getMetaUri(): string
4849

4950
public function getEditPageUri(): string
5051
{
51-
return "https://github.com/tempestphp/tempest-docs/edit/main/{$this->path}";
52+
$file = str($this->path)
53+
->afterLast('content/')
54+
->stripStart($this->version->getBranch())
55+
->stripStart('/');
56+
57+
return "https://github.com/tempestphp/tempest-framework/edit/{$this->version->getBranch()}/docs/{$file}";
5258
}
5359
}

0 commit comments

Comments
 (0)