class GovukPublishingComponents::Presenters::ArticleSchema

def body

multiple fields. In this case we'll skip the `articleBody` field
Not all formats have a `body` - some have their content split over
def body
  return {} unless page.body.present?
  {
    "articleBody" => page.body,
  }
end

def head_line

def head_line
  {
    "headLine" => page.title,
    "description" => page.description,
  }
end

def initialize(page)

def initialize(page)
  @page = page
end

def search_action

def search_action
  return {} unless page.document_type == "manual"
  manuals_facet_params = { manual: page.base_path }
  PotentialSearchActionSchema.new(manuals_facet_params, search_description).structured_data
end

def search_description

def search_description
  I18n.t(:scoped_search_description, scope: %i[components article_schema], title: page.title)
end

def structured_data

def structured_data
  # http://schema.org/Article
  data = CreativeWorkSchema.new(@page).structured_data
    .merge(head_line)
    .merge(body)
    .merge(search_action)
  data["@type"] = "Article"
  data
end