-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Is my disableHugoGeneratorInject config overridden by Congo? #179
Comments
From what I understand, the config parameter you are referring to controls the behaviour when the generator meta tag isn't present at build time. Congo includes the Hugo generator variable in the theme by default and so it will always be present at build time. Is there a particular reason why you don't want the generator tag in the page? |
I personally don't feel it is anyone's business what I am using to generate the site, and I don't volunteer unnecessary data, even to various crawlers. If you wanted to persuade people to use this item, couldn't you just handle it explicitly, via settings, rather than hardcode it into a layout partial and force people to use it? I mean having I mean I love this theme, but I've already had to use my own head partial† to override your own opinion on Google Analytics (as well as to have it load earlier than even Hugo's own GA template); to me, allowing people their own opinions, via inserting your own suggestions in config settings, seems more friendly than making people override partials to do basic things. † I'd prefer not to be using custom layouts when I go to upgrade Congo to pull in your latest updates, at least not for this kind of basic stuff. |
I understand where you're coming from but a few points on this:
I do want to understand more about your comments around analytics though... Can you please explain what you mean by "your own opinion on Google Analytics" because the theme is using Hugo's built-in GA template. There's no custom GA code in the theme at all and the analytics block is in its own partial for exactly the flexibility you are asking for - so you can override it without affecting anything else in the theme. I strive to make Congo as flexible as possible and a key design intent is allowing it to be overridden in such a way that upgrades are straightforward. I hate it when I get bogged down in custom layouts that prevent upgrades and I don't want users of my theme to have this experience either. If you can explain what exactly it is you are overriding that is requiring a custom |
Generator and robots.txtI'm not implying there is any sinister about attribution at all. I hate the BuiltWith site because it ignores my custom As an aside, if I follow the Congo docs and have I went back to search your documentation site again to see if I overlooked I've never attempted to hide Congo attribution from the footer, nor wanted to because thusfar it's been the nicest theme I've found. I would be tempted to ask you to split Google AnalyticsI didn't realize you include the Hugo internal GA template. I didn't dig through your templates deep enough to see because I skimmed this elsewhere in your writings (via your exampleSite when I test it locally), and based solely on that I assumed it would not be included. That external link sample in your I see now that you do include the GA template. It's still loading further down in the source than what I had always read was desirable, in order for GA to not miss recording any visits. Maybe I am mistaken, but I thought I'd always read that Google advises placing the GA immediately after the opening Being Able To Test Production Settings Locally (Without Deploying)I was also going to test using the normal
... because in my
... but in your layouts I see you instead have ...
I also minify the site using a Is there any particular reason you did it the way you do, which seems to prevent me testing locally? |
I think this is probably because the docs aren't as clear as they could be. When I say set the param to
This feature is intentionally undocumented.
I'm not entirely sure why they would suggest placing it so high up the page when modern best practices suggest deferring scripts to later in the load cycle. Deferring these as much as possible helps considerably with performance. Perhaps it's something to do with not missing out if people navigate away from the page too soon but I'm not sure counting them adds any benefit anyway. I'm not a GA user as I don't believe it promotes good privacy practices but if you have any documentation on this, I'm happy to review it.
I can't remember why I did it this way... It may have been to avoid having to rely on whether the environment is being set correctly. From doing some more reading on this it looks like |
I should have mentioned too - I suspect that by including |
I would also love the control of the generator through a switch. Specifically when I keep my site not updated for quite a while, I would prefer it say I see this just like the Even if removal to the level of just generator is not possible, i would prefer removing it all together rather than having it and causing a mishap later on I would preferably not use |
Is a switch the best solution to this though? You are saying you'd be happy to switch off the generator tag but still keep the "Hugo" in the site footer?
This is one you should raise with the Hugo team. The generator tag is created using a Hugo variable and so it's not possible to override it without the version. The only way around this would be hard-coding it and then you'd come up against the auto-inserting default behaviour of Hugo and likely end up with the version number anyway. What is the solution?I want to find a way to solve this that can keep everyone happy. I'd be interested in opinions on this... perhaps a cleaner solution is to move the generator logic into its own partial and that way it can be overridden it however the site owner sees fit. If you don't want it at all, simply override it with nothing, or customise it to include as much or as little as you like. |
Thank you for updating the
I have both of those set and yet I still see it generated in the source, in both the development environment locally, as well as after pushing to the host and no longer using As far as the issue brought up by @baalajimaestro, for people who just want a simple toggle switch, without heavily customizing partials, again I would mention my proposal of possibly breaking up ...
... into ...
... with the respective modifications to the I no longer see much point in going beyond that, to this idea, though ...
... since reading "Congo" on the footer would pretty much give away that it's a Hugo-based site. As you suggested, I agree that also moving the generator logic to its own partial would be a nice touch (regardless if a user opts to use the toggle switch paramter or do some sort of unique customization to the partial). |
I'm not seeing this behaviour. Are you setting I think the change I'm going to make is to simply remove the generator tag from the theme altogether. The default Hugo behaviour works in essentially the same way and then if you want to disable it, the Hugo config param will work in accordance with the standard Hugo docs. |
What happened?
I have
disableHugoGeneratorInject = true
present in myconfig/_default/config.toml
folder and yet the generator meta tag is still inserted both locally and in production.Theme version
v2.1.1
Hugo version
v0.96.0+extended linux/amd64
What browsers are you seeing the problem on?
Firefox
Relevant Hugo log output
No response
The text was updated successfully, but these errors were encountered: