I have read a some of the Framework guides but I still need some help please.
The guide prompts me to run Hugo on my local machine. This generates then saves the HTML into a ‘public’ directory within my Git repository. But, as I understand it, Cloudflare, at build time, will run its own copy of Hugo which uses my repo’s markdown files as the source. Why do I need to run Hugo locally?
I am not using a framework but have my own single custom binary, say, ‘myGen’, which renders my site. I would like Cloudflare to run myGen, is this possible and how would I go about it?
You run locally just to verify the build output is the same. You do not commit the public folder and you don’t want to re-run it every time manually. We do indeed run the command and will take the contents to upload them.
If myGen is something like a bash file you can simply do ./myGen.sh. You can run it just like you would any other file in a Linux container. Just set it as your build command