fix(blog): dev server not working
This commit is contained in:
parent
ae68974ead
commit
037a5625fb
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ interface Props {
|
||||||
params: Params
|
params: Params
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams
|
||||||
|
*/
|
||||||
|
export const dynamicParams = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://nextjs.org/docs/app/api-reference/functions/generate-static-params
|
||||||
|
*/
|
||||||
export async function generateStaticParams(): Promise<Params[]> {
|
export async function generateStaticParams(): Promise<Params[]> {
|
||||||
return Object.keys(contentMap.posts).map((key) => {
|
return Object.keys(contentMap.posts).map((key) => {
|
||||||
const contentID = key.replace(/\/$/, "") // remove trailing slash
|
const contentID = key.replace(/\/$/, "") // remove trailing slash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue