Getting New Blog Posts to Display in Production with SSG
Answered
Red carpenter ant posted this in #help-forum
Red carpenter antOP
Hi everyone, I'm working on the frontend of a project, the project that includes a blog. When developing locally, new blog articles added through the admin dashboard update fine on the localhost environment, However, after deploying to production, any articles added via the dashboard do not show up on the blog listing page. (only displays the articles that were present during the build process)
- The reason I'm using static export is that we are deploying to a shared hosting which can not run node.js (which nextjs ssr needs as far as I know).
- We uses PHP Laravel in the backend.
Any suggestions would be appreciated.
- The reason I'm using static export is that we are deploying to a shared hosting which can not run node.js (which nextjs ssr needs as far as I know).
- We uses PHP Laravel in the backend.
Any suggestions would be appreciated.
Answered by joulev
that's a fundamental problem of static export. they are just html files, you cannot change them at will without redeploying
9 Replies
@Red carpenter ant Hi everyone, I'm working on the frontend of a project, the project that includes a blog. When developing locally, new blog articles added through the admin dashboard update fine on the localhost environment, However, after deploying to production, any articles added via the dashboard do not show up on the blog listing page. (only displays the articles that were present during the build process)
- The reason I'm using static export is that we are deploying to a shared hosting which can not run node.js (which nextjs ssr needs as far as I know).
- We uses PHP Laravel in the backend.
Any suggestions would be appreciated.
since you are using static export, you have to redeploy whenever there's a change in the blog post (new post added, post deleted, post edited)
that's a fundamental problem of static export. they are just html files, you cannot change them at will without redeploying
Answer
Red carpenter antOP
Thanks for your answer, is there are any other options of making an app that got updated after deployment? or it is just not possible in shared hosting.
And thanks again for your time.
And thanks again for your time.
@Red carpenter ant Thanks for your answer, is there are any other options of making an app that got updated after deployment? or it is just not possible in shared hosting.
And thanks again for your time.
You need to not use static export. Check if your hosting provider supports running a nodejs process 24/7
Red carpenter antOP
Ok I will, but what I meant by "other options" other techs other than Next.js
@Red carpenter ant Ok I will, but what I meant by "other options" other techs other than Next.js
As long as you only serve html, no tech can do that. I don’t know about your hosting provider so I can’t comment more
Red carpenter antOP
I'm using Hostinger, which I think they does not support node.js
Never used it. So I don’t know
@joulev Never used it. So I don’t know
Red carpenter antOP
Alright, thank you very much.