Closed Benjamin-K closed 2 years ago
What's the problem with having it as a node property? I think this is much easier to maintain than the settings. Plus: Having it in the settings requires us to handle multi-site setups more carefully, which will not be the case with a node property.
It only needs to be applied to the homepage right?
Then we could have it as a separate mixin and devs can set it as super type to their homepage NodeType.
And in Fusion we can add the condition that its only rendered if node == site
.
Wdyt?
What's the problem with having it as a node property?
It can easily lead to confusion if added on more nodes than just the site node. What will Google think? What will users expect?
It only needs to be applied to the homepage right? Then we could have it as a separate mixin and devs can set it as super type to their homepage NodeType.
That would be a nice addition!
I'd still love to be able to set it via settings. That way it can be populated from an env variable in different server environments.
And in Fusion we can add the condition that its only rendered if
node == site
.
Awesome.
Good catches. So i will create a new mixin for that and update the docs. The fusion does not have to be changed (except for the node == site
condition).
What would you expect when setting the property via settings? We should handle multi-site setups when having the property via settings, too.
How about:
Neos:
Seo:
googleSiteVerification:
'siteNodeIdentifier': 'googleSiteVerificationProperty'
Another solution for the node property could be:
'Neos.Seo:SeoMetaTagsMixin':
properties:
metaGoogleSiteVerification:
ui:
inspector:
hidden: 'ClientEval: node.depth > 2'
This will show the property only on the site node as all other documentNodes have a higher depth.
For Google it should be enough to have the meta tag on the home page, so this change will help here, too.
What do you think?
I personally don't want properties on nodes that I don't need. So I definitely prefer the mixin to control the feature individually.
What would you expect when setting the property via settings?
It should be used as default value, I could then disable/hide the property and have it "settings-only". Or leave the property in place and it would override the setting.
We should handle multi-site setups when having the property via settings, too.
Definitely, possibly for other settings as well. I like the way it's done here:
Ok, i updated my commit to have settings as fallback and a mixin that could be added to the nodeType of the site node. Also i updated the documentation. I did not yet implement the multi site setup via settings, but that should be ok for now i think.
Definitely, possibly for other settings as well. I like the way it's done here:
I like that way, too. But that should be a separate PR i think. And the change should not be breaking if possible.
When using the google search console to have a better overview about search results of your site, till now you had to add the required meta tag (or verification file or header) yourself for each project.
This pull request adds a property to the seo tags so you can easily add your google-site-verification meta tag. Output will be