Hugo disableHugoGeneratorInject doesn't work

As listed on this page:

Version: 0.25.1 and also 0.22-DEV, same issue in both

It works.


Which must mean you have something other stuff going on, hard to say with so little info, but I will guess that you have put your disableHugoGeneratorInject after a TOML map and by that made it non-existant.

On an added note:

Why would you want to disable this? It is only injected on the home page if no generator is present, and should be very little to ask in return for this free piece of software.

1 Like

Good point. I’ll keep it!

I have a costom ATOM feed with this line

<generator url="" version="{{.Hugo.Version}}">Hugo</generator>

hugo generates

<generator>Hugo - Version 0.47.1</generator>

Seeting disableHugoGeneratorInject = true does not change it.
I would like to have a correct atom feed :slight_smile:
Can you use the attributes for XML?

Is your custom ATOM feed rendered (that is, used) by Hugo? Because Hugo will not overwrite a custom ATOM template, but if the template lookup order is incorrect, then Hugo falls back on its default template. And that default template likely contains that <generator> tag already.

Hugo renders my feed from my templates and overwrites the <generator …/>

I postet it

I don’t understand.

If I follow that link to the other topic I see you set the generator tag yourself:

<generator uri="" version="{{ .Hugo.Version }}">Hugo</generator>

If you don’t want the Hugo generator tag in the ATOM feed, you’ll have to remove that line.

I don’t see Hugo injecting the generator tag in the ATOM feeds I render for my own website based on a custom template. In other words, Hugo does not inject something in my custom template.


after a version rollback I had 2 different templates in different directories of the theme tree.
All works now fine.

I will upgrade my sample