TomasBankauskas resolved the issue, and merged over on github.
However, the resolution has introduced a new issue:
When building locally npm run dev
I’m getting the following errors since the [[…slug]].js change.
Error: Error serializing `.site.footer` returned from `getStaticProps` in "/[[...slug]]".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.
I get the same for site.header and author:
Error: Error serializing `.page.sections[2].posts[0].author` returned from `getStaticProps` in "/[[...slug]]".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.
if I add a console.log to getStaticProps
in [[…slug]].js, I see the following:
Author as undefined, although it is set for my posts.
type: 'PostLayout',
title: 'The State of Web Accessibility: What We Can Learn from the WebAIM Million Project',
date: '2025-02-20',
excerpt: '"pages with fewer errors have gotten better while pages with many errors have gotten worse."',
bottomSections: [Array],
slug: 'what-we-can-learn-from-the-webaim-million-project',
isFeatured: false,
isDraft: false,
seo: [Object],
colors: 'bg-light-fg-dark',
styles: [Object],
author: undefined,
featuredImage: [Object],
markdown_content: '![three
site.footer and site.header as undefined:
props: {
site: {
favicon: '/images/favicon.svg',
footer: undefined,
titleSuffix: 'Jason Day',
defaultSocialImage: '/images/main-hero.jpg',
type: 'Config',
header: undefined,
enableAnnotations: true,
__metadata: [Object]
}
}