Class: Dato::Utils::MetaTags::OgType

Inherits:
Base
  • Object
show all
Defined in:
lib/dato/utils/meta_tags/og_type.rb

Instance Attribute Summary

Attributes inherited from Base

#item, #site

Instance Method Summary collapse

Methods inherited from Base

#card_tag, #content_tag, #initialize, #meta_tag, #og_tag, #seo_field_with_fallback, #tag

Constructor Details

This class inherits a constructor from Dato::Utils::MetaTags::Base

Instance Method Details

#buildObject



9
10
11
12
13
14
15
# File 'lib/dato/utils/meta_tags/og_type.rb', line 9

def build
  if !item || item.singleton?
    og_tag('og:type', 'website')
  else
    og_tag('og:type', 'article')
  end
end