Sha256: fdeadb519f90c885841993e704a727ebcca7fa1e3b62732ca417f35b0cf1eec5

Contents?: true

Size: 538 Bytes

Versions: 49

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true
require 'dato/utils/meta_tags/base'

module Dato
  module Utils
    module MetaTags
      class Description < Base
        def build
          return unless description.present?

          [
            meta_tag('description', description),
            og_tag('og:description', description),
            card_tag('twitter:description', description)
          ]
        end

        def description
          @description ||= seo_field_with_fallback(:description, nil)
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
dato-0.3.9 lib/dato/utils/meta_tags/description.rb
dato-0.3.8 lib/dato/utils/meta_tags/description.rb
dato-0.3.7 lib/dato/utils/meta_tags/description.rb
dato-0.3.6 lib/dato/utils/meta_tags/description.rb
dato-0.3.5 lib/dato/utils/meta_tags/description.rb
dato-0.3.3 lib/dato/utils/meta_tags/description.rb
dato-0.3.2 lib/dato/utils/meta_tags/description.rb
dato-0.3.1 lib/dato/utils/meta_tags/description.rb
dato-0.3.0 lib/dato/utils/meta_tags/description.rb