Skip to content

Commit

Permalink
fix: static generation for syslog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnl committed Sep 22, 2024
1 parent 52c0a82 commit 516f925
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/syslog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ import testausorveli from '@/assets/testausorveli.png';
import { PostsGrid } from '@/components/PostsGrid/PostsGrid';
import remarkGfm from 'remark-gfm'

// seems like next.js is bugging
// https://github.com/vercel/next.js/issues/52765
/*
export const dynamicParams = false;
export const dynamic = 'force-static';
*/

export async function generateStaticParams() {
const postsDirectory = path.join(process.cwd(), 'posts');
const filenames = await fs.readdir(postsDirectory);

const paths = filenames;
const paths = filenames.map(filename => (
{
slug: filename
}
));

console.log("Generated paths for posts: ", paths)

Expand Down

0 comments on commit 516f925

Please sign in to comment.