I’ve seen at least one theme creator suggesting this. It seems to make sense, but, being a beginner, why would it be a “healthy” option, and is it bad if we choose to keep everything in the same repo?
Basically, what I’m asking is what would be the rationale for choosing either option.
For most it is a matter of preference. I don’t keep the generated files in version control, because I’ve no reason to, and don’t want to track them. Some folks can’t do this, and some folks have to do this, depending on how their site is deployed.
I don’t use GitHub, so I am not sure if it generates sites for Hugo, so if you are hosting your site there (GitHub Pages), then you should follow the instructions for deploying there.
For what it is worth, I keep source files in version control, and then I deploy sites to other systems. I never keep any generated files in version control. It is like double committing or more each time you make an update…
Hmm… Well, I’m thinking of hosting through Netlify, so I am not sure what the best option would be—I was hoping understanding the reasons behind each one would help me decide…
Come to think of it, I’m not sure the hosting provider I go with renders this question futile.
Keeping the generated files in version control doesn’t make much sense for me either.
You tell Netlify the engine and version (ex: Hugo 0.30) and then it builds your site for you. No need to keep generated output in version control for that. Check Netlify’s docs, it should explain everything, such as telling them which version of Hugo to use.
Yeah, maybe someone hosting on GitHub Pages can chime in. I recall it having to read the gh-pages branch, and they only process Jekyll files, but I don’t keep up with that. Don’t matter, they make it extremely hard to use HTTPS, so it ought to be avoided all together.
I use Netlify.
I don’t commit the generated public directory to version control.
I would at least start like this Claudia - it will keep things easy for you and you can always change in the future if you want to (though I think you’ll be very happy with the Netlify set up).