Configurations

There are HUGO config directory settings that helps setting up your Hugo. Based on the specification here, you can either create the configurations in:

  • one file known as config.toml
  • one directory known as config directory

Recommendation

Stick to directory.

It makes more sense to do it that way since you can split a long config.toml into a cleaner, scalable, and automation capable solution. We're looking at mulilingual mode, along sides with irregular menus.

Environment Supports

For directory configurations mode, Hugo has the ability to run different configurations in different environments. You can design your own environment inside the config directory. By default, you must have a _default environment directory to fall back just in case there is a missing key somewhere.

Some good examples are:

  • development_default
  • production_default
  • test_default

Hence, all my guides here are strictly directory mode, with default environment sets to _default. Hence, whenever a subsection mentions a file, you can safely assumes I'm referring to content/_default/file. This is applicable to any other environments.


If you're ready, feel free to visit the sub-sections.