Hi,
I’ve been tasked to transfer a wordpress site, well out of wordpress, but since I’ll have to edit, I’ve decided to go at it the hard way and translate it into hugo.
Fun stuff. It’s the first time I deal with multilangual features, among other things.
But I spent so much time with my own config that I lost track of hugo’s default behavior.
I chose this tree:
/content
├── _index.en.md
├── _index.md
├── docs
│ ├── explications.en.md
│ └── explications.md
└── glossaire
I get an endless list of
for writing things like
Error: error building site: render: failed to render pages: render of “page” failed: “/home/drm/Psychototal_hugo/layouts/_default/baseof.html:13:38”: execute of template failed: template: _default/single.html:13:38: executing “_default/single.html” at : can’t evaluate field languageCode in type interface {}
{{site.languageCode}}
. Yes we normally surround them with if .Page
or whatever. But it’s a language parameter, not a page’s. So what’s the problem ?
Entire baseof
{.Title}} - {{.Params.subtitle}} {{ range .Translations}} {{end}} {{- with .Page.Params.images -}} {{ $resource := (resources.Get (index . 0)).RelPermalink}} {{- end }}{{ range .AllTranslations }}
{{ end }}