gscan 4.22.0 → 4.24.0
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.
- package/README.md +8 -7
- package/app/tpl/index.hbs +1 -0
- package/bin/cli.js +5 -0
- package/lib/ast-linter/rules/index.js +1 -0
- package/lib/ast-linter/rules/internal/scope.js +14 -0
- package/lib/ast-linter/rules/lint-no-author-helper-in-post-page-context.js +25 -0
- package/lib/checker.js +1 -1
- package/lib/checks/010-package-json.js +70 -11
- package/lib/checks/090-template-syntax.js +1 -1
- package/lib/specs/canary.js +407 -242
- package/lib/specs/index.js +1 -1
- package/lib/specs/v4.js +306 -0
- package/lib/utils/index.js +1 -1
- package/lib/utils/versions.json +6 -2
- package/package.json +9 -9
package/lib/specs/canary.js
CHANGED
|
@@ -1,291 +1,456 @@
|
|
|
1
1
|
const _ = require('lodash');
|
|
2
2
|
const oneLineTrim = require('common-tags/lib/oneLineTrim');
|
|
3
|
-
const previousSpec = require('./
|
|
3
|
+
const previousSpec = require('./v4');
|
|
4
4
|
const ghostVersions = require('../utils').versions;
|
|
5
5
|
const docsBaseUrl = `https://ghost.org/docs/api/handlebars-themes/`;
|
|
6
|
-
const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.
|
|
6
|
+
const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.canary.docs}/docs/`;
|
|
7
7
|
const prevDocsBaseUrlRegEx = new RegExp(prevDocsBaseUrl, 'g');
|
|
8
8
|
|
|
9
9
|
const previousKnownHelpers = previousSpec.knownHelpers;
|
|
10
10
|
const previousTemplates = previousSpec.templates;
|
|
11
11
|
const previousRules = previousSpec.rules;
|
|
12
12
|
|
|
13
|
-
function cssCardRule(cardName, className) {
|
|
14
|
-
return {
|
|
15
|
-
level: 'warning',
|
|
16
|
-
rule: `The <code>.${className}</code> CSS class is required to appear styled in your theme`,
|
|
17
|
-
details: oneLineTrim`The <code>.${className}</code> CSS class is required otherwise the ${cardName} card will appear unstyled.
|
|
18
|
-
Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}editor/" target=_blank>here</a>.`,
|
|
19
|
-
regex: new RegExp(`\\.${className}`, 'g'),
|
|
20
|
-
className: `.${className}`,
|
|
21
|
-
css: true,
|
|
22
|
-
cardAsset: cardName
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
13
|
// assign new or overwrite existing knownHelpers, templates, or rules here:
|
|
27
|
-
let knownHelpers = [
|
|
14
|
+
let knownHelpers = [];
|
|
28
15
|
let templates = [];
|
|
29
16
|
let rules = {
|
|
30
17
|
// New rules
|
|
31
|
-
'GS010-PJ-GHOST-API': {
|
|
32
|
-
level: '
|
|
33
|
-
rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is
|
|
34
|
-
details: oneLineTrim`
|
|
35
|
-
|
|
18
|
+
'GS010-PJ-GHOST-API-PRESENT': {
|
|
19
|
+
level: 'error',
|
|
20
|
+
rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is not supported.',
|
|
21
|
+
details: oneLineTrim`Remove <code>"ghost-api"</code> from your <code>package.json</code>.<br>
|
|
22
|
+
The <code>ghost-api</code> is not supported starting Ghost v5 and should not be used.
|
|
36
23
|
Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
|
|
37
24
|
},
|
|
38
|
-
'
|
|
25
|
+
'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
|
|
39
26
|
level: 'error',
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
fatal: true,
|
|
28
|
+
rule: 'The <code>{{author}}</code> helper should be replaces with <code>{{authors}}</code>',
|
|
29
|
+
details: oneLineTrim`The <code>{{author}}</code> helper has been deprecated since Ghost 1.22.0 in favor of <code>{{<authors>}}</code><br>
|
|
30
|
+
The <code>{{author}}</code> helper was removed in Ghost v5 and should not be used.
|
|
31
|
+
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
32
|
+
helper: '{{author}}'
|
|
44
33
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
|
|
35
|
+
// Updated v1 & v2 rules
|
|
36
|
+
'GS001-DEPR-BLOG': {
|
|
37
|
+
level: 'error',
|
|
38
|
+
fatal: true,
|
|
39
|
+
rule: 'The <code>{{@blog}}</code> helper should be replaced with <code>{{@site}}</code>',
|
|
40
|
+
details: oneLineTrim`With the introduction of the Content API <code>{{@blog}}</code> became deprecated in favour of <code>{{@site}}</code>.<br>
|
|
41
|
+
The <code>{{@blog}}</code> helper was removed in Ghost v5 and should not be used.
|
|
42
|
+
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
43
|
+
regex: /{{\s*?@blog\.[a-zA-Z0-9_]+\s*?}}/g,
|
|
44
|
+
helper: '{{@blog}}'
|
|
51
45
|
},
|
|
52
|
-
'
|
|
46
|
+
'GS001-DEPR-AUTH-ID': {
|
|
53
47
|
level: 'error',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
fatal: true,
|
|
49
|
+
rule: 'Replace the <code>{{author.id}}</code> helper with <code>{{primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
50
|
+
details: oneLineTrim`The usage of <code>{{author.id}}</code> is deprecated and should be replaced with either <code>{{primary_author.id}}</code>
|
|
51
|
+
or <code>{{authors.[#].id}}</code>.<br>
|
|
52
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
53
|
+
regex: /{{\s*?author\.id\s*?}}/g,
|
|
54
|
+
helper: '{{author.id}}'
|
|
57
55
|
},
|
|
58
|
-
'
|
|
56
|
+
'GS001-DEPR-AUTH-SLUG': {
|
|
59
57
|
level: 'error',
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
fatal: true,
|
|
59
|
+
rule: 'Replace the <code>{{author.slug}}</code> helper with <code>{{primary_author.slug}}</code> or <code>{{authors.[#].slug}}</code>',
|
|
60
|
+
details: oneLineTrim`The usage of <code>{{author.slug}}</code> is deprecated and should be replaced with either <code>{{primary_author.slug}}</code>
|
|
61
|
+
or <code>{{authors.[#].slug}}</code>.<br>
|
|
62
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
63
|
+
regex: /{{\s*?author\.slug\s*?}}/g,
|
|
64
|
+
helper: '{{author.slug}}'
|
|
63
65
|
},
|
|
64
|
-
'
|
|
66
|
+
'GS001-DEPR-AUTH-MAIL': {
|
|
65
67
|
level: 'error',
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
fatal: true,
|
|
69
|
+
rule: 'Replace the <code>{{author.email}}</code> helper with <code>{{primary_author.email}}</code> or <code>{{authors.[#].email}}</code>',
|
|
70
|
+
details: oneLineTrim`The usage of <code>{{author.email}}</code> is deprecated and should be replaced with either <code>{{primary_author.email}}</code>
|
|
71
|
+
or <code>{{authors.[#].email}}</code>.<br>
|
|
72
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
73
|
+
regex: /{{\s*?author\.email\s*?}}/g,
|
|
74
|
+
helper: '{{author.email}}'
|
|
69
75
|
},
|
|
70
|
-
'
|
|
71
|
-
level: '
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
'GS001-DEPR-AUTH-MT': {
|
|
77
|
+
level: 'error',
|
|
78
|
+
fatal: true,
|
|
79
|
+
rule: 'Replace the <code>{{author.meta_title}}</code> helper with <code>{{primary_author.meta_title}}</code> or <code>{{authors.[#].meta_title}}</code>',
|
|
80
|
+
details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_title}}</code>
|
|
81
|
+
or <code>{{authors.[#].meta_title}}</code>.<br>
|
|
82
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
83
|
+
regex: /{{\s*?author\.meta_title\s*?}}/g,
|
|
84
|
+
helper: '{{author.meta_title}}'
|
|
75
85
|
},
|
|
76
|
-
'
|
|
86
|
+
'GS001-DEPR-AUTH-MD': {
|
|
77
87
|
level: 'error',
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
fatal: true,
|
|
89
|
+
rule: 'Replace the <code>{{author.meta_description}}</code> helper with <code>{{primary_author.meta_description}}</code> or <code>{{authors.[#].meta_description}}</code>',
|
|
90
|
+
details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_description}}</code>
|
|
91
|
+
or <code>{{authors.[#].meta_description}}</code>.<br>
|
|
92
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
93
|
+
regex: /{{\s*?author\.meta_description\s*?}}/g,
|
|
94
|
+
helper: '{{author.meta_description}}'
|
|
81
95
|
},
|
|
82
|
-
'
|
|
96
|
+
'GS001-DEPR-AUTH-NAME': {
|
|
83
97
|
level: 'error',
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
98
|
+
fatal: true,
|
|
99
|
+
rule: 'Replace the <code>{{author.name}}</code> helper with <code>{{primary_author.name}}</code> or <code>{{authors.[#].name}}</code>',
|
|
100
|
+
details: oneLineTrim`The usage of <code>{{author.name}}</code> is deprecated and should be replaced with either <code>{{primary_author.name}}</code>
|
|
101
|
+
or <code>{{authors.[#].name}}</code>.<br>
|
|
102
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
103
|
+
regex: /{{\s*?author\.name\s*?}}/g,
|
|
104
|
+
helper: '{{author.name}}'
|
|
87
105
|
},
|
|
88
|
-
'
|
|
106
|
+
'GS001-DEPR-AUTH-BIO': {
|
|
89
107
|
level: 'error',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
fatal: true,
|
|
109
|
+
rule: 'Replace the <code>{{author.bio}}</code> helper with <code>{{primary_author.bio}}</code> or <code>{{authors.[#].bio}}</code>',
|
|
110
|
+
details: oneLineTrim`The usage of <code>{{author.bio}}</code> is deprecated and should be replaced with either <code>{{primary_author.bio}}</code>
|
|
111
|
+
or <code>{{authors.[#].bio}}</code>.<br>
|
|
112
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
113
|
+
regex: /{{\s*?author\.bio\s*?}}/g,
|
|
114
|
+
helper: '{{author.bio}}'
|
|
93
115
|
},
|
|
94
|
-
'
|
|
116
|
+
'GS001-DEPR-AUTH-LOC': {
|
|
95
117
|
level: 'error',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
fatal: true,
|
|
119
|
+
rule: 'Replace the <code>{{author.location}}</code> helper with <code>{{primary_author.location}}</code> or <code>{{authors.[#].location}}</code>',
|
|
120
|
+
details: oneLineTrim`The usage of <code>{{author.location}}</code> is deprecated and should be replaced with either <code>{{primary_author.location}}</code>
|
|
121
|
+
or <code>{{authors.[#].location}}</code>.<br>
|
|
122
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
123
|
+
regex: /{{\s*?author\.location\s*?}}/g,
|
|
124
|
+
helper: '{{author.location}}'
|
|
99
125
|
},
|
|
100
|
-
'
|
|
126
|
+
'GS001-DEPR-AUTH-WEB': {
|
|
101
127
|
level: 'error',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
128
|
+
fatal: true,
|
|
129
|
+
rule: 'Replace the <code>{{author.website}}</code> helper with <code>{{primary_author.website}}</code> or <code>{{authors.[#].website}}</code>',
|
|
130
|
+
details: oneLineTrim`The usage of <code>{{author.website}}</code> is deprecated and should be replaced with either <code>{{primary_author.website}}</code>
|
|
131
|
+
or <code>{{authors.[#].website}}</code>.<br>
|
|
132
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
133
|
+
regex: /{{\s*?author\.website\s*?}}/g,
|
|
134
|
+
helper: '{{author.website}}'
|
|
105
135
|
},
|
|
106
|
-
'GS001-DEPR-
|
|
107
|
-
level: '
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
The <code>{{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
'GS080-FEACH-POSTS': {
|
|
116
|
-
level: 'warning',
|
|
117
|
-
rule: 'The default visibility for posts in <code>{{#foreach}}</code> block helper has changed in v4.',
|
|
118
|
-
details: oneLineTrim`The default visibility for posts in <code>{{#foreach}}</code> block helper has changed from <code>public</code> to <code>all</code> in Ghost v4.
|
|
119
|
-
Find more information about the <code>{{foreach}}</code> helper <a href="${docsBaseUrl}helpers/foreach/" target=_blank>here</a>.`,
|
|
120
|
-
regex: /{{\s*?#foreach\s*?\w*?\s*?}}/g,
|
|
121
|
-
helper: '{{#foreach}}',
|
|
122
|
-
validInAPI: ['v3']
|
|
123
|
-
},
|
|
124
|
-
'GS080-CARD-LAST4': {
|
|
125
|
-
level: 'warning',
|
|
126
|
-
rule: 'The <code>default_payment_card_last4</code> field now coalesces to <code>****</code> in Ghost 4.x instead of null.',
|
|
127
|
-
details: oneLineTrim`The <code>default_payment_card_last4</code> field no longer outputs a falsy(null) value in case of missing card details starting from Ghost 4.x and instead coalesces to <code>****</code>
|
|
128
|
-
Find more information about the <code>default_payment_card_last4</code> attribute <a href="${docsBaseUrl}members/#subscription-attributes" target=_blank>here</a>.`,
|
|
129
|
-
regex: /default_payment_card_last4/g,
|
|
130
|
-
helper: '{{default_payment_card_last4}}',
|
|
131
|
-
validInAPI: ['v3']
|
|
132
|
-
},
|
|
133
|
-
'GS080-FEACH-PV': {
|
|
134
|
-
level: 'recommendation',
|
|
135
|
-
rule: 'The use of <code>visibility="all"</code> is no longer required for posts in <code>{{#foreach}}</code> helper.',
|
|
136
|
-
details: oneLineTrim`The default visibility in <code>{{#foreach}}</code> helper for posts has changed in v4 from "public" to "all" and is no longer required when looping over posts.
|
|
137
|
-
Check out the documentation for <code>{{#foreach}}</code> <a href="${docsBaseUrl}helpers/foreach/" target=_blank>here</a>.`,
|
|
138
|
-
regex: /{{\s*?#foreach\b[\w\s='"]*?visibility=("|')all("|')[\w\s='"]*?}}/g,
|
|
139
|
-
helper: '{{#foreach}}',
|
|
140
|
-
validInAPI: ['v3']
|
|
141
|
-
},
|
|
142
|
-
'GS001-DEPR-CURR-SYM': {
|
|
143
|
-
level: 'warning',
|
|
144
|
-
rule: 'Replace <code>{{[#].currency_symbol}}</code> with <code>{{price currency=currency}}</code>.',
|
|
145
|
-
details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute was removed in favour of passing the currency to updated <code>{{price}}</code> helper.
|
|
146
|
-
Find more information about the updated <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
|
|
147
|
-
helper: '{{[#].currency_symbol}}',
|
|
148
|
-
regex: /currency_symbol/g
|
|
149
|
-
},
|
|
150
|
-
'GS001-DEPR-SITE-LANG': {
|
|
151
|
-
level: 'warning',
|
|
152
|
-
rule: 'The <code>{{@site.lang}}</code> helper should be replaced with <code>{{@site.locale}}</code>',
|
|
153
|
-
details: oneLineTrim`Replace <code>{{@site.lang}}</code> helper with <code>{{@site.locale}}</code>.<br>
|
|
154
|
-
The <code>{{@site.lang}}</code> helper will be removed in next version of Ghost and should not be used.
|
|
155
|
-
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
156
|
-
regex: /@site\.lang/g,
|
|
157
|
-
helper: '{{@site.lang}}'
|
|
136
|
+
'GS001-DEPR-AUTH-TW': {
|
|
137
|
+
level: 'error',
|
|
138
|
+
fatal: true,
|
|
139
|
+
rule: 'Replace the <code>{{author.twitter}}</code> helper with <code>{{primary_author.twitter}}</code> or <code>{{authors.[#].twitter}}</code>',
|
|
140
|
+
details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is deprecated and should be replaced with either <code>{{primary_author.twitter}}</code>
|
|
141
|
+
or <code>{{authors.[#].twitter}}</code>.<br>
|
|
142
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
143
|
+
regex: /{{\s*?author\.twitter\s*?}}/g,
|
|
144
|
+
helper: '{{author.twitter}}'
|
|
158
145
|
},
|
|
159
|
-
'
|
|
146
|
+
'GS001-DEPR-AUTH-FB': {
|
|
160
147
|
level: 'error',
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
details: oneLineTrim`
|
|
148
|
+
fatal: true,
|
|
149
|
+
rule: 'Replace the <code>{{author.facebook}}</code> helper with <code>{{primary_author.facebook}}</code> or <code>{{authors.[#].facebook}}</code>',
|
|
150
|
+
details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is deprecated and should be replaced with either <code>{{primary_author.facebook}}</code>
|
|
151
|
+
or <code>{{authors.[#].facebook}}</code>.<br>
|
|
152
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
153
|
+
regex: /{{\s*?author\.facebook\s*?}}/g,
|
|
154
|
+
helper: '{{author.facebook}}'
|
|
164
155
|
},
|
|
165
|
-
'
|
|
166
|
-
level: '
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
details: oneLineTrim`The {{
|
|
156
|
+
'GS001-DEPR-AUTH-PIMG': {
|
|
157
|
+
level: 'error',
|
|
158
|
+
fatal: true,
|
|
159
|
+
rule: 'Replace the <code>{{author.profile_image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
160
|
+
details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.profile_image}}</code>
|
|
161
|
+
or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
162
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
163
|
+
regex: /{{\s*?author\.profile_image\s*?}}/g,
|
|
164
|
+
helper: '{{author.profile_image}}'
|
|
170
165
|
},
|
|
171
|
-
'
|
|
166
|
+
'GS001-DEPR-AUTH-CIMG': {
|
|
172
167
|
level: 'error',
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
details: oneLineTrim`The
|
|
168
|
+
fatal: true,
|
|
169
|
+
rule: 'Replace the <code>{{author.cover_image}}</code> helper with <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>',
|
|
170
|
+
details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.cover_image}}</code>
|
|
171
|
+
or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
172
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
173
|
+
regex: /{{\s*?author\.cover_image\s*?}}/g,
|
|
174
|
+
helper: '{{author.cover_image}}'
|
|
176
175
|
},
|
|
177
|
-
'
|
|
176
|
+
'GS001-DEPR-AUTH-URL': {
|
|
178
177
|
level: 'error',
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
details: oneLineTrim`
|
|
178
|
+
fatal: true,
|
|
179
|
+
rule: 'Replace the <code>{{author.url}}</code> helper with <code>{{primary_author.url}}</code> or <code>{{authors.[#].url}}</code>',
|
|
180
|
+
details: oneLineTrim`The usage of <code>{{author.url}}</code> is deprecated and should be replaced with either <code>{{primary_author.url}}</code>
|
|
181
|
+
or <code>{{authors.[#].url}}</code>.<br>
|
|
182
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
183
|
+
regex: /{{\s*?author\.url\s*?}}/g,
|
|
184
|
+
helper: '{{author.url}}'
|
|
182
185
|
},
|
|
183
|
-
'
|
|
186
|
+
'GS001-DEPR-PAUTH': {
|
|
184
187
|
level: 'error',
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
fatal: true,
|
|
189
|
+
rule: 'Replace the <code>{{post.author}}</code> helper with <code>{{post.primary_author}}</code> or <code>{{authors.[#]}}</code>',
|
|
190
|
+
details: oneLineTrim`The usage of <code>{{post.author}}</code> is deprecated and should be replaced with either <code>{{post.primary_author}}</code>
|
|
191
|
+
or <code>{{post.authors.[#]}}</code>.<br>
|
|
192
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
193
|
+
regex: /{{\s*?post\.author\s*?}}/g,
|
|
194
|
+
helper: '{{post.author}}'
|
|
187
195
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
'
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
'
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
'
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
'
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
'
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
'
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
'
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
'
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
'
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
'
|
|
196
|
+
'GS001-DEPR-PAUTH-ID': {
|
|
197
|
+
level: 'error',
|
|
198
|
+
fatal: true,
|
|
199
|
+
rule: 'Replace the <code>{{post.author.id}}</code> helper with <code>{{post.primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
200
|
+
details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.id}}</code>
|
|
201
|
+
or <code>{{post.authors.[#].id}}</code>.<br>
|
|
202
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
203
|
+
regex: /{{\s*?post\.author\.id\s*?}}/g,
|
|
204
|
+
helper: '{{post.author.id}}'
|
|
205
|
+
},
|
|
206
|
+
'GS001-DEPR-PAUTH-SLUG': {
|
|
207
|
+
level: 'error',
|
|
208
|
+
fatal: true,
|
|
209
|
+
rule: 'Replace the <code>{{post.author.slug}}</code> helper with <code>{{post.primary_author.slug}}</code> or <code>{{post.authors.[#].slug}}</code>',
|
|
210
|
+
details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.slug}}</code>
|
|
211
|
+
or <code>{{post.authors.[#].slug}}</code>.<br>
|
|
212
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
213
|
+
regex: /{{\s*?post\.author\.slug\s*?}}/g,
|
|
214
|
+
helper: '{{post.author.slug}}'
|
|
215
|
+
},
|
|
216
|
+
'GS001-DEPR-PAUTH-MAIL': {
|
|
217
|
+
level: 'error',
|
|
218
|
+
fatal: true,
|
|
219
|
+
rule: 'Replace the <code>{{post.author.email}}</code> helper with <code>{{post.primary_author.email}}</code> or <code>{{post.authors.[#].email}}</code>',
|
|
220
|
+
details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.email}}</code>
|
|
221
|
+
or <code>{{post.authors.[#].email}}</code>.<br>
|
|
222
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
223
|
+
regex: /{{\s*?post\.author\.email\s*?}}/g,
|
|
224
|
+
helper: '{{post.author.email}}'
|
|
225
|
+
},
|
|
226
|
+
'GS001-DEPR-PAUTH-MT': {
|
|
227
|
+
level: 'error',
|
|
228
|
+
fatal: true,
|
|
229
|
+
rule: 'Replace the <code>{{post.author.meta_title}}</code> helper with <code>{{post.primary_author.meta_title}}</code> or <code>{{post.authors.[#].meta_title}}</code>',
|
|
230
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_title}}</code>
|
|
231
|
+
or <code>{{post.authors.[#].meta_title}}</code>.<br>
|
|
232
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
233
|
+
regex: /{{\s*?post\.author\.meta_title\s*?}}/g,
|
|
234
|
+
helper: '{{post.author.meta_title}}'
|
|
235
|
+
},
|
|
236
|
+
'GS001-DEPR-PAUTH-MD': {
|
|
237
|
+
level: 'error',
|
|
238
|
+
fatal: true,
|
|
239
|
+
rule: 'Replace the <code>{{post.author.meta_description}}</code> helper with <code>{{post.primary_author.meta_description}}</code> or <code>{{post.authors.[#].meta_description}}</code>',
|
|
240
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_description}}</code>
|
|
241
|
+
or <code>{{post.authors.[#].meta_description}}</code>.<br>
|
|
242
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
243
|
+
regex: /{{\s*?post\.author\.meta_description\s*?}}/g,
|
|
244
|
+
helper: '{{post.author.meta_description}}'
|
|
245
|
+
},
|
|
246
|
+
'GS001-DEPR-PAUTH-NAME': {
|
|
247
|
+
level: 'error',
|
|
248
|
+
fatal: true,
|
|
249
|
+
rule: 'Replace the <code>{{post.author.name}}</code> helper with <code>{{post.primary_author.name}}</code> or <code>{{post.authors.[#].name}}</code>',
|
|
250
|
+
details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.name}}</code>
|
|
251
|
+
or <code>{{post.authors.[#].name}}</code>.<br>
|
|
252
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
253
|
+
regex: /{{\s*?post\.author\.name\s*?}}/g,
|
|
254
|
+
helper: '{{post.author.name}}'
|
|
255
|
+
},
|
|
256
|
+
'GS001-DEPR-PAUTH-BIO': {
|
|
257
|
+
level: 'error',
|
|
258
|
+
fatal: true,
|
|
259
|
+
rule: 'Replace the <code>{{post.author.bio}}</code> helper with <code>{{post.primary_author.bio}}</code> or <code>{{post.authors.[#].bio}}</code>',
|
|
260
|
+
details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.bio}}</code>
|
|
261
|
+
or <code>{{post.authors.[#].bio}}</code>.<br>
|
|
262
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
263
|
+
regex: /{{\s*?post\.author\.bio\s*?}}/g,
|
|
264
|
+
helper: '{{post.author.bio}}'
|
|
265
|
+
},
|
|
266
|
+
'GS001-DEPR-PAUTH-LOC': {
|
|
267
|
+
level: 'error',
|
|
268
|
+
fatal: true,
|
|
269
|
+
rule: 'Replace the <code>{{post.author.location}}</code> helper with <code>{{post.primary_author.location}}</code> or <code>{{post.authors.[#].location}}</code>',
|
|
270
|
+
details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.location}}</code>
|
|
271
|
+
or <code>{{post.authors.[#].location}}</code>.<br>
|
|
272
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
273
|
+
regex: /{{\s*?post\.author\.location\s*?}}/g,
|
|
274
|
+
helper: '{{post.author.location}}'
|
|
275
|
+
},
|
|
276
|
+
'GS001-DEPR-PAUTH-WEB': {
|
|
277
|
+
level: 'error',
|
|
278
|
+
fatal: true,
|
|
279
|
+
rule: 'Replace the <code>{{post.author.website}}</code> helper with <code>{{post.primary_author.website}}</code> or <code>{{post.authors.[#].website}}</code>',
|
|
280
|
+
details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.website}}</code>
|
|
281
|
+
or <code>{{post.authors.[#].website}}</code>.<br>
|
|
282
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
283
|
+
regex: /{{\s*?post\.author\.website\s*?}}/g,
|
|
284
|
+
helper: '{{post.author.website}}'
|
|
285
|
+
},
|
|
286
|
+
'GS001-DEPR-PAUTH-TW': {
|
|
287
|
+
level: 'error',
|
|
288
|
+
fatal: true,
|
|
289
|
+
rule: 'Replace the <code>{{post.author.twitter}}</code> helper with <code>{{post.primary_author.twitter}}</code> or <code>{{post.authors.[#].twitter}}</code>',
|
|
290
|
+
details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.twitter}}</code>
|
|
291
|
+
or <code>{{post.authors.[#].twitter}}</code>.<br>
|
|
292
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
293
|
+
regex: /{{\s*?post\.author\.twitter\s*?}}/g,
|
|
294
|
+
helper: '{{post.author.twitter}}'
|
|
295
|
+
},
|
|
296
|
+
'GS001-DEPR-PAUTH-FB': {
|
|
297
|
+
level: 'error',
|
|
298
|
+
fatal: true,
|
|
299
|
+
rule: 'Replace the <code>{{post.author.facebook}}</code> helper with <code>{{post.primary_author.facebook}}</code> or <code>{{post.authors.[#].facebook}}</code>',
|
|
300
|
+
details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.facebook}}</code>
|
|
301
|
+
or <code>{{post.authors.[#].facebook}}</code>.<br>
|
|
302
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
303
|
+
regex: /{{\s*?post\.author\.facebook\s*?}}/g,
|
|
304
|
+
helper: '{{post.author.facebook}}'
|
|
305
|
+
},
|
|
306
|
+
'GS001-DEPR-PAUTH-PIMG': {
|
|
307
|
+
level: 'error',
|
|
308
|
+
fatal: true,
|
|
309
|
+
rule: 'Replace the <code>{{post.author.profile_image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
310
|
+
details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.profile_image}}</code>
|
|
311
|
+
or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
312
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
313
|
+
regex: /{{\s*?post\.author\.profile_image\s*?}}/g,
|
|
314
|
+
helper: '{{post.author.profile_image}}'
|
|
315
|
+
},
|
|
316
|
+
'GS001-DEPR-PAUTH-CIMG': {
|
|
317
|
+
level: 'error',
|
|
318
|
+
fatal: true,
|
|
319
|
+
rule: 'Replace the <code>{{post.author.cover_image}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
320
|
+
details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.cover_image}}</code>
|
|
321
|
+
or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
322
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
323
|
+
regex: /{{\s*?post\.author\.cover_image\s*?}}/g,
|
|
324
|
+
helper: '{{post.author.cover_image}}'
|
|
325
|
+
},
|
|
326
|
+
'GS001-DEPR-PAUTH-URL': {
|
|
327
|
+
level: 'error',
|
|
328
|
+
fatal: true,
|
|
329
|
+
rule: 'Replace the <code>{{post.author.url}}</code> helper with <code>{{post.primary_author.url}}</code> or <code>{{post.authors.[#].url}}</code>',
|
|
330
|
+
details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.url}}</code>
|
|
331
|
+
or <code>{{post.authors.[#].url}}</code>.<br>
|
|
332
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
333
|
+
regex: /{{\s*?post\.author\.url\s*?}}/g,
|
|
334
|
+
helper: '{{post.author.url}}'
|
|
335
|
+
},
|
|
336
|
+
'GS001-DEPR-PAID': {
|
|
337
|
+
level: 'error',
|
|
338
|
+
fatal: true,
|
|
339
|
+
rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
|
|
340
|
+
details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
|
|
341
|
+
Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
|
|
342
|
+
See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
|
|
343
|
+
regex: /{{\s*?post\.author_id\s*?}}/g,
|
|
344
|
+
helper: '{{post.author_id}}'
|
|
345
|
+
},
|
|
346
|
+
'GS001-DEPR-NAUTH': {
|
|
347
|
+
level: 'error',
|
|
348
|
+
fatal: true,
|
|
349
|
+
rule: 'Replace <code>../author</code> with <code>../primary_author</code> or <code>../authors.[#]</code>',
|
|
350
|
+
details: oneLineTrim`The usage of <code>../author</code> is deprecated and should be replaced with either <code>../primary_author</code>
|
|
351
|
+
or <code>../authors.[#]</code>.<br>
|
|
352
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
353
|
+
regex: /{{\s*?(?:#|#if)?\s*?\.\.\/author(?:\.\S*?)?\s*?}}/g,
|
|
354
|
+
helper: '{{../author}}'
|
|
355
|
+
},
|
|
356
|
+
'GS001-DEPR-IUA': {
|
|
357
|
+
level: 'error',
|
|
358
|
+
fatal: true,
|
|
359
|
+
rule: 'Replace <code>{{img_url author.*}}</code> with <code>{{img_url primary_author.*}}</code> or <code>.{img_url author.[#].*}}</code>',
|
|
360
|
+
details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is deprecated and should be replaced with either <code>{{img_url primary_author.*}}</code>
|
|
361
|
+
or <code>{{img_url author.[#].*}}</code>.<br>
|
|
362
|
+
Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
|
|
363
|
+
regex: /{{\s*?img_url\s*?(author.).*}}/g,
|
|
364
|
+
helper: '{{img_url author.*}}'
|
|
365
|
+
},
|
|
366
|
+
'GS001-DEPR-AC': {
|
|
367
|
+
level: 'error',
|
|
368
|
+
fatal: true,
|
|
369
|
+
rule: 'Replace the <code>{{author.cover}}</code> helper with <code>{{primary_author.cover_image}}</code>',
|
|
370
|
+
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
371
|
+
Instead of <code>{{author.cover}}</code> you need to use
|
|
372
|
+
<code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
373
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
374
|
+
regex: /{{\s*?author\.cover\s*?}}/g,
|
|
375
|
+
helper: '{{author.cover}}'
|
|
376
|
+
},
|
|
377
|
+
'GS001-DEPR-AIMG': {
|
|
378
|
+
level: 'error',
|
|
379
|
+
fatal: true,
|
|
380
|
+
rule: 'Replace the <code>{{author.image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
381
|
+
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
382
|
+
Instead of <code>{{author.image}}</code>, you need to use
|
|
383
|
+
<code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
384
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
385
|
+
regex: /{{\s*?author\.image\s*?}}/g,
|
|
386
|
+
helper: '{{author.image}}'
|
|
387
|
+
},
|
|
388
|
+
'GS001-DEPR-PAC': {
|
|
389
|
+
level: 'error',
|
|
390
|
+
fatal: true,
|
|
391
|
+
rule: 'Replace the <code>{{post.author.cover}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
392
|
+
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
393
|
+
Instead of <code>{{post.author.cover}}</code>, you need to use
|
|
394
|
+
<code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
395
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
396
|
+
regex: /{{\s*?post\.author\.cover\s*?}}/g,
|
|
397
|
+
helper: '{{post.author.cover}}'
|
|
398
|
+
},
|
|
399
|
+
'GS001-DEPR-PAIMG': {
|
|
400
|
+
level: 'error',
|
|
401
|
+
fatal: true,
|
|
402
|
+
rule: 'Replace the <code>{{post.author.image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
403
|
+
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
404
|
+
Instead of <code>{{post.author.image}}</code>, you need to use
|
|
405
|
+
<code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
406
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
407
|
+
regex: /{{\s*?post\.author\.image\s*?}}/g,
|
|
408
|
+
helper: '{{post.author.image}}'
|
|
409
|
+
},
|
|
410
|
+
'GS001-DEPR-CON-AC': {
|
|
411
|
+
level: 'error',
|
|
412
|
+
fatal: true,
|
|
413
|
+
rule: 'Replace the <code>{{#if author.cover}}</code> helper with <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>',
|
|
414
|
+
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
415
|
+
Instead of <code>{{#if author.cover}}</code>, you need to use
|
|
416
|
+
<code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
|
|
417
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
418
|
+
regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
|
|
419
|
+
helper: '{{#if author.cover}}'
|
|
420
|
+
},
|
|
421
|
+
'GS001-DEPR-CON-AIMG': {
|
|
422
|
+
level: 'error',
|
|
423
|
+
fatal: true,
|
|
424
|
+
rule: 'Replace the <code>{{#if author.image}}</code> helper with <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>',
|
|
425
|
+
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
426
|
+
Instead of <code>{{#if author.image}}</code>, you need to use
|
|
427
|
+
<code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
|
|
428
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
429
|
+
regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
|
|
430
|
+
helper: '{{#if author.image}}'
|
|
431
|
+
},
|
|
432
|
+
'GS001-DEPR-CON-PAC': {
|
|
433
|
+
level: 'error',
|
|
434
|
+
fatal: true,
|
|
435
|
+
rule: 'Replace the <code>{{#if post.author.cover}}</code> helper with <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>',
|
|
436
|
+
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
437
|
+
Instead of <code>{{#if post.author.cover}}</code>, you need to use
|
|
438
|
+
<code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
|
|
439
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
440
|
+
regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
|
|
441
|
+
helper: '{{#if post.author.cover}}'
|
|
442
|
+
},
|
|
443
|
+
'GS001-DEPR-CON-PAIMG': {
|
|
444
|
+
level: 'error',
|
|
445
|
+
fatal: true,
|
|
446
|
+
rule: 'Replace the <code>{{#if post.author.image}}</code> helper with <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>',
|
|
447
|
+
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
448
|
+
Instead of <code>{{#if post.author.image}}</code>, you need to use
|
|
449
|
+
<code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
|
|
450
|
+
See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
451
|
+
regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
|
|
452
|
+
helper: '{{#if post.author.image}}'
|
|
453
|
+
}
|
|
289
454
|
};
|
|
290
455
|
|
|
291
456
|
knownHelpers = _.union(previousKnownHelpers, knownHelpers);
|