【问题标题】:meta tag description does not show when viewing source查看源代码时不显示元标记描述
【发布时间】:2013-01-20 02:37:48
【问题描述】:

我用这段代码来显示描述标签和关键字

<meta name="description" content="search thousands of humor, funny images<%= yield :description %>" />
    <meta name="keywords" content="funny, fun, comics, jokes, images, pictures, photos, humor, safe for work<%= yield :keywords %>" />

但在开发环境中显示时不显示在生产环境中 我的生产环境是 rails 3.2.11 和 heroku 所以我错过了什么吗?我什至试过这段代码

<meta name="keywords" content="funny, fun, comics, jokes, images, pictures, photos, humor, safe for work" />

这是相同的结果,所以我想念什么?我真的开始吓坏了!!

【问题讨论】:

  • 您确定您的布局中的这个 HTML 已提交到您的 git 存储库并成功地部署到 heroku
  • 是的,是什么让我更加疯狂 funii.com/images/comic/the-secret-pocket 在这个 url 中它不起作用,在这个 url 中它有效 funii.com/images/comic/--583 它是相同的代码!!
  • 解决了我使用html5.validator.nu 并且有一些html错误,我解决了html错误然后上传到heroku并且元标记问题自动解决了

标签: ruby-on-rails html heroku meta-tags erb


【解决方案1】:

解决了我使用 html5.validator.nu 并且出现了一些 html 错误,我解决了 html 错误然后上传到 heroku 并且元标记问题自动解决了

【讨论】:

    猜你喜欢
    • 2021-11-21
    • 1970-01-01
    • 2018-12-17
    • 1970-01-01
    • 2016-06-19
    • 2019-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多