Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Apr 14, 2024
1 parent 2177b4d commit 748b139
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "::set-output name=manager::npm"
echo "::set-output name=command::ci"
echo "::set-output name=runner::npx --no-install"
echo "::set-output name=runner::npx"
exit 0
else
echo "Unable to determine packager manager"
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
run: ${{ steps.detect-package-manager.outputs.runner }} npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
10 changes: 2 additions & 8 deletions app/api/posts/[slug]/route.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import {NextRequest, NextResponse} from "next/server";
import {getPostBySlug, getAllPosts} from "../markdown";
import {getPostBySlug} from "../markdown";


export async function GET(request: NextRequest, {params}: { params: { slug: string } }) {
const slug = params.slug;
const post = getPostBySlug(slug);
return NextResponse.json(post);
}


export async function generateStaticParams() {
const slugs = await getAllPosts();
return slugs.map((slug) => ({ slug }));
}
}

0 comments on commit 748b139

Please sign in to comment.