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

Docsy does not respect configuration parameter "disableHugoGeneratorInject" #1707

Closed
nettozahler opened this issue Nov 8, 2023 · 3 comments · Fixed by #1734
Closed

Docsy does not respect configuration parameter "disableHugoGeneratorInject" #1707

nettozahler opened this issue Nov 8, 2023 · 3 comments · Fixed by #1734
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nettozahler
Copy link

According to https://gohugo.io/getting-started/configuration/ the behavior should be like this:

Hugo will, by default, inject a generator meta tag in the HTML head on the home page only. You can turn it off by setting disableHugoGeneratorInject = true

Docsy seems to inject the generator meta tag in each HTML head unconditionally.

@fekete-robert
Copy link
Collaborator

You're right, I could reproduce the issue.

Unfortunately I can't fix it nicely, because if I set the disableHugoGeneratorInject at the top level of the configfile (as it should be), I can't reference the parameter from the template. If you add it under the params section, then you can disable it like this in the head.html partial:

{{ if not .Site.Params.disableHugoGeneratorInject }} {{ hugo.Generator }} {{ end }}

@chalin
Copy link
Collaborator

chalin commented Nov 13, 2023

Oh, I hadn't realized that Docsy was overriding Hugo's default behavior. I don't think that should be the case.

@nettozahler
Copy link
Author

Exactly. Docsy is overriding the behavior described in https://gohugo.io/getting-started/configuration/. Thanks for the nice & quick PR. Regards...

@chalin chalin added this to the 23Q4 milestone Nov 13, 2023
@chalin chalin self-assigned this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants