private function findPageByUri($uri)
    {
        $repository = $this->repository->with('images', 'documents', 'publishedSections');

        if ($uri === null) {
            return $repository->findBy('is_home', 1);
        }

        // Only locale in url
        if (
            in_array($uri, locales()) &&
            (
                config('app.fallback_locale') != $uri ||
                config('typicms.main_locale_in_url')
            )
        ) {
            return $repository->findBy('is_home', 1);
        }

        return $repository->getFirstByUri($uri);
    }