diff --git a/.dockerignore b/.dockerignore index 72e9aa42..b8587fdd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,6 @@ Dockerfile .dockerignore node_modules npm-debug.log -README.md +/README.md .next .git \ No newline at end of file diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 5e10c384..0337476d 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -102,4 +102,5 @@ jobs: uses: docker/build-push-action@v4 with: file: ./Dockerfile - push: false \ No newline at end of file + push: false + context: . \ No newline at end of file diff --git a/src/pages/[...id].tsx b/src/pages/[...id].tsx index e8b578ff..e639a592 100644 --- a/src/pages/[...id].tsx +++ b/src/pages/[...id].tsx @@ -138,8 +138,8 @@ export async function getStaticPaths(): Promise<{ ); // TODO allows to put in image files in `posts` directory const paths = slugs.map((p) => ({ - params: { id: p.replace("/", "").split("/") }, - })); + params: { id: p.replace(/^\//, "").split("/") }, + })).filter((p) => p.params.id.length !== 0 && p.params.id[0] !== ""); return { paths, fallback: false,