Does hugo fully recreate public folder

Hi all,

I was wondering if hugo generates all the content of public folder everytime we run the ‘hugo’ command.
Lets say we have about us layout, contact us layout etc. If I change the content of about us layout and not the contact us layout and then do the hugo command, will it still purge everything and recreate the entire stuff or will it only recreate the about us layout pages.

I also have a more complex question as well. Lets say there are thousands of content pages within the content folder. And each of the content page (.md or .html) file has many lines of front matter. If I change the front matter of one content file and then run the hugo command, will it still recreate all the remaining pages as well.

I request you to kindly throw some light on the same.

It will only rebuild the changed pages. If you want a clean build each time, you can use:

hugo --cleanDestinationDir

If I’m understanding your question, then hugo will only rebuild the page which had its front matter changed.

1 Like

Could this get any more greater than this. Thank You. And sorry for the late reply. It was night here and I didnt see your reply.

Thanks to the Developers and Moderators of Hugo.

2 Likes