gscan 4.28.0 → 4.29.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/bin/cli.js +8 -3
- package/lib/checks/050-koenig-css-classes.js +1 -1
- package/lib/specs/canary.js +204 -166
- package/lib/specs/v1.js +20 -20
- package/lib/specs/v2.js +71 -62
- package/lib/specs/v3.js +2 -1
- package/lib/specs/v4.js +6 -5
- package/lib/utils/package-json.js +2 -11
- package/package.json +2 -2
package/lib/specs/canary.js
CHANGED
|
@@ -10,68 +10,71 @@ const previousKnownHelpers = previousSpec.knownHelpers;
|
|
|
10
10
|
const previousTemplates = previousSpec.templates;
|
|
11
11
|
const previousRules = _.cloneDeep(previousSpec.rules);
|
|
12
12
|
|
|
13
|
+
const multiAuthorDesc = `Ghost allows multiple authors to be assigned to a post, so all helpers have been reworked to account for this.`;
|
|
14
|
+
const authorHelperDocs = `Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>`;
|
|
15
|
+
const tierDesc = `Ghost now supports multiple tiers and subscriptions. All product and price related helpers have been reworked to account for this.`;
|
|
16
|
+
|
|
13
17
|
// assign new or overwrite existing knownHelpers, templates, or rules here:
|
|
14
18
|
let knownHelpers = [];
|
|
15
19
|
let templates = [];
|
|
16
20
|
let rules = {
|
|
17
21
|
// New rules
|
|
18
22
|
'GS010-PJ-GHOST-API-PRESENT': {
|
|
19
|
-
level: '
|
|
20
|
-
rule: '
|
|
21
|
-
details: oneLineTrim`
|
|
22
|
-
|
|
23
|
-
Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
|
|
23
|
+
level: 'warning',
|
|
24
|
+
rule: 'Remove <code>"engines.ghost-api"</code> from <code>package.json</code>.',
|
|
25
|
+
details: oneLineTrim`The <code>"ghost-api"</code> version is no longer used and can be removed.<br>
|
|
26
|
+
Find more information about the <code>package.json</code> file <a href="${docsBaseUrl}packagejson/" target=_blank>here</a>.`
|
|
24
27
|
},
|
|
25
28
|
'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
|
|
26
29
|
level: 'error',
|
|
27
30
|
fatal: true,
|
|
28
|
-
rule: '
|
|
29
|
-
details: oneLineTrim`The <code>{{author}}</code> helper
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
rule: 'Replace <code>{{author}}</code> with <code>{{authors}}</code>',
|
|
32
|
+
details: oneLineTrim`The <code>{{author}}</code> helper was removed in favor of <code>{{<authors>}}</code><br>
|
|
33
|
+
${multiAuthorDesc}<br>
|
|
34
|
+
${authorHelperDocs}`,
|
|
32
35
|
helper: '{{author}}'
|
|
33
36
|
},
|
|
34
37
|
'GS090-NO-PRODUCTS-HELPER': {
|
|
35
38
|
level: 'error',
|
|
36
39
|
fatal: true,
|
|
37
|
-
rule: '
|
|
38
|
-
details: oneLineTrim`The <code>{{products}}</code> helper
|
|
39
|
-
|
|
40
|
+
rule: 'Replace <code>{{products}}</code> with <code>{{tiers}}</code>',
|
|
41
|
+
details: oneLineTrim`The <code>{{products}}</code> helper was removed in favor of <code>{{tiers}}</code><br>
|
|
42
|
+
${tierDesc}<br>
|
|
40
43
|
Find more information about the <code>{{tiers}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
41
44
|
helper: '{{products}}'
|
|
42
45
|
},
|
|
43
46
|
'GS090-NO-PRODUCT-DATA-HELPER': {
|
|
44
47
|
level: 'error',
|
|
45
48
|
fatal: true,
|
|
46
|
-
rule: '
|
|
47
|
-
details: oneLineTrim`The <code>{{@product}}</code> data helper
|
|
48
|
-
|
|
49
|
+
rule: 'Replace <code>{{@product}}</code> with <code>{{#get "tiers"}}</code>',
|
|
50
|
+
details: oneLineTrim`The <code>{{@product}}</code> data helper was removed in favor of <code>{{#get "tiers"}}</code><br>
|
|
51
|
+
${tierDesc}<br>
|
|
49
52
|
Find more information about the <code>{{#get "tiers"}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
50
53
|
helper: '{{@product}}'
|
|
51
54
|
},
|
|
52
55
|
'GS090-NO-PRODUCTS-DATA-HELPER': {
|
|
53
56
|
level: 'error',
|
|
54
57
|
fatal: true,
|
|
55
|
-
rule: '
|
|
56
|
-
details: oneLineTrim`The <code>{{@products}}</code> data helper
|
|
57
|
-
|
|
58
|
+
rule: 'Replace <code>{{@products}}</code> with <code>{{#get "tiers"}}</code>',
|
|
59
|
+
details: oneLineTrim`The <code>{{@products}}</code> data helper was removed in favor of <code>{{#get "tiers"}}</code><br>
|
|
60
|
+
${tierDesc}<br>
|
|
58
61
|
Find more information about the <code>{{#get "tiers"}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
59
62
|
helper: '{{@products}}'
|
|
60
63
|
},
|
|
61
64
|
'GS090-NO-MEMBER-PRODUCTS-DATA-HELPER': {
|
|
62
65
|
level: 'error',
|
|
63
|
-
rule: '
|
|
64
|
-
details: oneLineTrim`The <code>{{@member.products}}</code> helper
|
|
65
|
-
|
|
66
|
+
rule: 'Replace <code>{{@member.products}}</code> with <code>{{@member.subscriptions}}</code>',
|
|
67
|
+
details: oneLineTrim`The <code>{{@member.products}}</code> helper was removed in favor of <code>{{@member.subscriptions}}</code><br>
|
|
68
|
+
${tierDesc}<br>
|
|
66
69
|
Find more information about the <code>{{@member.subscriptions}}</code> property <a href="${docsBaseUrl}members/#member-subscriptions" target=_blank>here</a>.`,
|
|
67
70
|
helper: '{{@member.products}}'
|
|
68
71
|
},
|
|
69
72
|
'GS090-NO-PRICE-DATA-HELPER': {
|
|
70
73
|
level: 'error',
|
|
71
74
|
fatal: true,
|
|
72
|
-
rule: '
|
|
73
|
-
details: oneLineTrim`The <code>{{@price}}</code> data helper
|
|
74
|
-
|
|
75
|
+
rule: 'Replace <code>{{@price}}</code> with <code>{{price}}</code> and <code>{{@member.subscriptions}}</code>',
|
|
76
|
+
details: oneLineTrim`The <code>{{@price}}</code> data helper was removed in favor of <code>{{price}}</code> and <code>{{@member.subscriptions}}</code><br>
|
|
77
|
+
${tierDesc}<br>
|
|
75
78
|
Find more information about the <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
|
|
76
79
|
helper: '{{@price}}'
|
|
77
80
|
},
|
|
@@ -80,9 +83,8 @@ let rules = {
|
|
|
80
83
|
'GS001-DEPR-BLOG': {
|
|
81
84
|
level: 'error',
|
|
82
85
|
fatal: true,
|
|
83
|
-
rule: '
|
|
84
|
-
details: oneLineTrim`
|
|
85
|
-
The <code>{{@blog}}</code> helper was removed in Ghost v5 and should not be used.
|
|
86
|
+
rule: 'Replace <code>{{@blog}}</code> with <code>{{@site}}</code>',
|
|
87
|
+
details: oneLineTrim`The usage of <code>{{@blog}}</code> is no longer supported and should be replaced with<code>{{@site}}</code>.<br>
|
|
86
88
|
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
87
89
|
regex: /{{\s*?@blog\.[a-zA-Z0-9_]+\s*?}}/g,
|
|
88
90
|
helper: '{{@blog}}'
|
|
@@ -90,290 +92,319 @@ let rules = {
|
|
|
90
92
|
'GS001-DEPR-AUTH-ID': {
|
|
91
93
|
level: 'error',
|
|
92
94
|
fatal: true,
|
|
93
|
-
rule: 'Replace
|
|
94
|
-
details: oneLineTrim`The usage of <code>{{author.id}}</code> is
|
|
95
|
+
rule: 'Replace <code>{{author.id}}</code> with <code>{{primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
96
|
+
details: oneLineTrim`The usage of <code>{{author.id}}</code> is no longer supported and should be replaced with either <code>{{primary_author.id}}</code>
|
|
95
97
|
or <code>{{authors.[#].id}}</code>.<br>
|
|
96
|
-
|
|
98
|
+
${multiAuthorDesc}<br>
|
|
99
|
+
${authorHelperDocs}`,
|
|
97
100
|
regex: /{{\s*?author\.id\s*?}}/g,
|
|
98
101
|
helper: '{{author.id}}'
|
|
99
102
|
},
|
|
100
103
|
'GS001-DEPR-AUTH-SLUG': {
|
|
101
104
|
level: 'error',
|
|
102
105
|
fatal: true,
|
|
103
|
-
rule: 'Replace
|
|
104
|
-
details: oneLineTrim`The usage of <code>{{author.slug}}</code> is
|
|
106
|
+
rule: 'Replace <code>{{author.slug}}</code> with <code>{{primary_author.slug}}</code> or <code>{{authors.[#].slug}}</code>',
|
|
107
|
+
details: oneLineTrim`The usage of <code>{{author.slug}}</code> is no longer supported and should be replaced with either <code>{{primary_author.slug}}</code>
|
|
105
108
|
or <code>{{authors.[#].slug}}</code>.<br>
|
|
106
|
-
|
|
109
|
+
${multiAuthorDesc}<br>
|
|
110
|
+
${authorHelperDocs}`,
|
|
107
111
|
regex: /{{\s*?author\.slug\s*?}}/g,
|
|
108
112
|
helper: '{{author.slug}}'
|
|
109
113
|
},
|
|
110
114
|
'GS001-DEPR-AUTH-MAIL': {
|
|
111
115
|
level: 'error',
|
|
112
116
|
fatal: true,
|
|
113
|
-
rule: 'Replace
|
|
114
|
-
details: oneLineTrim`The usage of <code>{{author.email}}</code> is
|
|
117
|
+
rule: 'Replace <code>{{author.email}}</code> with <code>{{primary_author.email}}</code> or <code>{{authors.[#].email}}</code>',
|
|
118
|
+
details: oneLineTrim`The usage of <code>{{author.email}}</code> is no longer supported and should be replaced with either <code>{{primary_author.email}}</code>
|
|
115
119
|
or <code>{{authors.[#].email}}</code>.<br>
|
|
116
|
-
|
|
120
|
+
${multiAuthorDesc}<br>
|
|
121
|
+
${authorHelperDocs}`,
|
|
117
122
|
regex: /{{\s*?author\.email\s*?}}/g,
|
|
118
123
|
helper: '{{author.email}}'
|
|
119
124
|
},
|
|
120
125
|
'GS001-DEPR-AUTH-MT': {
|
|
121
126
|
level: 'error',
|
|
122
127
|
fatal: true,
|
|
123
|
-
rule: 'Replace
|
|
124
|
-
details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is
|
|
128
|
+
rule: 'Replace <code>{{author.meta_title}}</code> with <code>{{primary_author.meta_title}}</code> or <code>{{authors.[#].meta_title}}</code>',
|
|
129
|
+
details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is no longer supported and should be replaced with either <code>{{primary_author.meta_title}}</code>
|
|
125
130
|
or <code>{{authors.[#].meta_title}}</code>.<br>
|
|
126
|
-
|
|
131
|
+
${multiAuthorDesc}<br>
|
|
132
|
+
${authorHelperDocs}`,
|
|
127
133
|
regex: /{{\s*?author\.meta_title\s*?}}/g,
|
|
128
134
|
helper: '{{author.meta_title}}'
|
|
129
135
|
},
|
|
130
136
|
'GS001-DEPR-AUTH-MD': {
|
|
131
137
|
level: 'error',
|
|
132
138
|
fatal: true,
|
|
133
|
-
rule: 'Replace
|
|
134
|
-
details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is
|
|
139
|
+
rule: 'Replace <code>{{author.meta_description}}</code> with <code>{{primary_author.meta_description}}</code> or <code>{{authors.[#].meta_description}}</code>',
|
|
140
|
+
details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is no longer supported and should be replaced with either <code>{{primary_author.meta_description}}</code>
|
|
135
141
|
or <code>{{authors.[#].meta_description}}</code>.<br>
|
|
136
|
-
|
|
142
|
+
${multiAuthorDesc}<br>
|
|
143
|
+
${authorHelperDocs}`,
|
|
137
144
|
regex: /{{\s*?author\.meta_description\s*?}}/g,
|
|
138
145
|
helper: '{{author.meta_description}}'
|
|
139
146
|
},
|
|
140
147
|
'GS001-DEPR-AUTH-NAME': {
|
|
141
148
|
level: 'error',
|
|
142
149
|
fatal: true,
|
|
143
|
-
rule: 'Replace
|
|
144
|
-
details: oneLineTrim`The usage of <code>{{author.name}}</code> is
|
|
150
|
+
rule: 'Replace <code>{{author.name}}</code> with <code>{{primary_author.name}}</code> or <code>{{authors.[#].name}}</code>',
|
|
151
|
+
details: oneLineTrim`The usage of <code>{{author.name}}</code> is no longer supported and should be replaced with either <code>{{primary_author.name}}</code>
|
|
145
152
|
or <code>{{authors.[#].name}}</code>.<br>
|
|
146
|
-
|
|
153
|
+
${multiAuthorDesc}<br>
|
|
154
|
+
${authorHelperDocs}`,
|
|
147
155
|
regex: /{{\s*?author\.name\s*?}}/g,
|
|
148
156
|
helper: '{{author.name}}'
|
|
149
157
|
},
|
|
150
158
|
'GS001-DEPR-AUTH-BIO': {
|
|
151
159
|
level: 'error',
|
|
152
160
|
fatal: true,
|
|
153
|
-
rule: 'Replace
|
|
154
|
-
details: oneLineTrim`The usage of <code>{{author.bio}}</code> is
|
|
161
|
+
rule: 'Replace <code>{{author.bio}}</code> with <code>{{primary_author.bio}}</code> or <code>{{authors.[#].bio}}</code>',
|
|
162
|
+
details: oneLineTrim`The usage of <code>{{author.bio}}</code> is no longer supported and should be replaced with either <code>{{primary_author.bio}}</code>
|
|
155
163
|
or <code>{{authors.[#].bio}}</code>.<br>
|
|
156
|
-
|
|
164
|
+
${multiAuthorDesc}<br>
|
|
165
|
+
${authorHelperDocs}`,
|
|
157
166
|
regex: /{{\s*?author\.bio\s*?}}/g,
|
|
158
167
|
helper: '{{author.bio}}'
|
|
159
168
|
},
|
|
160
169
|
'GS001-DEPR-AUTH-LOC': {
|
|
161
170
|
level: 'error',
|
|
162
171
|
fatal: true,
|
|
163
|
-
rule: 'Replace
|
|
164
|
-
details: oneLineTrim`The usage of <code>{{author.location}}</code> is
|
|
172
|
+
rule: 'Replace <code>{{author.location}}</code> with <code>{{primary_author.location}}</code> or <code>{{authors.[#].location}}</code>',
|
|
173
|
+
details: oneLineTrim`The usage of <code>{{author.location}}</code> is no longer supported and should be replaced with either <code>{{primary_author.location}}</code>
|
|
165
174
|
or <code>{{authors.[#].location}}</code>.<br>
|
|
166
|
-
|
|
175
|
+
${multiAuthorDesc}<br>
|
|
176
|
+
${authorHelperDocs}`,
|
|
167
177
|
regex: /{{\s*?author\.location\s*?}}/g,
|
|
168
178
|
helper: '{{author.location}}'
|
|
169
179
|
},
|
|
170
180
|
'GS001-DEPR-AUTH-WEB': {
|
|
171
181
|
level: 'error',
|
|
172
182
|
fatal: true,
|
|
173
|
-
rule: 'Replace
|
|
174
|
-
details: oneLineTrim`The usage of <code>{{author.website}}</code> is
|
|
183
|
+
rule: 'Replace <code>{{author.website}}</code> with <code>{{primary_author.website}}</code> or <code>{{authors.[#].website}}</code>',
|
|
184
|
+
details: oneLineTrim`The usage of <code>{{author.website}}</code> is no longer supported and should be replaced with either <code>{{primary_author.website}}</code>
|
|
175
185
|
or <code>{{authors.[#].website}}</code>.<br>
|
|
176
|
-
|
|
186
|
+
${multiAuthorDesc}<br>
|
|
187
|
+
${authorHelperDocs}`,
|
|
177
188
|
regex: /{{\s*?author\.website\s*?}}/g,
|
|
178
189
|
helper: '{{author.website}}'
|
|
179
190
|
},
|
|
180
191
|
'GS001-DEPR-AUTH-TW': {
|
|
181
192
|
level: 'error',
|
|
182
193
|
fatal: true,
|
|
183
|
-
rule: 'Replace
|
|
184
|
-
details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is
|
|
194
|
+
rule: 'Replace <code>{{author.twitter}}</code> with <code>{{primary_author.twitter}}</code> or <code>{{authors.[#].twitter}}</code>',
|
|
195
|
+
details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is no longer supported and should be replaced with either <code>{{primary_author.twitter}}</code>
|
|
185
196
|
or <code>{{authors.[#].twitter}}</code>.<br>
|
|
186
|
-
|
|
197
|
+
${multiAuthorDesc}<br>
|
|
198
|
+
${authorHelperDocs}`,
|
|
187
199
|
regex: /{{\s*?author\.twitter\s*?}}/g,
|
|
188
200
|
helper: '{{author.twitter}}'
|
|
189
201
|
},
|
|
190
202
|
'GS001-DEPR-AUTH-FB': {
|
|
191
203
|
level: 'error',
|
|
192
204
|
fatal: true,
|
|
193
|
-
rule: 'Replace
|
|
194
|
-
details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is
|
|
205
|
+
rule: 'Replace <code>{{author.facebook}}</code> with <code>{{primary_author.facebook}}</code> or <code>{{authors.[#].facebook}}</code>',
|
|
206
|
+
details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is no longer supported and should be replaced with either <code>{{primary_author.facebook}}</code>
|
|
195
207
|
or <code>{{authors.[#].facebook}}</code>.<br>
|
|
196
|
-
|
|
208
|
+
${multiAuthorDesc}<br>
|
|
209
|
+
${authorHelperDocs}`,
|
|
197
210
|
regex: /{{\s*?author\.facebook\s*?}}/g,
|
|
198
211
|
helper: '{{author.facebook}}'
|
|
199
212
|
},
|
|
200
213
|
'GS001-DEPR-AUTH-PIMG': {
|
|
201
214
|
level: 'error',
|
|
202
215
|
fatal: true,
|
|
203
|
-
rule: 'Replace
|
|
204
|
-
details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is
|
|
216
|
+
rule: 'Replace <code>{{author.profile_image}}</code> with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
217
|
+
details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is no longer supported and should be replaced with either <code>{{primary_author.profile_image}}</code>
|
|
205
218
|
or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
206
|
-
|
|
219
|
+
${multiAuthorDesc}<br>
|
|
220
|
+
${authorHelperDocs}`,
|
|
207
221
|
regex: /{{\s*?author\.profile_image\s*?}}/g,
|
|
208
222
|
helper: '{{author.profile_image}}'
|
|
209
223
|
},
|
|
210
224
|
'GS001-DEPR-AUTH-CIMG': {
|
|
211
225
|
level: 'error',
|
|
212
226
|
fatal: true,
|
|
213
|
-
rule: 'Replace
|
|
214
|
-
details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is
|
|
227
|
+
rule: 'Replace <code>{{author.cover_image}}</code> with <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>',
|
|
228
|
+
details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is no longer supported and should be replaced with either <code>{{primary_author.cover_image}}</code>
|
|
215
229
|
or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
216
|
-
|
|
230
|
+
${multiAuthorDesc}<br>
|
|
231
|
+
${authorHelperDocs}`,
|
|
217
232
|
regex: /{{\s*?author\.cover_image\s*?}}/g,
|
|
218
233
|
helper: '{{author.cover_image}}'
|
|
219
234
|
},
|
|
220
235
|
'GS001-DEPR-AUTH-URL': {
|
|
221
236
|
level: 'error',
|
|
222
237
|
fatal: true,
|
|
223
|
-
rule: 'Replace
|
|
224
|
-
details: oneLineTrim`The usage of <code>{{author.url}}</code> is
|
|
238
|
+
rule: 'Replace <code>{{author.url}}</code> with <code>{{primary_author.url}}</code> or <code>{{authors.[#].url}}</code>',
|
|
239
|
+
details: oneLineTrim`The usage of <code>{{author.url}}</code> is no longer supported and should be replaced with either <code>{{primary_author.url}}</code>
|
|
225
240
|
or <code>{{authors.[#].url}}</code>.<br>
|
|
226
|
-
|
|
241
|
+
${multiAuthorDesc}<br>
|
|
242
|
+
${authorHelperDocs}`,
|
|
227
243
|
regex: /{{\s*?author\.url\s*?}}/g,
|
|
228
244
|
helper: '{{author.url}}'
|
|
229
245
|
},
|
|
230
246
|
'GS001-DEPR-PAUTH': {
|
|
231
247
|
level: 'error',
|
|
232
248
|
fatal: true,
|
|
233
|
-
rule: 'Replace
|
|
234
|
-
details: oneLineTrim`The usage of <code>{{post.author}}</code> is
|
|
249
|
+
rule: 'Replace <code>{{post.author}}</code> with <code>{{post.primary_author}}</code> or <code>{{authors.[#]}}</code>',
|
|
250
|
+
details: oneLineTrim`The usage of <code>{{post.author}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author}}</code>
|
|
235
251
|
or <code>{{post.authors.[#]}}</code>.<br>
|
|
236
|
-
|
|
252
|
+
${multiAuthorDesc}<br>
|
|
253
|
+
${authorHelperDocs}`,
|
|
237
254
|
regex: /{{\s*?post\.author\s*?}}/g,
|
|
238
255
|
helper: '{{post.author}}'
|
|
239
256
|
},
|
|
240
257
|
'GS001-DEPR-PAUTH-ID': {
|
|
241
258
|
level: 'error',
|
|
242
259
|
fatal: true,
|
|
243
|
-
rule: 'Replace
|
|
244
|
-
details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is
|
|
260
|
+
rule: 'Replace <code>{{post.author.id}}</code> with <code>{{post.primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
261
|
+
details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.id}}</code>
|
|
245
262
|
or <code>{{post.authors.[#].id}}</code>.<br>
|
|
246
|
-
|
|
263
|
+
${multiAuthorDesc}<br>
|
|
264
|
+
${authorHelperDocs}`,
|
|
247
265
|
regex: /{{\s*?post\.author\.id\s*?}}/g,
|
|
248
266
|
helper: '{{post.author.id}}'
|
|
249
267
|
},
|
|
250
268
|
'GS001-DEPR-PAUTH-SLUG': {
|
|
251
269
|
level: 'error',
|
|
252
270
|
fatal: true,
|
|
253
|
-
rule: 'Replace
|
|
254
|
-
details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is
|
|
271
|
+
rule: 'Replace <code>{{post.author.slug}}</code> with <code>{{post.primary_author.slug}}</code> or <code>{{post.authors.[#].slug}}</code>',
|
|
272
|
+
details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.slug}}</code>
|
|
255
273
|
or <code>{{post.authors.[#].slug}}</code>.<br>
|
|
256
|
-
|
|
274
|
+
${multiAuthorDesc}<br>
|
|
275
|
+
${authorHelperDocs}`,
|
|
257
276
|
regex: /{{\s*?post\.author\.slug\s*?}}/g,
|
|
258
277
|
helper: '{{post.author.slug}}'
|
|
259
278
|
},
|
|
260
279
|
'GS001-DEPR-PAUTH-MAIL': {
|
|
261
280
|
level: 'error',
|
|
262
281
|
fatal: true,
|
|
263
|
-
rule: 'Replace
|
|
264
|
-
details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is
|
|
282
|
+
rule: 'Replace <code>{{post.author.email}}</code> with <code>{{post.primary_author.email}}</code> or <code>{{post.authors.[#].email}}</code>',
|
|
283
|
+
details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.email}}</code>
|
|
265
284
|
or <code>{{post.authors.[#].email}}</code>.<br>
|
|
266
|
-
|
|
285
|
+
${multiAuthorDesc}<br>
|
|
286
|
+
${authorHelperDocs}`,
|
|
267
287
|
regex: /{{\s*?post\.author\.email\s*?}}/g,
|
|
268
288
|
helper: '{{post.author.email}}'
|
|
269
289
|
},
|
|
270
290
|
'GS001-DEPR-PAUTH-MT': {
|
|
271
291
|
level: 'error',
|
|
272
292
|
fatal: true,
|
|
273
|
-
rule: 'Replace
|
|
274
|
-
details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is
|
|
293
|
+
rule: 'Replace <code>{{post.author.meta_title}}</code> with <code>{{post.primary_author.meta_title}}</code> or <code>{{post.authors.[#].meta_title}}</code>',
|
|
294
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.meta_title}}</code>
|
|
275
295
|
or <code>{{post.authors.[#].meta_title}}</code>.<br>
|
|
276
|
-
|
|
296
|
+
${multiAuthorDesc}<br>
|
|
297
|
+
${authorHelperDocs}`,
|
|
277
298
|
regex: /{{\s*?post\.author\.meta_title\s*?}}/g,
|
|
278
299
|
helper: '{{post.author.meta_title}}'
|
|
279
300
|
},
|
|
280
301
|
'GS001-DEPR-PAUTH-MD': {
|
|
281
302
|
level: 'error',
|
|
282
303
|
fatal: true,
|
|
283
|
-
rule: 'Replace
|
|
284
|
-
details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is
|
|
304
|
+
rule: 'Replace <code>{{post.author.meta_description}}</code> with <code>{{post.primary_author.meta_description}}</code> or <code>{{post.authors.[#].meta_description}}</code>',
|
|
305
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.meta_description}}</code>
|
|
285
306
|
or <code>{{post.authors.[#].meta_description}}</code>.<br>
|
|
286
|
-
|
|
307
|
+
${multiAuthorDesc}<br>
|
|
308
|
+
${authorHelperDocs}`,
|
|
287
309
|
regex: /{{\s*?post\.author\.meta_description\s*?}}/g,
|
|
288
310
|
helper: '{{post.author.meta_description}}'
|
|
289
311
|
},
|
|
290
312
|
'GS001-DEPR-PAUTH-NAME': {
|
|
291
313
|
level: 'error',
|
|
292
314
|
fatal: true,
|
|
293
|
-
rule: 'Replace
|
|
294
|
-
details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is
|
|
315
|
+
rule: 'Replace <code>{{post.author.name}}</code> with <code>{{post.primary_author.name}}</code> or <code>{{post.authors.[#].name}}</code>',
|
|
316
|
+
details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.name}}</code>
|
|
295
317
|
or <code>{{post.authors.[#].name}}</code>.<br>
|
|
296
|
-
|
|
318
|
+
${multiAuthorDesc}<br>
|
|
319
|
+
${authorHelperDocs}`,
|
|
297
320
|
regex: /{{\s*?post\.author\.name\s*?}}/g,
|
|
298
321
|
helper: '{{post.author.name}}'
|
|
299
322
|
},
|
|
300
323
|
'GS001-DEPR-PAUTH-BIO': {
|
|
301
324
|
level: 'error',
|
|
302
325
|
fatal: true,
|
|
303
|
-
rule: 'Replace
|
|
304
|
-
details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is
|
|
326
|
+
rule: 'Replace <code>{{post.author.bio}}</code> with <code>{{post.primary_author.bio}}</code> or <code>{{post.authors.[#].bio}}</code>',
|
|
327
|
+
details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.bio}}</code>
|
|
305
328
|
or <code>{{post.authors.[#].bio}}</code>.<br>
|
|
306
|
-
|
|
329
|
+
${multiAuthorDesc}<br>
|
|
330
|
+
${authorHelperDocs}`,
|
|
307
331
|
regex: /{{\s*?post\.author\.bio\s*?}}/g,
|
|
308
332
|
helper: '{{post.author.bio}}'
|
|
309
333
|
},
|
|
310
334
|
'GS001-DEPR-PAUTH-LOC': {
|
|
311
335
|
level: 'error',
|
|
312
336
|
fatal: true,
|
|
313
|
-
rule: 'Replace
|
|
314
|
-
details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is
|
|
337
|
+
rule: 'Replace <code>{{post.author.location}}</code> with <code>{{post.primary_author.location}}</code> or <code>{{post.authors.[#].location}}</code>',
|
|
338
|
+
details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.location}}</code>
|
|
315
339
|
or <code>{{post.authors.[#].location}}</code>.<br>
|
|
316
|
-
|
|
340
|
+
${multiAuthorDesc}<br>
|
|
341
|
+
${authorHelperDocs}`,
|
|
317
342
|
regex: /{{\s*?post\.author\.location\s*?}}/g,
|
|
318
343
|
helper: '{{post.author.location}}'
|
|
319
344
|
},
|
|
320
345
|
'GS001-DEPR-PAUTH-WEB': {
|
|
321
346
|
level: 'error',
|
|
322
347
|
fatal: true,
|
|
323
|
-
rule: 'Replace
|
|
324
|
-
details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is
|
|
348
|
+
rule: 'Replace <code>{{post.author.website}}</code> with <code>{{post.primary_author.website}}</code> or <code>{{post.authors.[#].website}}</code>',
|
|
349
|
+
details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.website}}</code>
|
|
325
350
|
or <code>{{post.authors.[#].website}}</code>.<br>
|
|
326
|
-
|
|
351
|
+
${multiAuthorDesc}<br>
|
|
352
|
+
${authorHelperDocs}`,
|
|
327
353
|
regex: /{{\s*?post\.author\.website\s*?}}/g,
|
|
328
354
|
helper: '{{post.author.website}}'
|
|
329
355
|
},
|
|
330
356
|
'GS001-DEPR-PAUTH-TW': {
|
|
331
357
|
level: 'error',
|
|
332
358
|
fatal: true,
|
|
333
|
-
rule: 'Replace
|
|
334
|
-
details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is
|
|
359
|
+
rule: 'Replace <code>{{post.author.twitter}}</code> with <code>{{post.primary_author.twitter}}</code> or <code>{{post.authors.[#].twitter}}</code>',
|
|
360
|
+
details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.twitter}}</code>
|
|
335
361
|
or <code>{{post.authors.[#].twitter}}</code>.<br>
|
|
336
|
-
|
|
362
|
+
${multiAuthorDesc}<br>
|
|
363
|
+
${authorHelperDocs}`,
|
|
337
364
|
regex: /{{\s*?post\.author\.twitter\s*?}}/g,
|
|
338
365
|
helper: '{{post.author.twitter}}'
|
|
339
366
|
},
|
|
340
367
|
'GS001-DEPR-PAUTH-FB': {
|
|
341
368
|
level: 'error',
|
|
342
369
|
fatal: true,
|
|
343
|
-
rule: 'Replace
|
|
344
|
-
details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is
|
|
370
|
+
rule: 'Replace <code>{{post.author.facebook}}</code> with <code>{{post.primary_author.facebook}}</code> or <code>{{post.authors.[#].facebook}}</code>',
|
|
371
|
+
details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.facebook}}</code>
|
|
345
372
|
or <code>{{post.authors.[#].facebook}}</code>.<br>
|
|
346
|
-
|
|
373
|
+
${multiAuthorDesc}<br>
|
|
374
|
+
${authorHelperDocs}`,
|
|
347
375
|
regex: /{{\s*?post\.author\.facebook\s*?}}/g,
|
|
348
376
|
helper: '{{post.author.facebook}}'
|
|
349
377
|
},
|
|
350
378
|
'GS001-DEPR-PAUTH-PIMG': {
|
|
351
379
|
level: 'error',
|
|
352
380
|
fatal: true,
|
|
353
|
-
rule: 'Replace
|
|
354
|
-
details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is
|
|
381
|
+
rule: 'Replace <code>{{post.author.profile_image}}</code> with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
382
|
+
details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.profile_image}}</code>
|
|
355
383
|
or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
356
|
-
|
|
384
|
+
${multiAuthorDesc}<br>
|
|
385
|
+
${authorHelperDocs}`,
|
|
357
386
|
regex: /{{\s*?post\.author\.profile_image\s*?}}/g,
|
|
358
387
|
helper: '{{post.author.profile_image}}'
|
|
359
388
|
},
|
|
360
389
|
'GS001-DEPR-PAUTH-CIMG': {
|
|
361
390
|
level: 'error',
|
|
362
391
|
fatal: true,
|
|
363
|
-
rule: 'Replace
|
|
364
|
-
details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is
|
|
392
|
+
rule: 'Replace <code>{{post.author.cover_image}}</code> with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
393
|
+
details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.cover_image}}</code>
|
|
365
394
|
or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
366
|
-
|
|
395
|
+
${multiAuthorDesc}<br>
|
|
396
|
+
${authorHelperDocs}`,
|
|
367
397
|
regex: /{{\s*?post\.author\.cover_image\s*?}}/g,
|
|
368
398
|
helper: '{{post.author.cover_image}}'
|
|
369
399
|
},
|
|
370
400
|
'GS001-DEPR-PAUTH-URL': {
|
|
371
401
|
level: 'error',
|
|
372
402
|
fatal: true,
|
|
373
|
-
rule: 'Replace
|
|
374
|
-
details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is
|
|
403
|
+
rule: 'Replace <code>{{post.author.url}}</code> with <code>{{post.primary_author.url}}</code> or <code>{{post.authors.[#].url}}</code>',
|
|
404
|
+
details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.url}}</code>
|
|
375
405
|
or <code>{{post.authors.[#].url}}</code>.<br>
|
|
376
|
-
|
|
406
|
+
${multiAuthorDesc}<br>
|
|
407
|
+
${authorHelperDocs}`,
|
|
377
408
|
regex: /{{\s*?post\.author\.url\s*?}}/g,
|
|
378
409
|
helper: '{{post.author.url}}'
|
|
379
410
|
},
|
|
@@ -383,7 +414,7 @@ let rules = {
|
|
|
383
414
|
rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
|
|
384
415
|
details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
|
|
385
416
|
Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
|
|
386
|
-
|
|
417
|
+
Find more information about the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
|
|
387
418
|
regex: /{{\s*?post\.author_id\s*?}}/g,
|
|
388
419
|
helper: '{{post.author_id}}'
|
|
389
420
|
},
|
|
@@ -391,9 +422,10 @@ let rules = {
|
|
|
391
422
|
level: 'error',
|
|
392
423
|
fatal: true,
|
|
393
424
|
rule: 'Replace <code>../author</code> with <code>../primary_author</code> or <code>../authors.[#]</code>',
|
|
394
|
-
details: oneLineTrim`The usage of <code>../author</code> is
|
|
425
|
+
details: oneLineTrim`The usage of <code>../author</code> is no longer supported and should be replaced with either <code>../primary_author</code>
|
|
395
426
|
or <code>../authors.[#]</code>.<br>
|
|
396
|
-
|
|
427
|
+
${multiAuthorDesc}<br>
|
|
428
|
+
${authorHelperDocs}`,
|
|
397
429
|
regex: /{{\s*?(?:#|#if)?\s*?\.\.\/author(?:\.\S*?)?\s*?}}/g,
|
|
398
430
|
helper: '{{../author}}'
|
|
399
431
|
},
|
|
@@ -401,50 +433,51 @@ let rules = {
|
|
|
401
433
|
level: 'error',
|
|
402
434
|
fatal: true,
|
|
403
435
|
rule: 'Replace <code>{{img_url author.*}}</code> with <code>{{img_url primary_author.*}}</code> or <code>.{img_url author.[#].*}}</code>',
|
|
404
|
-
details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is
|
|
436
|
+
details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is no longer supported and should be replaced with either <code>{{img_url primary_author.*}}</code>
|
|
405
437
|
or <code>{{img_url author.[#].*}}</code>.<br>
|
|
406
|
-
|
|
438
|
+
${multiAuthorDesc}<br>
|
|
439
|
+
${authorHelperDocs}`,
|
|
407
440
|
regex: /{{\s*?img_url\s*?(author.).*}}/g,
|
|
408
441
|
helper: '{{img_url author.*}}'
|
|
409
442
|
},
|
|
410
443
|
'GS001-DEPR-AC': {
|
|
411
444
|
level: 'error',
|
|
412
445
|
fatal: true,
|
|
413
|
-
rule: 'Replace
|
|
446
|
+
rule: 'Replace <code>{{author.cover}}</code> with <code>{{primary_author.cover_image}}</code>',
|
|
414
447
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
415
448
|
Instead of <code>{{author.cover}}</code> you need to use
|
|
416
449
|
<code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
417
|
-
|
|
450
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
418
451
|
regex: /{{\s*?author\.cover\s*?}}/g,
|
|
419
452
|
helper: '{{author.cover}}'
|
|
420
453
|
},
|
|
421
454
|
'GS001-DEPR-AIMG': {
|
|
422
455
|
level: 'error',
|
|
423
456
|
fatal: true,
|
|
424
|
-
rule: 'Replace
|
|
457
|
+
rule: 'Replace <code>{{author.image}}</code> with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
425
458
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
426
459
|
Instead of <code>{{author.image}}</code>, you need to use
|
|
427
460
|
<code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
428
|
-
|
|
461
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
429
462
|
regex: /{{\s*?author\.image\s*?}}/g,
|
|
430
463
|
helper: '{{author.image}}'
|
|
431
464
|
},
|
|
432
465
|
'GS001-DEPR-PAC': {
|
|
433
466
|
level: 'error',
|
|
434
467
|
fatal: true,
|
|
435
|
-
rule: 'Replace
|
|
468
|
+
rule: 'Replace <code>{{post.author.cover}}</code> with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
436
469
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
437
470
|
Instead of <code>{{post.author.cover}}</code>, you need to use
|
|
438
471
|
<code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
439
|
-
|
|
472
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
440
473
|
regex: /{{\s*?post\.author\.cover\s*?}}/g,
|
|
441
474
|
helper: '{{post.author.cover}}'
|
|
442
475
|
},
|
|
443
476
|
'GS001-DEPR-AUTH-INCL': {
|
|
444
477
|
level: 'error',
|
|
445
478
|
fatal: true,
|
|
446
|
-
rule:
|
|
447
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" include="author"}}</code> is
|
|
479
|
+
rule: `Replace <code>include="author"</code> with <code>include="authors"</code>`,
|
|
480
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" include="author"}}</code> is no longer supported and should be replaced with <code>{{#get "posts" include="authors"}}</code>.<br>
|
|
448
481
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
449
482
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
450
483
|
// in not detecting the wrong usage.
|
|
@@ -455,7 +488,7 @@ let rules = {
|
|
|
455
488
|
level: 'error',
|
|
456
489
|
fatal: true,
|
|
457
490
|
rule: `<code>fields="author"</code> should be replaced with <code>fields="authors"</code>`,
|
|
458
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" fields="author"}}</code> is
|
|
491
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" fields="author"}}</code> is no longer supported and should be replaced with
|
|
459
492
|
<code>{{#get "posts" fields="primary_author"}}</code> or <code>{{#get "posts" fields="authors.[#]"}}</code>.<br>
|
|
460
493
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
461
494
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
@@ -467,7 +500,7 @@ let rules = {
|
|
|
467
500
|
level: 'error',
|
|
468
501
|
fatal: true,
|
|
469
502
|
rule: `<code>filter="author:[...]"</code> should be replaced with <code>filter="authors:[...]"</code>`,
|
|
470
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" filter="author:[...]"}}</code> is
|
|
503
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" filter="author:[...]"}}</code> is no longer supported and should be replaced with <code>{{#get "posts" filter="authors:[...]"}}</code>.<br>
|
|
471
504
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
472
505
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
473
506
|
// in not detecting the wrong usage.
|
|
@@ -478,9 +511,10 @@ let rules = {
|
|
|
478
511
|
level: 'error',
|
|
479
512
|
fatal: true,
|
|
480
513
|
rule: 'The <code>{{#author}}</code> block helper should be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>',
|
|
481
|
-
details: oneLineTrim`The usage of <code>{{#author}}</code> block helper outside of <code>author.hbs</code> is
|
|
514
|
+
details: oneLineTrim`The usage of <code>{{#author}}</code> block helper outside of <code>author.hbs</code> is no longer supported and
|
|
482
515
|
should be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>.<br>
|
|
483
|
-
|
|
516
|
+
${multiAuthorDesc}<br>
|
|
517
|
+
${authorHelperDocs}`,
|
|
484
518
|
regex: /{{\s*?#author\s*?}}/g,
|
|
485
519
|
notValidIn: 'author.hbs',
|
|
486
520
|
helper: '{{#author}}'
|
|
@@ -488,11 +522,11 @@ let rules = {
|
|
|
488
522
|
'GS001-DEPR-PAIMG': {
|
|
489
523
|
level: 'error',
|
|
490
524
|
fatal: true,
|
|
491
|
-
rule: 'Replace
|
|
525
|
+
rule: 'Replace <code>{{post.author.image}}</code> with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
492
526
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
493
527
|
Instead of <code>{{post.author.image}}</code>, you need to use
|
|
494
528
|
<code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
495
|
-
|
|
529
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
496
530
|
regex: /{{\s*?post\.author\.image\s*?}}/g,
|
|
497
531
|
helper: '{{post.author.image}}'
|
|
498
532
|
},
|
|
@@ -501,9 +535,10 @@ let rules = {
|
|
|
501
535
|
fatal: true,
|
|
502
536
|
rule: `The <code>{{#if author.*}}</code> block helper should be replaced with <code>{{#if primary_author.*}}</code>
|
|
503
537
|
or <code>{{#if authors.[#].*}}</code>`,
|
|
504
|
-
details: oneLineTrim`The usage of <code>{{#if author.*}}</code> is
|
|
538
|
+
details: oneLineTrim`The usage of <code>{{#if author.*}}</code> is no longer supported and should be replaced with <code>{{#if primary_author.*}}</code>
|
|
505
539
|
or <code>{{#if authors.[#].*}}</code>.<br>
|
|
506
|
-
|
|
540
|
+
${multiAuthorDesc}<br>
|
|
541
|
+
${authorHelperDocs}`,
|
|
507
542
|
regex: /{{\s*?#if\s*?(author)(?:\.\w+)*?\s*?}}/g,
|
|
508
543
|
helper: '{{#if author.*}}'
|
|
509
544
|
},
|
|
@@ -512,69 +547,69 @@ let rules = {
|
|
|
512
547
|
fatal: true,
|
|
513
548
|
rule: `The <code>{{#if post.author.*}}</code> block helper should be replaced with <code>{{#if post.primary_author.*}}</code>
|
|
514
549
|
or <code>{{#if post.authors.[#].*}}</code>`,
|
|
515
|
-
details: oneLineTrim`The usage of <code>{{#if post.author.*}}</code> is
|
|
550
|
+
details: oneLineTrim`The usage of <code>{{#if post.author.*}}</code> is no longer supported and should be replaced with <code>{{#if post.primary_author.*}}</code>
|
|
516
551
|
or <code>{{#if post.authors.[#].*}}</code>.<br>
|
|
517
|
-
|
|
552
|
+
${multiAuthorDesc}<br>
|
|
553
|
+
${authorHelperDocs}`,
|
|
518
554
|
regex: /{{\s*?#if\s*?(?:post\.)(author)(?:\.\w+)*?\s*?}}/g,
|
|
519
555
|
helper: '{{#if post.author.*}}'
|
|
520
556
|
},
|
|
521
557
|
'GS001-DEPR-CON-AC': {
|
|
522
558
|
level: 'error',
|
|
523
559
|
fatal: true,
|
|
524
|
-
rule: 'Replace
|
|
560
|
+
rule: 'Replace <code>{{#if author.cover}}</code> with <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>',
|
|
525
561
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
526
562
|
Instead of <code>{{#if author.cover}}</code>, you need to use
|
|
527
563
|
<code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
|
|
528
|
-
|
|
564
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
529
565
|
regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
|
|
530
566
|
helper: '{{#if author.cover}}'
|
|
531
567
|
},
|
|
532
568
|
'GS001-DEPR-CON-AIMG': {
|
|
533
569
|
level: 'error',
|
|
534
570
|
fatal: true,
|
|
535
|
-
rule: 'Replace
|
|
571
|
+
rule: 'Replace <code>{{#if author.image}}</code> with <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>',
|
|
536
572
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
537
573
|
Instead of <code>{{#if author.image}}</code>, you need to use
|
|
538
574
|
<code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
|
|
539
|
-
|
|
575
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
540
576
|
regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
|
|
541
577
|
helper: '{{#if author.image}}'
|
|
542
578
|
},
|
|
543
579
|
'GS001-DEPR-CON-PAC': {
|
|
544
580
|
level: 'error',
|
|
545
581
|
fatal: true,
|
|
546
|
-
rule: 'Replace
|
|
582
|
+
rule: 'Replace <code>{{#if post.author.cover}}</code> with <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>',
|
|
547
583
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
548
584
|
Instead of <code>{{#if post.author.cover}}</code>, you need to use
|
|
549
585
|
<code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
|
|
550
|
-
|
|
586
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
551
587
|
regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
|
|
552
588
|
helper: '{{#if post.author.cover}}'
|
|
553
589
|
},
|
|
554
590
|
'GS001-DEPR-CON-PAIMG': {
|
|
555
591
|
level: 'error',
|
|
556
592
|
fatal: true,
|
|
557
|
-
rule: 'Replace
|
|
593
|
+
rule: 'Replace <code>{{#if post.author.image}}</code> with <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>',
|
|
558
594
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
559
595
|
Instead of <code>{{#if post.author.image}}</code>, you need to use
|
|
560
596
|
<code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
|
|
561
|
-
|
|
597
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
562
598
|
regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
|
|
563
599
|
helper: '{{#if post.author.image}}'
|
|
564
600
|
},
|
|
565
601
|
'GS001-DEPR-LABS-MEMBERS': {
|
|
566
602
|
level: 'error',
|
|
567
|
-
rule: 'Replace
|
|
568
|
-
details: oneLineTrim`
|
|
569
|
-
|
|
570
|
-
Find more information about the <code>@labs</code> property <a href="${docsBaseUrl}helpers/labs/" target=_blank>here</a>.`,
|
|
603
|
+
rule: 'Replace <code>{{@labs.members}}</code> with <code>{{@site.members_enabled}}</code>',
|
|
604
|
+
details: oneLineTrim`Usage of <code>{{@labs.members}}</code> is no longer supported and should be replaced with <code>{{@site.members_enabled}}</code><br>
|
|
605
|
+
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
571
606
|
regex: /@labs\.members/g,
|
|
572
607
|
helper: '{{@labs.members}}'
|
|
573
608
|
},
|
|
574
609
|
'GS001-DEPR-SPL': {
|
|
575
610
|
level: 'error',
|
|
576
611
|
fatal: true,
|
|
577
|
-
rule: '<code>{{@site.permalinks}}</code>
|
|
612
|
+
rule: 'Remove uses of <code>{{@site.permalinks}}</code>',
|
|
578
613
|
details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
|
|
579
614
|
The <code>{{@site.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
580
615
|
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
@@ -584,7 +619,7 @@ let rules = {
|
|
|
584
619
|
'GS001-DEPR-BPL': {
|
|
585
620
|
level: 'error',
|
|
586
621
|
fatal: true,
|
|
587
|
-
rule: '<code>{{@blog.permalinks}}</code>
|
|
622
|
+
rule: 'Remove uses of <code>{{@blog.permalinks}}</code>',
|
|
588
623
|
details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
|
|
589
624
|
The <code>{{@blog.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
590
625
|
Find more information about Ghost data helpers <a href="${docsBaseUrl}/helpers/#data-helpers" target=_blank>here</a>.`,
|
|
@@ -595,8 +630,7 @@ let rules = {
|
|
|
595
630
|
level: 'error',
|
|
596
631
|
fatal: true,
|
|
597
632
|
rule: 'Replace <code>{{@site.ghost_foot}}</code> with <code>{{ghost_foot}}</code>',
|
|
598
|
-
details: oneLineTrim`The usage of <code>{{@site.ghost_foot}}</code> is
|
|
599
|
-
The <code>{{@site.ghost_foot}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
633
|
+
details: oneLineTrim`The usage of <code>{{@site.ghost_foot}}</code> is no longer supported and should be replaced with <code>{{ghost_foot}}</code>.<br>
|
|
600
634
|
Find more information about the <code>{{ghost_foot}}</code> property <a href="${docsBaseUrl}helpers/ghost_head_foot/" target=_blank>here</a>.`,
|
|
601
635
|
regex: /{{\s*?@site\.ghost_foot\s*?}}/g,
|
|
602
636
|
helper: '{{@site.ghost_foot}}'
|
|
@@ -605,8 +639,7 @@ let rules = {
|
|
|
605
639
|
level: 'error',
|
|
606
640
|
fatal: true,
|
|
607
641
|
rule: 'Replace <code>{{@site.ghost_head}}</code> with <code>{{ghost_head}}</code>',
|
|
608
|
-
details: oneLineTrim`The usage of <code>{{@site.ghost_head}}</code> is
|
|
609
|
-
The <code>{{@site.ghost_head}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
642
|
+
details: oneLineTrim`The usage of <code>{{@site.ghost_head}}</code> is no longer supported and should be replaced with <code>{{ghost_head}}</code>.<br>
|
|
610
643
|
Find more information about the <code>{{ghost_head}}</code> property <a href="${docsBaseUrl}helpers/ghost_head_foot/" target=_blank>here</a>.`,
|
|
611
644
|
regex: /{{\s*?@site\.ghost_head\s*?}}/g,
|
|
612
645
|
helper: '{{@site.ghost_head}}'
|
|
@@ -614,9 +647,8 @@ let rules = {
|
|
|
614
647
|
'GS001-DEPR-LANG': {
|
|
615
648
|
level: 'error',
|
|
616
649
|
fatal: true,
|
|
617
|
-
rule: '
|
|
618
|
-
details: oneLineTrim`
|
|
619
|
-
The <code>{{lang}}</code> helper is removed in v5 version of Ghost and should not be used.
|
|
650
|
+
rule: 'Replace <code>{{lang}}</code> with <code>{{@site.locale}}</code>',
|
|
651
|
+
details: oneLineTrim`The usage of <code>{{lang}}</code> is no longer supported and should be replaced with <code>{{@site.locale}}</code>.<br>
|
|
620
652
|
Find more information about the <code>@site.locale</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
621
653
|
regex: /{{\s*?lang\s*?}}/g,
|
|
622
654
|
helper: '{{lang}}'
|
|
@@ -624,9 +656,8 @@ let rules = {
|
|
|
624
656
|
'GS001-DEPR-SITE-LANG': {
|
|
625
657
|
level: 'error',
|
|
626
658
|
fatal: false,
|
|
627
|
-
rule: '
|
|
628
|
-
details: oneLineTrim`
|
|
629
|
-
The <code>{{@site.lang}}</code> helper is removed in v5 version of Ghost and should not be used.
|
|
659
|
+
rule: 'Replace <code>{{@site.lang}}</code> with <code>{{@site.locale}}</code>',
|
|
660
|
+
details: oneLineTrim`The usage of <code>{{@site.lang}}</code> is no longer supported and shoud be replaced with <code>{{@site.locale}}</code>.<br>
|
|
630
661
|
Find more information about the <code>@site.locale</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
631
662
|
regex: /@site\.lang/g,
|
|
632
663
|
helper: '{{@site.lang}}'
|
|
@@ -634,8 +665,8 @@ let rules = {
|
|
|
634
665
|
'GS001-DEPR-USER-GET': {
|
|
635
666
|
level: 'error',
|
|
636
667
|
fatal: true,
|
|
637
|
-
rule:
|
|
638
|
-
details: oneLineTrim`The usage of <code>{{#get "users"}}</code> is
|
|
668
|
+
rule: `Replace <code>{{#get "users"}}</code> with <code>{{#get "authors"}}</code>`,
|
|
669
|
+
details: oneLineTrim`The usage of <code>{{#get "users"}}</code> is no longer supported and should be replaced with <code>{{#get "authors"}}</code>.<br>
|
|
639
670
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
640
671
|
regex: /{{\s*?#get ("|')\s*users("|')\s*/g,
|
|
641
672
|
helper: '{{#get "users"}}'
|
|
@@ -644,7 +675,7 @@ let rules = {
|
|
|
644
675
|
level: 'error',
|
|
645
676
|
fatal: true,
|
|
646
677
|
rule: 'Replace <code>{{error.code}}</code> with <code>{{error.statusCode}}</code>',
|
|
647
|
-
details: oneLineTrim`The usage of <code>{{error.code}}</code> is
|
|
678
|
+
details: oneLineTrim`The usage of <code>{{error.code}}</code> is no longer supported and should be replaced with <code>{{error.statusCode}}</code>.<br>
|
|
648
679
|
When in <code>error</code> context, e. g. in the <code>error.hbs</code> template, replace <code>{{code}}</code> with <code>{{statusCode}}</code>.<br>
|
|
649
680
|
Find more information about the <code>error.hbs</code> template <a href="${docsBaseUrl}structure/#errorhbs" target=_blank>here</a>.`,
|
|
650
681
|
regex: /{{\s*?(?:error\.)?(code)\s*?}}/g,
|
|
@@ -654,7 +685,7 @@ let rules = {
|
|
|
654
685
|
level: 'error',
|
|
655
686
|
fatal: true,
|
|
656
687
|
rule: 'Replace <code>{{[#].currency_symbol}}</code> with <code>{{price currency=currency}}</code>.',
|
|
657
|
-
details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute
|
|
688
|
+
details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute is no longer supported in favour of passing the currency to updated <code>{{price}}</code> helper.
|
|
658
689
|
Find more information about the updated <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
|
|
659
690
|
helper: '{{[#].currency_symbol}}',
|
|
660
691
|
regex: /currency_symbol/g
|
|
@@ -677,5 +708,12 @@ rules = _.each(_.merge({}, previousRules, rules), function replaceDocsUrl(value)
|
|
|
677
708
|
module.exports = {
|
|
678
709
|
knownHelpers: knownHelpers,
|
|
679
710
|
templates: templates,
|
|
680
|
-
rules: rules
|
|
711
|
+
rules: rules,
|
|
712
|
+
/**
|
|
713
|
+
* Copy of Ghost defaults for https://github.com/TryGhost/Ghost/blob/e25f1df0ae551c447da0d319bae06eadf9665444/core/frontend/services/theme-engine/config/defaults.json
|
|
714
|
+
*/
|
|
715
|
+
defaultPackageJSON: {
|
|
716
|
+
posts_per_page: 5,
|
|
717
|
+
card_assets: true
|
|
718
|
+
}
|
|
681
719
|
};
|