I’m currently in the process of building my personal website, which will contain a blog section. Within that blog section, I want to allow people to comment using Disqus, which is fairly easy to achieve with Zola.
The problem is that because of the way Disqus works, you only want it to be on the released site, not on local test builds. (I assume it is similar for things like Google Analytics, but I don’t really know.) For this reason, it’d be great, if one could tell the
zola build command whether or not it is building the release or the development version.
This could be implemented similarly to the
base_url as an option in the
config.toml with an optional
--release flag to override the value from the file. The value could be a bool or a string. The former would be a fairly simple system while the later would allow users much more flexibility (perhaps a company internal and a public version). As default values, I’d suggest
false or something like “test” or “debug”.
A notable workaround to this feature, that works with the current version is setting an environment variable and checking it with teras
get_env() built-in function.
If you are open to a feature like this, I’d be willing to implement it myself. However, I currently don’t have the time to do so, I could start in about two months.
What do you think?