Closed saurabhjain06 closed 3 years ago
Hi @saurabhjain06!
yarn develop
should be enough in most cases.Thanks @styxlab, I am still learning about static sites.. I think thats the concept behind static site is that with every change in content (post, theme, etc.), we need to rebuild and upload it to the servers. No matter dev or prod we have to rebuild. right?
That's correct, but gatsby/netlify can utilize a cache, so subsequent builds are faster.
Thanks @styxlab for this great theme and guidance.. I must say that both Gatsby and next themes are great, though couldn't able to build the nextjs theme in local server due to image optimisation issue with next export (I was planning to build locally and update it manually)..
For the Next.js project: You can switch off the image optimizations in appConfig.ts
. You can build everything local and deploy it with the CLIs from vercel
or netlify
from your local machine. However, in case of the Next.js project, you must have a Ghost CMS install that is publicly available in order to be able to access the images, because they are not sourced in during the build process. That's different from the Gatsby project where you have the option to that.
I think as of now I will keep Gatsby for my blog.. Thanks for your help..
I am working in localhost environment. Whenever I write a new post, I have to rebuild the Gatsby project by triggering command yarn clean; yarn develop. Is it expected behaviour? Whenever I upload the production build to netlify or any other provider, do I need to rebuild each time? Note:- I am planning to keep my ghost at localhost for production env also.