Sha256: 157b27c49f6358005698393a37bfd6f856f7d69ed0917437253f28ee9da33448

Contents?: true

Size: 1.15 KB

Versions: 26

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

require 'dato/utils/meta_tags/title'
require 'dato/utils/meta_tags/description'
require 'dato/utils/meta_tags/image'
require 'dato/utils/meta_tags/robots'
require 'dato/utils/meta_tags/og_locale'
require 'dato/utils/meta_tags/og_type'
require 'dato/utils/meta_tags/og_site_name'
require 'dato/utils/meta_tags/article_modified_time'
require 'dato/utils/meta_tags/article_publisher'
require 'dato/utils/meta_tags/twitter_card'
require 'dato/utils/meta_tags/twitter_site'

module Dato
  module Utils
    class SeoTagsBuilder
      META_TAGS = [
        MetaTags::Title,
        MetaTags::Description,
        MetaTags::Image,
        MetaTags::Robots,
        MetaTags::OgLocale,
        MetaTags::OgType,
        MetaTags::OgSiteName,
        MetaTags::ArticleModifiedTime,
        MetaTags::ArticlePublisher,
        MetaTags::TwitterCard,
        MetaTags::TwitterSite
      ].freeze

      attr_reader :site, :item

      def initialize(item, site)
        @item = item
        @site = site
      end

      def meta_tags
        META_TAGS.map do |klass|
          klass.new(item, site).build
        end.flatten.compact
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
dato-0.8.0 lib/dato/utils/seo_tags_builder.rb
dato-0.7.18 lib/dato/utils/seo_tags_builder.rb
dato-0.7.17 lib/dato/utils/seo_tags_builder.rb
dato-0.7.16 lib/dato/utils/seo_tags_builder.rb
dato-0.7.15 lib/dato/utils/seo_tags_builder.rb
dato-0.7.14 lib/dato/utils/seo_tags_builder.rb
dato-0.7.13 lib/dato/utils/seo_tags_builder.rb
dato-0.7.10 lib/dato/utils/seo_tags_builder.rb
dato-0.7.9 lib/dato/utils/seo_tags_builder.rb
dato-0.7.8 lib/dato/utils/seo_tags_builder.rb
dato-0.7.7 lib/dato/utils/seo_tags_builder.rb
dato-0.7.6 lib/dato/utils/seo_tags_builder.rb
dato-0.7.5 lib/dato/utils/seo_tags_builder.rb
dato-0.7.4 lib/dato/utils/seo_tags_builder.rb
dato-0.7.3 lib/dato/utils/seo_tags_builder.rb
dato-0.7.2 lib/dato/utils/seo_tags_builder.rb
dato-0.7.1 lib/dato/utils/seo_tags_builder.rb
dato-0.7.0 lib/dato/utils/seo_tags_builder.rb
dato-0.6.18 lib/dato/utils/seo_tags_builder.rb
dato-0.6.17 lib/dato/utils/seo_tags_builder.rb