Aliases in multilang setups with output formats

I have a site with two languages configured plus one output format for print like that:

[outputFormats]
  [outputFormats.print]
    name= 'print'
    baseName = 'index.print'
    isHTML = true
    mediaType = 'text/html'
    permalinkable = false
    noUgly = true

[outputs]
  home = ['html', 'rss', 'print']
  section = ['html', 'rss', 'print']
  page = ['html', 'print']

Everything works fine until I add to my config:

defaultContentLanguageInSubdir = true

In this case the alias file ./index.html points correctly to ./en/index.html. But ./en/index.html points back to itself resulting in an infinite reload loop, instead of containing the content.

Am I doing something wrong in my config?

This behavior is nothing new. I’ve tested it with Hugo 0.141.0 and it behaves in the same way as the latest version.

Demo repo: GitHub - McShelby/hugo-testing at hugo-forum-topic-56695

Please test again. The problem began with v0.154.4, probably related to: https://github.com/gohugoio/hugo/pull/14355

And it is triggered by setting isHTML to true for the print output format. This is a bug. See https://github.com/gohugoio/hugo/issues/14482.

You are right. This was an error in my test scripts.

Fixed with #14484 in v0.155.3.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.