When is a Hugo Module a Hugo Module?

Hi developers and less divine people like me,

quick Sunday question: When is a Hugo Module a Hugo Module?

  1. when it has a go.mod in it’s root directory.
  2. when it has a go.mod in it’s root directory AND a module section in it’s configuration
  3. when it has a module section in it’s configuration

Multiple answers are possible.

I don’t know it, the documentation does not seem too clear on it, but I would choose 1 and 2 with the requirement of having at least a go.mod with module modulename and go version in it.

1 Like

I highly doubt that developers are of the deity type. :face_with_monocle:

Regarding the question, as far as I know Hugo modules are Go modules, so a go.mod file is mandatory, because without it there can be no Hugo module (at least of the kind that can be initialised with hugo mod init <etc>).

1 Like