as a way to download -> build latest content from github, just like you have in the example. After building and starting nextjs; nextjs is able to pull content into app/[...slug]/page.tsx. When using dev mode, updating content, I am able to run yarn contentlayer generate with not issues. The content is updated and nextjs shows updated content.
However, the issue is in production. After initial build and start of nextjs, when yarn contentlayer generate is ran, contentlayer pulls and updates the .contentlayer/generated folder, however, nextjs will not update the content. I have attempted in running revalidatePath, and even tried with and without generateStaticParams. Unfortunately nextjs continues to not update the content.
Of note: next-remote-mdx does update nextjs when content is added and/or removed. When I looked at the source code for next-remote-mdx I happened to notice there is a async/await function to recheck the data. When I look at contentlayer's source code, everything is a "const", so I have feeling nextjs is building with the concept nothing coming out of ".contentlayer/generated" will ever change until the next build is executed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am using nextjs 13.4.19 and the latest versions of contentlayer and next-contentlayer.
Currently using
as a way to download -> build latest content from github, just like you have in the example. After building and starting nextjs; nextjs is able to pull content into app/[...slug]/page.tsx. When using dev mode, updating content, I am able to run yarn contentlayer generate with not issues. The content is updated and nextjs shows updated content.
However, the issue is in production. After initial build and start of nextjs, when
yarn contentlayer generate
is ran, contentlayer pulls and updates the.contentlayer/generated
folder, however, nextjs will not update the content. I have attempted in running revalidatePath, and even tried with and without generateStaticParams. Unfortunately nextjs continues to not update the content.Of note: next-remote-mdx does update nextjs when content is added and/or removed. When I looked at the source code for next-remote-mdx I happened to notice there is a async/await function to recheck the data. When I look at contentlayer's source code, everything is a "const", so I have feeling nextjs is building with the concept nothing coming out of ".contentlayer/generated" will ever change until the next build is executed.