Comments (2)
Hi,
The second call will override the value specified in the first one. Instead, you should pass the list of robots for each of the robots meta tags values:
set_meta_tags(nofollow: %w[robots googlebot])
# <meta name="robots" content="nofollow">
# <meta name="googlebot" content="nofollow">
set_meta_tags(nofollow: %w[robots googlebot], noindex: 'googlebot')
# <meta name="googlebot" content="noindex, nofollow">
# <meta name="robots" content="nofollow">
set_meta_tags(nofollow: %w[robots googlebot], noindex: 'googlebot', noarchive: 'robots', index: 'google-news')
# <meta name="googlebot" content="noindex, nofollow">
# <meta name="google-news" content="index">
# <meta name="robots" content="nofollow, noarchive">
Supported tags:
An alternative would be to use custom meta tags instead of robots math:
set_meta_tags(googlebot: "noindex, nofollow, nojokes")
# <meta name="googlebot" content="noindex, nofollow, nojokes">
from meta-tags.
Nice to see this option. Thanks!
from meta-tags.
Related Issues (20)
- Got error `ret: 2, hash modified during iteration` After upgrade ruby 2.7.0 HOT 10
- Support for the`referrer` meta tag
- Canβt get started HOT 7
- display_meta_tags - ActionView::Template::Error: can't modify frozen String HOT 1
- ActionView::Template::Error: incompatible character encodings: UTF-8 and ASCII-8BIT
- Better cropping of titles defined as an array?
- Support Rails 6.1 HOT 2
- Warning about instance variable that is not initialized
- Any chance of a new release? and is this gem maintained? HOT 2
- set meta tage for controller/action from config file? HOT 1
- Set HTTP headers Link, X-Robots-Tag HOT 1
- Rails 7.0 support HOT 3
- Fallback to site_name if title unspecified in `og`? HOT 5
- `[error] Cannot find type '_ActionViewBase'` from Steep
- Request - Add Description Explaining Difference between display_meta_tags and set_meta_tags
- Page title with html attributes
- Unexpected truncation in languages that do not use word divider HOT 2
- Generated initializer has a duplicate entry HOT 3
- What is the better way to handle locales?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meta-tags.