I have a few questions regarding Netlify and Hugo, specifically about optimizing build times and improving integration.
What is the recommended .gitignore configuration for a Hugo project hosted on Netlify?
Regarding the “public” folder: Should it be included in the .gitignore file, or is it beneficial to keep it in version control if the repository already contains existing files in the “public” folder?
Concerning the “node_modules” directory: Should it be included or excluded from the .gitignore file when hosting a Hugo site on Netlify?
What about the “resources” folder: Is it advisable to include or exclude it from the .gitignore when hosting on Netlify?
This is more of a coding/development question than Netlify, which is not what these forums are for. But to give a quick answer, you can refer to: Hrishikesh-K/tejal (github.com)
resources is debatable. Committing it would make the builds faster if you’re using a lot of Hugo’s image processing (if not, then please don’t commit it). If you don’t wish to commit it, but still want faster builds, you can use something like: Hugo Cache Resources | Netlify Integrations (it’s not officially maintained by us, so any issues/questions related to it would be for that plugin’s dev, not for Netlify)