Sha256: a7342da5727d4e091ef0c9cbaecfb7381b5fbf60b26a66970dc582674edf137a

Contents?: true

Size: 797 Bytes

Versions: 6

Compression:

Stored size: 797 Bytes

Contents

module ContentHelper
  def content_meta_tags(object)
    twitter_tags = {
      url: object.canonical_url,
      title: object.meta_title,
      description: object.meta_description,
      image: object.opengraph_image_url,
      card: "summary"
    }

    open_graph_tags = {
      title: object.meta_title,
      description: object.meta_description,
      url: object.canonical_url,
      type: object.meta_type,
      image: object.opengraph_image_url,
      updated_time: object.updated_at.to_i
    }

    set_meta_tags title: object.meta_title,
                  description: object.meta_description,
                  keywords: object.meta_keywords,
                  canonical: object.canonical_url,
                  og: open_graph_tags,
                  twitter: twitter_tags
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ants-0.3.14 app/helpers/content_helper.rb
ants-0.3.13 app/helpers/content_helper.rb
ants-0.3.12 app/helpers/content_helper.rb
ants-0.3.11 app/helpers/content_helper.rb
ants-0.3.10 app/helpers/content_helper.rb
ants-0.3.9 app/helpers/content_helper.rb