0.115.0: outputFormats issue

Following my post

and @jmooring issue 11159

In version 0.115.0 the issue been addressed, however there are couple things not working as expected.

Having following in config:

  page = [ "HTML"]
  home = [ "HTML", "RSS", "IMAGESSITEMAP", "JSON"]

  MediaType              = "application/xml"
  BaseName               = "imagessitemap"
  isPlainText            = false
  isHTML                 = false
  noUgly                 = true
  permalinkable          = false

Trigger warning that wasn’t in previous versions

WARN  found no layout file for "imagessitemap" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

Adding below

    path                   = "pl"

Supposed to generate output format i /pl/ folder and, on my site, the English will remain in /en/

However, when this line is added none of the files are generated, neither main language or additional.

I am sticking with 0.114.1 and not adding path if anybody can have a look on that.


With 0.115.0, if you override the root output format definition for a particular language, you need to specify all of the configuration keys, not just the one you want to change.

@bep Is this by design?


If you don’t have a matching template for the home page (e.g., home.imagessitemap.xml or index.imagessitemap.xml) then it should emit a warning. So, this is behaving as expected.

This does what you want:

page = [ 'html']
home = [ 'html', 'imagessitemap']

baseName  = 'imagessitemap'
mediaType = 'application/xml'
noUgly = true # default is false

weight = 1

weight = 2

baseName  = 'imagessitemap'
mediaType = 'application/xml'
noUgly = true # default is false
path  = 'pl'

Try it:

git clone --single-branch -b hugo-forum-topic-45103 https://github.com/jmooring/hugo-testing hugo-forum-topic-45103
cd hugo-forum-topic-45103
rm -rf public/ && hugo && tree public
1 Like

Thank you. Will have a look in detail on that.

I have home.imagessitemap.xml placed in /layouts/_default/ so unsure, but I think it shall not emit warning?

The layouts directory in the example site I provided:

├── _default/
│   ├── baseof.html
│   ├── home.html
│   ├── home.imagessitemap.xml
│   ├── list.html
│   └── single.html
├── partials/
└── shortcodes/

No warnings with v0.115.0.

1 Like

Thank you.

I change capitalized IMAGESSITEMAP and added as in your example and no warning.


Hi @jmooring could you do me a favour in relation to this issue.

On macOS everything working fine but when deployg to Netlify it returning error. I currently don’t have access to Ubuntu hence struggling to debug in other system.

Error: failed to create config from result: failed to decode config for language pl: unknown config key outputformats

ps. added you as a collaborator on my private repo.

Update the Hugo version in your netlify.toml file.

OMG. :see_no_evil:

Thank you.

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