[英]Ruby on Rails: meta_tags gem
I use the meta_tags
gems to handle all the SEO meta tags. 我使用
meta_tags
gems处理所有SEO元标记。
However, when I use in my application.html.haml
view, it's showing on the page itself so that the user sees it as well. 但是,当我在
application.html.haml
视图中使用时,它会显示在页面本身上,以便用户也可以看到它。
= set_meta_tags title: "app title, keywords...."
Any idea why that happens? 知道为什么会这样吗?
This is a behaviour of HAML rather than the meta_tags gem. 这是HAML的行为,而不是meta_tags gem。
-# In a HAML file, ...
= '= will evaluate the ruby code and put the result on the page'
- '- will evaluate the ruby code but not put the result on the page'
Reference: http://haml.info/docs/yardoc/file.REFERENCE.html#ruby_evaluation 参考: http : //haml.info/docs/yardoc/file.REFERENCE.html#ruby_evaluation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.