Multilingual Mode and .File.Dir


I am not sure whether this is a bug in the theme I am using but I have the following problem when I enable multilingual mode in hugo with the syna theme:

In one of the partials they call the following code:

  {{- $file_path := printf "%s%s/config.json" .page.File.Dir .Name -}}

As soon as I add another language to my config.toml this throws the following error:

executing "partials/fragments/hero.html" at <.page.File.Dir>: error calling Dir: runtime error: invalid memory address or nil pointer dereference

It seems that the .File.Dir variable is not set when using multiple languages. Is that intended?



1 Like

Did you open an issue on the Syna issue tracker?

Not yet, since I am not sure on whether this is a hugo or a Syna