I want to create a shortcode to render my images via Cloudinary (after reading this thread).
For the sake of simplicity, I want to use the Auto-Fetch feature from cloudinary which only requires to prepend my images URLs with their URL. Creating a shortcode will be pretty easy.
The only thing I’m missing is if there is a variable that the shortcode can use to decide if the current state is ‘Dev’ (ran via
hugo server) or ‘Prod’ (ran via
hugo). So far I’m planning to use
.Site.BaseURL and compare with
http://localhost:1313 to decide if I’m on my machine or not.
Is there anything better than that?