sfc-utils 1.4.46 → 1.4.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,6 +20,7 @@ const LayoutHelmet = ({ meta, url_add, noindex=false, schemaOverride={} }) => {
|
|
|
20
20
|
TITLE,
|
|
21
21
|
MARKET_KEY,
|
|
22
22
|
CANONICAL_URL,
|
|
23
|
+
ANALYTICS_CREDIT,
|
|
23
24
|
SECTION
|
|
24
25
|
},
|
|
25
26
|
} = meta
|
|
@@ -40,14 +41,28 @@ const LayoutHelmet = ({ meta, url_add, noindex=false, schemaOverride={} }) => {
|
|
|
40
41
|
let authorObj = []
|
|
41
42
|
let newAuthor = {}
|
|
42
43
|
try {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
if (!ANALYTICS_CREDIT){
|
|
45
|
+
// If we have authors (not analytics credit), use those
|
|
46
|
+
AUTHORS.forEach(author => {
|
|
47
|
+
newAuthor = {
|
|
48
|
+
'@type': 'Person',
|
|
49
|
+
name: author.AUTHOR_NAME,
|
|
50
|
+
url: author.AUTHOR_PAGE,
|
|
51
|
+
}
|
|
52
|
+
authorObj.push(newAuthor)
|
|
53
|
+
})
|
|
54
|
+
} else {
|
|
55
|
+
// If we have analytics credit, use that
|
|
56
|
+
const creditList = ANALYTICS_CREDIT.split(",")
|
|
57
|
+
creditList.forEach(credit => {
|
|
58
|
+
newAuthor = {
|
|
59
|
+
'@type': 'Person',
|
|
60
|
+
name: credit,
|
|
61
|
+
url: MAIN_DOMAIN // Not ideal to not have the actual author page, but we don't have it
|
|
62
|
+
}
|
|
63
|
+
authorObj.push(newAuthor)
|
|
64
|
+
})
|
|
65
|
+
}
|
|
51
66
|
} catch (err) {
|
|
52
67
|
// If it errored, just set to neutral default
|
|
53
68
|
authorObj = {
|