跳到內容
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

Invalid value returned by a getStaticPaths path.

本頁內容尚未翻譯。

InvalidGetStaticPathParam: Invalid params given to getStaticPaths path. Expected an object, got PARAM_TYPE

The params property in getStaticPaths’s return value (an array of objects) should also be an object.

pages/blog/[id].astro
---
export async function getStaticPaths() {
return [
{ params: { slug: "blog" } },
{ params: { slug: "about" } }
];
}
---

See Also:

貢獻

你有哪些想法?

社群