Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.19 KB

get-static-paths-expected-params.mdx

File metadata and controls

37 lines (28 loc) · 1.19 KB
title i18nReady githubURL
Missing params property on getStaticPaths route.
true

import DontEditWarning from '~/components/DontEditWarning.astro'

GetStaticPathsExpectedParams: Missing or empty required params property on getStaticPaths route.

What went wrong?

Every route specified by getStaticPaths require a params property specifying the path parameters needed to match the route.

For instance, the following code:

---
export async function getStaticPaths() {
	return [
		{ params: { id: '1' } }
	];
}
---

Will create the following route: site.com/blog/1.

See Also: