Add support for GTM environments and minor refactoring #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of simply filing an issue in your repo, I decided to get my hands dirty and see whether I could contribute directly instead. :-)
I restructured the repo so that it in the future could be merged directly into a Hugo project, perhaps even as a git submodule, but let me know any concerns around this.
I've tested the solution via localhost Hugo server as well as on Cloudflare Pages automatic deployments (production and preview branches), using environment variables that I set on the cloudflare dashboard:
HUGO_ENVIRONMENT
set to eitherproduction
ordevelopment
respectively.Looking forward to your input on the additions. Again, thanks for the excellent work on both the blog post and this repo!