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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b298bc469e28e78ffe091abbac1c505e558f9a7a5b427cf1eef3d68bb14238a
|
4
|
+
data.tar.gz: c2f97c039b046e57f4d2f05b330e2b23551de9e62d85ca11951f13a2f2c7f8e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
"
|
20
|
+
"name" => page.title,
|
21
21
|
"datePublished" => page.content_item["first_published_at"],
|
22
22
|
"dateModified" => page.content_item["public_updated_at"],
|
23
|
-
"
|
23
|
+
"text" => page.description,
|
24
24
|
"publisher" => {
|
25
25
|
"@type" => "Organization",
|
26
26
|
"name" => "GOV.UK",
|
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.
|
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-
|
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
|