If I need to keep two duplicate repos (public for production and private for development, for some reason) with different branches except the same master branches, and want to build them via Netlify, can I use the same baseURL for the two repos? If possible, what would be the best practice?
To my understanding, it seems like it is hard to achieve, by using any of the following:
baseURL in config.toml
HUGO_BASEURL or $URL/$DEPLOY_PRIME_URL in netlify.toml
If anyone experienced a similar situation and have some clue, I’d appreciate your help.
Other than $DEPLOY_PRIME_URL, could someone let me know what’s the difference between $URL and HUGO_BASEURL on netlify.toml? Is one of them equivalent to baseURL in Hugo’s config.toml?
I am aware that this is off-Hugo question, but could not find clear explanation on Netlify documentation.
You need to understand that Hugo can be configured with OS environment variables. So setting HUGO_BASEURL as an OS env is the same as hugo -b https://example.com.
For Netlify variables, I suggest you read their docs.