diff --git a/formwork/Core/Page.php b/formwork/Core/Page.php index 7e5cf8e2..98467dd8 100644 --- a/formwork/Core/Page.php +++ b/formwork/Core/Page.php @@ -196,7 +196,7 @@ class Page extends AbstractPage public function __construct(string $path) { $this->path = FileSystem::normalizePath($path . DS); - $this->relativePath = Str::wrap(Str::removeStart($this->path, Formwork::instance()->site()->path(), DS), DS); + $this->relativePath = Str::wrap(Str::removeStart($this->path, Formwork::instance()->site()->path()), DS); $this->route = Uri::normalize(preg_replace('~/(\d+-)~', '/', $this->relativePath)); $this->id = basename($this->path); $this->slug = basename($this->route);