Changed TOML interpretation in 0.112 - a bug?

This config.toml fragment:

[mediaTypes]
  [mediaTypes."text/htaccess"]
    suffixes = ["htaccess"]

[outputFormats]
  [outputFormats.htaccess]
    mediaType = "text/htaccess"
    baseName = ""
    isPlainText = false
    notAlternative = true

produces .htaccess files in the desired directories on 0.111.2. However, on 0.112.0 the same config produces index.htaccess files instead.

Obviously, the explicitly set empty baseName gets ignored (new in 0.112). Is this a regression or some desired behavior?

That sadly looks a bug. Can you put the above into a GitHub issue?

https://github.com/gohugoio/hugo/issues/11000

OK, I have a patch in the pipeline. The good thing was that it wasn’t something major wrong with the TOML handling of empty strings, just this case with the BaseName (which is bad enough, of course).

Again, thanks for the report, I will push a patch release soon.

4 Likes

Sorry, a full day today, only now back at the keyboard. Thank you for sorting this one out!

(I think I have a couple more for the 0.112, but those will need a little testing first).

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