-
Notifications
You must be signed in to change notification settings - Fork 275
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
Supports custom robots tags #224
base: main
Are you sure you want to change the base?
Conversation
89c0bf9
to
8e9ab54
Compare
@kpumuk Hi, I've rebased the branch and fixed CI failures. |
robots = extract(:robots).presence | ||
if robots | ||
result['robots'].concat(robots.map { |k, v| "#{k}:#{v}" }) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder what would be the expected behavior for cases when a specific bot is configured, like
set_meta_tags(nofollow: 'googlebot', robots: 'nosnippet')
Or, for example, how to configure nosnippet
for one bot, but no the others...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting question that I didn't think about.
For that case, how about just set_meta_tags(googlebot: 'nosnippet')
?
To implement this, I would tweak extract_robots
and check for hash keys /[google|bing]bot/
, the only two that I found support nosnippet and other snippet-related configs.
8fd9506
to
e1d44ac
Compare
@kpumuk Hi Dmytro, I just updated this PR and tried to fix addressed issues. Could you please have a look again? Thank you! |
e1d44ac
to
72d79f5
Compare
As titled, this PR make meta-tags support things like: