Unhandled Runtime Error
Error: Failed to load static props
When navigating to blog post routes the following error is shown:

Steps to reproduce the behavior, please provide code snippets or a repository:
Show blog page without error
If I comment out preview here it fixes the issue but can't use Preview Mode:
export async function getStaticProps({ params, preview }) {
const data = await getPostAndMorePosts(params.slug, preview);
const content = await markdownToHtml(data?.post?.content || "");
return {
props: {
// preview,
post: {
...data?.post,
content,
},
morePosts: data?.morePosts,
},
};
}
@jahlherapath, use the default null value:
export async function getStaticProps({ params, preview = null }) {
// ...
}
Closing as we confirmed the latest version of this example correctly sets the default preview value. Please ensure you have the latest version of the template.

@Timer btw, it is possible to add in the future a default value (null or false) of preview in the next.js core?
Most helpful comment
Closing as we confirmed the latest version of this example correctly sets the default
previewvalue. Please ensure you have the latest version of the template.