Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disableHugoGeneratorInject is ignored #5048

Closed
bgdnlp opened this issue Aug 8, 2018 · 5 comments
Closed

disableHugoGeneratorInject is ignored #5048

bgdnlp opened this issue Aug 8, 2018 · 5 comments

Comments

@bgdnlp
Copy link

bgdnlp commented Aug 8, 2018

Using "Hugo Static Site Generator v0.46 darwin/amd64 BuildDate: 2018-08-01T09:00:55Z", toml config format, binary downloaded from GitHub. The non-extended version.

Setting disableHugoGeneratorInject = true has no effect, the generator meta tag is still inserted.

Moving to v0.46 from v0.37, which caused all pages to be marked as changed. With v0.37 the tag is not inserted.

@bep
Copy link
Member

bep commented Aug 8, 2018

Moving to v0.46 from v0.37, which caused all pages to be marked as changed.

We only insert this tag if 1) is home page 2) there is no generator tag there before 3) disableHugoGeneratorInject is not set

If you are saying that all the pages are marked as changed, there must be a different explanation.

Also, this code has been rewritten for 0.47.

@bgdnlp
Copy link
Author

bgdnlp commented Aug 8, 2018

I'm not sure where to look. The tag inserted is:

<meta name="generator" content="Hugo 0.46" />

The old tag was:

<meta name="generator" content="Hugo 0.37.1" />

and it was also present on every page I checked.

My theme was doing cache busting by adding ?unix-time to every js, which means most (all?) pages were being regenerated every time, I disabled that now. Maybe that has something to do with it?

Anyway, it doesn't really bother me, just noticed and thought I'd let you know. If you say the code was rewritten and the issue is probably something else, please feel free to close the incident. I can retest with 0.47 when the binary is available. If I can help with more information, let me know.

@bep
Copy link
Member

bep commented Aug 8, 2018

and it was also present on every page I checked.

I will eventually check, but since the logic is to add this to home page only (I just checked the code), I suspect that you get that generator tag from the theme itself.

@bgdnlp
Copy link
Author

bgdnlp commented Aug 8, 2018

And you are right, it's the theme that adds it. Apologies for wasting your time, I'll close the incident. Thank you.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants