govuk_publishing_components 21.38.0 → 21.38.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18137270f2852ffc825106a02021d82aec4bf5a484a3151cd9731044a1d74c2f
4
- data.tar.gz: 3e69bbe1712825eebeaebd0a4856ba441f6ea3ee8f5378b8edaa3d2571e12432
3
+ metadata.gz: 1b298bc469e28e78ffe091abbac1c505e558f9a7a5b427cf1eef3d68bb14238a
4
+ data.tar.gz: c2f97c039b046e57f4d2f05b330e2b23551de9e62d85ca11951f13a2f2c7f8e9
5
5
  SHA512:
6
- metadata.gz: 3202d48ccec1cc270fed74433eeddf6b1137a3370f81ae61c39c0cd293ae29abca31006d89a298c304d433a3b1e472a0089a08a1ae511d3491b9ce74b21a7969
7
- data.tar.gz: d1e5a814a0d052c755b00192cb6d2d987a87f988852f66aa9b0a0fc5f1ce898ea9055089e60b3800d021b92a7a0c9e6ddea7bfb64daf5e6c83b4741065e938ee
6
+ metadata.gz: 9e6f46b0edd228d0e829447a539da259a8b28ad4994c64cfc76e96cbdb8112306fea27c36083d5bd01b44928507c095fdf353e25062efa16ab13204faeb4db76
7
+ data.tar.gz: c197eb4e5b6d5fb94be54a83069201ad788aa19c9dea8c822a881bc652df48dd7e59893ed3390b85cb4760d878e5826a17404603fdd303af4c8355de5ed70403
@@ -10,6 +10,7 @@ module GovukPublishingComponents
10
10
  def structured_data
11
11
  # http://schema.org/Article
12
12
  data = CreativeWorkSchema.new(@page).structured_data
13
+ .merge(head_line)
13
14
  .merge(body)
14
15
  .merge(search_action)
15
16
  data["@type"] = "Article"
@@ -18,6 +19,13 @@ module GovukPublishingComponents
18
19
 
19
20
  private
20
21
 
22
+ def head_line
23
+ {
24
+ "headLine" => page.title,
25
+ "description" => page.description,
26
+ }
27
+ end
28
+
21
29
  # Not all formats have a `body` - some have their content split over
22
30
  # multiple fields. In this case we'll skip the `articleBody` field
23
31
  def body
@@ -17,10 +17,10 @@ module GovukPublishingComponents
17
17
  "@type" => "WebPage",
18
18
  "@id" => page.canonical_url,
19
19
  },
20
- "headline" => page.title,
20
+ "name" => page.title,
21
21
  "datePublished" => page.content_item["first_published_at"],
22
22
  "dateModified" => page.content_item["public_updated_at"],
23
- "description" => page.description,
23
+ "text" => page.description,
24
24
  "publisher" => {
25
25
  "@type" => "Organization",
26
26
  "name" => "GOV.UK",
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.38.0".freeze
2
+ VERSION = "21.38.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.38.0
4
+ version: 21.38.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-02 00:00:00.000000000 Z
11
+ date: 2020-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters