Questions about hugo environment variables

He was trying to help (and he pointed you to the hugo command, not the “whole documentation”), be grateful and be polite.

So,

You can set it via either

  • HUGO_ENVIRONMENT os variable
  • --environment flag

You can get it with hugo.Environment. Note that the defaults are development for server and production for regular hugo.

4 Likes