diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1640f6f..32e9cec 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -44,7 +44,6 @@ jobs: run: | touch .env echo NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }} >> .env - echo NEXT_PUBLIC_COPYRIGHT=${{ secrets.NEXT_PUBLIC_COPYRIGHT }} >> .env echo NEXT_PUBLIC_DISQUS_SHORTNAME=${{ secrets.NEXT_PUBLIC_DISQUS_SHORTNAME }} >> .env echo NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID }} >> .env echo NEXT_PUBLIC_POSTS_PER_PAGE=${{ secrets.NEXT_PUBLIC_POSTS_PER_PAGE }} >> .env diff --git a/src/Posts/application/ListPostsUseCase.ts b/src/Posts/application/ListPostsUseCase.ts index a247b40..58b6d37 100644 --- a/src/Posts/application/ListPostsUseCase.ts +++ b/src/Posts/application/ListPostsUseCase.ts @@ -27,7 +27,9 @@ export class ListPostsUseCase implements UseCase> { const totalPages: number = await this.postsRepository.getTotalPages(locale); if (page > totalPages || page < MINIMUM_PAGE) { - throw new Error(`Invalid page number ${page}`); + throw new Error( + `Invalid page number: ${page} (totalPages: ${totalPages})`, + ); } const postPaths: string[] = diff --git a/src/Posts/domain/PostsRepository.ts b/src/Posts/domain/PostsRepository.ts index aaf65ff..300fe47 100644 --- a/src/Posts/domain/PostsRepository.ts +++ b/src/Posts/domain/PostsRepository.ts @@ -47,7 +47,7 @@ export class PostsRepository { .replace(/\w*\//, "") .replace(/(?:\/index)?\.md$/, ""); - console.log(`${postPath.replace(postsDirectoryPath, "")} -> ${slug}`); + // console.log(`${postPath.replace(postsDirectoryPath, "")} -> ${slug}`); return slug; }