gscan 4.28.0 → 4.29.2

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/lib/specs/v1.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * This file contains details of the theme API spec, in a format that can be used by GScan
5
5
  */
6
6
  const oneLineTrim = require('common-tags/lib/oneLineTrim');
7
- const docsBaseUrl = `https://ghost.org/docs/api/handlebars-themes/`;
7
+ const docsBaseUrl = `https://ghost.org/docs/themes/`;
8
8
  let knownHelpers, templates, rules, ruleNext; // eslint-disable-line no-unused-vars
9
9
 
10
10
  knownHelpers = [
@@ -100,44 +100,44 @@ rules = {
100
100
  Depending on the context of the <code>{{img_url}}</code> helper you would need to use e. g. <br><br><code>{{#post}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{img_url feature_image}}<br>{{/post}}</code><br><br>to render the feature image of the blog post.<br>
101
101
  <br><b>If you are using <code>{{if image}}</code></b>, then you have to replace it with e.g. <code>{{if feature_image}}.</code>
102
102
  <br><br>Find more information about the <code>{{img_url}}</code> helper <a href="${docsBaseUrl}helpers/img_url/" target=_blank>here</a> and
103
- read more about Ghost's usage of contexts <a href="${docsBaseUrl}context/" target=_blank>here</a>.`,
103
+ read more about Ghost's usage of contexts <a href="${docsBaseUrl}contexts/" target=_blank>here</a>.`,
104
104
  regex: /{{\s*?image\b[\w\s='"]*?}}/g,
105
105
  helper: '{{image}}'
106
106
  },
107
107
  'GS001-DEPR-COV': {
108
108
  level: 'error',
109
- rule: 'Replace the <code>{{cover}}</code> helper with <code>{{cover_image}}</code>',
109
+ rule: 'Replace <code>{{cover}}</code> with <code>{{cover_image}}</code>',
110
110
  fatal: true,
111
111
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>. To render the cover image in author context, you need to use<br><br>
112
112
  <code>{{#author}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{cover_image}}<br>{{/author}}</code><br><br>
113
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.<br>
113
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.<br>
114
114
  To render the cover image of your blog, just use <code>{{@site.cover_image}}</code>. See <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
115
115
  regex: /{{\s*?cover\s*?}}/g,
116
116
  helper: '{{cover}}'
117
117
  },
118
118
  'GS001-DEPR-AIMG': {
119
119
  level: 'error',
120
- rule: 'Replace the <code>{{author.image}}</code> helper with <code>{{author.profile_image}}</code>',
120
+ rule: 'Replace <code>{{author.image}}</code> with <code>{{author.profile_image}}</code>',
121
121
  fatal: true,
122
122
  details: oneLineTrim`The <code>image</code> attribute in author context was replaced with <code>profile_image</code>.<br>
123
123
  Instead of <code>{{author.image}}</code> you need to use <code>{{author.profile_image}}</code>.<br>
124
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
124
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
125
125
  regex: /{{\s*?author\.image\s*?}}/g,
126
126
  helper: '{{author.image}}'
127
127
  },
128
128
  'GS001-DEPR-PIMG': {
129
129
  level: 'error',
130
- rule: 'Replace the <code>{{post.image}}</code> helper with <code>{{post.feature_image}}</code>',
130
+ rule: 'Replace <code>{{post.image}}</code> with <code>{{post.feature_image}}</code>',
131
131
  fatal: true,
132
132
  details: oneLineTrim`The <code>image</code> attribute in post context was replaced with <code>feature_image</code>.<br>
133
133
  Instead of <code>{{post.image}}</code> you need to use <code>{{post.feature_image}}</code>.<br>
134
- See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
134
+ See the object attributes of <code>post</code> <a href="${docsBaseUrl}contexts/post/#post-object-attributes" target=_blank>here</a>.`,
135
135
  regex: /{{\s*?post\.image\s*?}}/g,
136
136
  helper: '{{post.image}}'
137
137
  },
138
138
  'GS001-DEPR-BC': {
139
139
  level: 'error',
140
- rule: 'Replace the <code>{{@blog.cover}}</code> helper with <code>{{@site.cover_image}}</code>',
140
+ rule: 'Replace <code>{{@blog.cover}}</code> with <code>{{@site.cover_image}}</code>',
141
141
  fatal: true,
142
142
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
143
143
  Instead of <code>{{@blog.cover}}</code> you need to use <code>{{@site.cover_image}}</code>.<br>
@@ -147,100 +147,100 @@ rules = {
147
147
  },
148
148
  'GS001-DEPR-AC': {
149
149
  level: 'error',
150
- rule: 'Replace the <code>{{author.cover}}</code> helper with <code>{{author.cover_image}}</code>',
150
+ rule: 'Replace <code>{{author.cover}}</code> with <code>{{author.cover_image}}</code>',
151
151
  fatal: true,
152
152
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
153
153
  Instead of <code>{{author.cover}}</code> you need to use <code>{{author.cover_image}}</code>.<br>
154
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
154
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
155
155
  regex: /{{\s*?author\.cover\s*?}}/g,
156
156
  helper: '{{author.cover}}'
157
157
  },
158
158
  'GS001-DEPR-TIMG': {
159
159
  level: 'error',
160
- rule: 'Replace the <code>{{tag.image}}</code> helper with <code>{{tag.feature_image}}</code>',
160
+ rule: 'Replace <code>{{tag.image}}</code> with <code>{{tag.feature_image}}</code>',
161
161
  fatal: true,
162
162
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
163
163
  Instead of <code>{{tag.image}}</code> you need to use <code>{{tag.feature_image}}</code>.<br>
164
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
164
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
165
165
  regex: /{{\s*?tag\.image\s*?}}/g,
166
166
  helper: '{{tag.image}}'
167
167
  },
168
168
  'GS001-DEPR-PAIMG': {
169
169
  level: 'error',
170
- rule: 'Replace the <code>{{post.author.image}}</code> helper with <code>{{post.author.feature_image}}</code>',
170
+ rule: 'Replace <code>{{post.author.image}}</code> with <code>{{post.author.feature_image}}</code>',
171
171
  fatal: true,
172
172
  details: oneLineTrim`The <code>image</code> attribute in author context was replaced with <code>feature_image</code>.<br>
173
173
  Instead of <code>{{post.author.image}}</code> you need to use <code>{{post.author.feature_image}}</code>.<br>
174
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
174
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
175
175
  regex: /{{\s*?post\.author\.image\s*?}}/g,
176
176
  helper: '{{post.author.image}}'
177
177
  },
178
178
  'GS001-DEPR-PAC': {
179
179
  level: 'error',
180
- rule: 'Replace the <code>{{post.author.cover}}</code> helper with <code>{{post.author.cover_image}}</code>',
180
+ rule: 'Replace <code>{{post.author.cover}}</code> with <code>{{post.author.cover_image}}</code>',
181
181
  fatal: true,
182
182
  details: oneLineTrim`The <code>cover</code> attribute in author context was replaced with <code>cover_image</code>.<br>
183
183
  Instead of <code>{{post.author.cover}}</code> you need to use <code>{{post.author.cover_image}}</code>.<br>
184
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
184
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
185
185
  regex: /{{\s*?post\.author\.cover\s*?}}/g,
186
186
  helper: '{{post.author.cover}}'
187
187
  },
188
188
  'GS001-DEPR-PTIMG': {
189
189
  level: 'error',
190
- rule: 'Replace the <code>{{post.tags.[#].image}}</code> helper with <code>{{post.tags.[#].feature_image}}</code>',
190
+ rule: 'Replace <code>{{post.tags.[#].image}}</code> with <code>{{post.tags.[#].feature_image}}</code>',
191
191
  fatal: true,
192
192
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
193
193
  Instead of <code>{{post.tags.[#].image}}</code> you need to use <code>{{post.tags.[#].feature_image}}</code>.<br>
194
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
194
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
195
195
  regex: /{{\s*?post\.tags\.\[[0-9]+\]\.image\s*?}}/g,
196
196
  helper: '{{post.tags.[#].image}}'
197
197
  },
198
198
  'GS001-DEPR-TSIMG': {
199
199
  level: 'error',
200
- rule: 'Replace the <code>{{tags.[#].image}}</code> helper with <code>{{tags.[#].feature_image}}</code>',
200
+ rule: 'Replace <code>{{tags.[#].image}}</code> with <code>{{tags.[#].feature_image}}</code>',
201
201
  fatal: true,
202
202
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
203
203
  Instead of <code>{{tags.[#].image}}</code> you need to use <code>{{tags.[#].feature_image}}</code>.<br>
204
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
204
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
205
205
  regex: /{{\s*?tags\.\[[0-9]+\]\.image\s*?}}/g,
206
206
  helper: '{{tags.[#].image}}'
207
207
  },
208
208
  'GS001-DEPR-CON-IMG': {
209
209
  level: 'error',
210
- rule: 'Replace the <code>{{#if image}}</code> helper with <code>{{#if feature_image}}</code>, or <code>' +
210
+ rule: 'Replace <code>{{#if image}}</code> with <code>{{#if feature_image}}</code>, or <code>' +
211
211
  '{{#if profile_image}}</code>',
212
212
  fatal: true,
213
213
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>feature_image</code> and <code>profile_image</code>.<br>
214
- Depending on the <a href="${docsBaseUrl}context/" target=_blank>context</a> you will need to replace it like this:<br><br>
214
+ Depending on the <a href="${docsBaseUrl}contexts/" target=_blank>context</a> you will need to replace it like this:<br><br>
215
215
  <code>{{#author}}<br>
216
216
  &nbsp;&nbsp;&nbsp;&nbsp;{{#if profile_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{profile_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{/if}}<br>
217
217
  {{/author}}</code><br><br>
218
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.<br><br>
218
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.<br><br>
219
219
  <code>{{#post}}<br>
220
220
  &nbsp;&nbsp;&nbsp;&nbsp;{{#if feature_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{feature_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{/if}}<br>
221
221
  {{/post}}</code><br><br>
222
- See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.<br><br>
222
+ See the object attributes of <code>post</code> <a href="${docsBaseUrl}contexts/post/#post-object-attributes" target=_blank>here</a>.<br><br>
223
223
  <code>{{#tag}}<br>
224
224
  &nbsp;&nbsp;&nbsp;&nbsp;{{#if feature_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{feature_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{/if}}<br>
225
225
  {{/tag}}</code><br><br>
226
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
226
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
227
227
  regex: /{{\s*?#if\s*?image\s*?}}/g,
228
228
  helper: '{{#if image}}'
229
229
  },
230
230
  'GS001-DEPR-CON-COV': {
231
231
  level: 'error',
232
- rule: 'Replace the <code>{{#if cover}}</code> helper with <code>{{#if cover_image}}</code>',
232
+ rule: 'Replace <code>{{#if cover}}</code> with <code>{{#if cover_image}}</code>',
233
233
  fatal: true,
234
234
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>. To check for the cover image in author context, you need to use<br><br>
235
235
  <code>{{#if cover_image}}<br>&nbsp;&nbsp;&nbsp;&nbsp;{{cover_image}}<br>{{/if}}</code><br><br>
236
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.<br>
236
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.<br>
237
237
  To check for the cover image of your blog, just use <code>{{#if @site.cover_image}}</code>. See <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
238
238
  regex: /{{\s*?#if\s*?cover\s*?}}/g,
239
239
  helper: '{{#if cover}}'
240
240
  },
241
241
  'GS001-DEPR-CON-BC': {
242
242
  level: 'error',
243
- rule: 'Replace the <code>{{#if @blog.cover}}</code> helper with <code>{{#if @site.cover_image}}</code>',
243
+ rule: 'Replace <code>{{#if @blog.cover}}</code> with <code>{{#if @site.cover_image}}</code>',
244
244
  fatal: true,
245
245
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
246
246
  Instead of <code>{{#if @blog.cover}}</code> you need to use <code>{{#if @site.cover_image}}</code>.<br>
@@ -250,71 +250,71 @@ rules = {
250
250
  },
251
251
  'GS001-DEPR-CON-AC': {
252
252
  level: 'error',
253
- rule: 'Replace the <code>{{#if author.cover}}</code> helper with <code>{{#if author.cover_image}}</code>',
253
+ rule: 'Replace <code>{{#if author.cover}}</code> with <code>{{#if author.cover_image}}</code>',
254
254
  fatal: true,
255
255
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
256
256
  Instead of <code>{{#if author.cover}}</code> you need to use <code>{{#if author.cover_image}}</code>.<br>
257
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
257
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
258
258
  regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
259
259
  helper: '{{#if author.cover}}'
260
260
  },
261
261
  'GS001-DEPR-CON-AIMG': {
262
262
  level: 'error',
263
- rule: 'Replace the <code>{{#if author.image}}</code> helper with <code>{{#if author.profile_image}}</code>',
263
+ rule: 'Replace <code>{{#if author.image}}</code> with <code>{{#if author.profile_image}}</code>',
264
264
  fatal: true,
265
265
  details: oneLineTrim`The <code>image</code> attribute in author context was replaced with <code>profile_image</code>.<br>
266
266
  Instead of <code>{{#if author.image}}</code> you need to use <code>{{#if author.profile_image}}</code>.<br>
267
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
267
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
268
268
  regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
269
269
  helper: '{{#if author.image}}'
270
270
  },
271
271
  'GS001-DEPR-CON-PAC': {
272
272
  level: 'error',
273
- rule: 'Replace the <code>{{#if post.author.cover}}</code> helper with <code>{{#if post.author.cover_image}}</code>',
273
+ rule: 'Replace <code>{{#if post.author.cover}}</code> with <code>{{#if post.author.cover_image}}</code>',
274
274
  fatal: true,
275
275
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
276
276
  Instead of <code>{{#if post.author.cover}}</code> you need to use <code>{{#if post.author.cover_image}}</code>.<br>
277
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
277
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
278
278
  regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
279
279
  helper: '{{#if post.author.cover}}'
280
280
  },
281
281
  'GS001-DEPR-CON-PAIMG': {
282
282
  level: 'error',
283
- rule: 'Replace the <code>{{#if post.author.image}}</code> helper with <code>{{#if post.author.profile_image}}</code>',
283
+ rule: 'Replace <code>{{#if post.author.image}}</code> with <code>{{#if post.author.profile_image}}</code>',
284
284
  fatal: true,
285
285
  details: oneLineTrim`The <code>image</code> attribute in author context was replaced with <code>profile_image</code>.<br>
286
286
  Instead of <code>{{#if post.author.image}}</code> you need to use <code>{{#if post.author.profile_image}}</code>.<br>
287
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
287
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
288
288
  regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
289
289
  helper: '{{#if post.author.image}}'
290
290
  },
291
291
  'GS001-DEPR-CON-TIMG': {
292
292
  level: 'error',
293
- rule: 'Replace the <code>{{#if tag.image}}</code> helper with <code>{{#if tag.feature_image}}</code>',
293
+ rule: 'Replace <code>{{#if tag.image}}</code> with <code>{{#if tag.feature_image}}</code>',
294
294
  fatal: true,
295
295
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
296
296
  Instead of <code>{{#if tag.image}}</code> you need to use <code>{{#if tag.feature_image}}</code>.<br>
297
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
297
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
298
298
  regex: /{{\s*?#if\s*?tag\.image\s*?}}/g,
299
299
  helper: '{{#if tag.image}}'
300
300
  },
301
301
  'GS001-DEPR-CON-PTIMG': {
302
302
  level: 'error',
303
- rule: 'Replace the <code>{{#if post.tags.[#].image}}</code> helper with <code>{{#if post.tags.[#].feature_image}}</code>',
303
+ rule: 'Replace <code>{{#if post.tags.[#].image}}</code> with <code>{{#if post.tags.[#].feature_image}}</code>',
304
304
  fatal: true,
305
305
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
306
306
  Instead of <code>{{#if post.tags.[#].image}}</code> you need to use <code>{{#if post.tags.[#].feature_image}}</code>.<br>
307
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
307
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
308
308
  regex: /{{\s*?#if\s*?post\.tags\.\[[0-9]+\].image\s*?}}/g,
309
309
  helper: '{{#if posts.tags.[#].image}}'
310
310
  },
311
311
  'GS001-DEPR-CON-TSIMG': {
312
312
  level: 'error',
313
- rule: 'Replace the <code>{{#if tags.[#].image}}</code> helper with <code>{{#if tags.[#].feature_image}}</code>',
313
+ rule: 'Replace <code>{{#if tags.[#].image}}</code> with <code>{{#if tags.[#].feature_image}}</code>',
314
314
  fatal: true,
315
315
  details: oneLineTrim`The <code>image</code> attribute in tag context was replaced with <code>feature_image</code>.<br>
316
316
  Instead of <code>{{#if tags.[#].image}}</code> you need to use <code>{{#if tags.[#].feature_image}}</code>.<br>
317
- See the object attributes of <code>tags</code> <a href="${docsBaseUrl}context/tag/#tag-object-attributes" target=_blank>here</a>.`,
317
+ See the object attributes of <code>tags</code> <a href="${docsBaseUrl}contexts/tag/#tag-object-attributes" target=_blank>here</a>.`,
318
318
  regex: /{{\s*?#if\s*?tags\.\[[0-9]+\].image\s*?}}/g,
319
319
  helper: '{{#if tags.[#].image}}'
320
320
  },
@@ -323,7 +323,7 @@ rules = {
323
323
  rule: 'Replace <code>{{@blog.posts_per_page}}</code> with <code>{{@config.posts_per_page}}</code>',
324
324
  details: oneLineTrim`The global <code>{{@blog.posts_per_page}}</code> property was replaced with <code>{{@config.posts_per_page}}</code>.<br>
325
325
  Read <a href="${docsBaseUrl}helpers/config/" target=_blank>here</a> about the attribute and
326
- check <a href="${docsBaseUrl}packagejson/" target=_blank>here</a> where you can customise the posts per page setting, as this is now adjustable in your theme.`,
326
+ check <a href="${docsBaseUrl}structure/#packagejson" target=_blank>here</a> where you can customise the posts per page setting, as this is now adjustable in your theme.`,
327
327
  regex: /{{\s*?@blog\.posts_per_page\s*?}}/g,
328
328
  helper: '{{@blog.posts_per_page}}'
329
329
  },
@@ -339,7 +339,7 @@ rules = {
339
339
  level: 'error',
340
340
  rule: 'Replace <code>.archive-template</code> with the <code>.paged</code> CSS class',
341
341
  details: oneLineTrim`The <code>.archive-template</code> CSS class was replaced with the <code>.paged</code>. Please replace this in your stylesheet.<br>
342
- See the <a href="${docsBaseUrl}context/" target=_blank>context table</a> to check which classes Ghost uses for each context.`,
342
+ See the <a href="${docsBaseUrl}contexts/" target=_blank>context table</a> to check which classes Ghost uses for each context.`,
343
343
  regex: /\.archive-template[\s{]/g,
344
344
  className: '.archive-template',
345
345
  css: true
@@ -348,7 +348,7 @@ rules = {
348
348
  level: 'error',
349
349
  rule: 'Replace <code>.page-template-slug</code> with the <code>.page-slug</code> css class',
350
350
  details: oneLineTrim`The <code>.page-template-slug</code> CSS class was replaced with the <code>.page-slug</code>. Please replace this in your stylesheet.<br>
351
- See the <a href="${docsBaseUrl}context/" target=_blank>context table</a> to check which classes Ghost uses for each context.`,
351
+ See the <a href="${docsBaseUrl}contexts/" target=_blank>context table</a> to check which classes Ghost uses for each context.`,
352
352
  regex: /\.page-template-\w+[\s{]/g,
353
353
  className: '.page-template-slug',
354
354
  css: true
@@ -394,13 +394,13 @@ rules = {
394
394
  level: 'error',
395
395
  rule: '<code>package.json</code> file should be present',
396
396
  details: oneLineTrim`You should provide a <code>package.json</code> file for your theme.<br>
397
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
397
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
398
398
  },
399
399
  'GS010-PJ-PARSE': {
400
400
  level: 'error',
401
401
  rule: '<code>package.json</code> file can be parsed',
402
402
  details: oneLineTrim`Your <code>package.json</code> file couldn't be parsed. This is mostly caused by a missing or unnecessary <code>','</code> or the wrong usage of <code>'""'</code>.<br>
403
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.<br>
403
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.<br>
404
404
  A good reference for your <code>package.json</code> file is always the latest version of <a href="https://github.com/TryGhost/Casper/blob/master/package.json" target=_blank>Casper</a>.`
405
405
  },
406
406
  'GS010-PJ-NAME-LC': {
@@ -408,51 +408,51 @@ rules = {
408
408
  rule: '<code>package.json</code> property <code>"name"</code> must be lowercase',
409
409
  details: oneLineTrim`The property <code>"name"</code> in your <code>package.json</code> file must be lowercase.<br>
410
410
  Good examples are: <code>"my-theme"</code> or <code>"theme"</code> rather than <code>"My Theme"</code> or <code>"Theme"</code>.<br>
411
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
411
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
412
412
  },
413
413
  'GS010-PJ-NAME-HY': {
414
414
  level: 'error',
415
415
  rule: '<code>package.json</code> property <code>"name"</code> must be hyphenated',
416
416
  details: oneLineTrim`The property <code>"name"</code> in your <code>package.json</code> file must be hyphenated.<br>
417
417
  Please use <code>"my-theme"</code> rather than <code>"My Theme"</code> or <code>"my theme"</code>.<br>
418
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
418
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
419
419
  },
420
420
  'GS010-PJ-NAME-REQ': {
421
421
  level: 'error',
422
422
  rule: '<code>package.json</code> property <code>"name"</code> is required',
423
423
  details: oneLineTrim`Please add the property <code>"name"</code> to your <code>package.json</code>. E.g. <code>{"name": "my-theme"}</code>.<br>
424
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
424
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
425
425
  },
426
426
  'GS010-PJ-VERSION-SEM': {
427
427
  level: 'error',
428
428
  rule: '<code>package.json</code> property <code>"version"</code> must be semver compliant',
429
429
  details: oneLineTrim`The property <code>"version"</code> in your <code>package.json</code> file must be semver compliant. E.g. <code>{"version": "1.0.0"}</code>.<br>
430
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
430
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
431
431
  },
432
432
  'GS010-PJ-VERSION-REQ': {
433
433
  level: 'error',
434
434
  rule: '<code>package.json</code> property <code>"version"</code> is required',
435
435
  details: oneLineTrim`Please add the property <code>"version"</code> to your <code>package.json</code>. E.g. <code>{"version": "1.0.0"}</code>.<br>
436
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
436
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
437
437
  },
438
438
  'GS010-PJ-AUT-EM-VAL': {
439
439
  level: 'error',
440
440
  rule: '<code>package.json</code> property <code>"author.email"</code> must be valid',
441
441
  details: oneLineTrim`The property <code>"author.email"</code> in your <code>package.json</code> file must a valid email. E.g. <code>{"author": {"email": "hello@example.com"}}</code>.<br>
442
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
442
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
443
443
  },
444
444
  'GS010-PJ-CONF-PPP': {
445
445
  level: 'recommendation',
446
446
  rule: '<code>package.json</code> property <code>"config.posts_per_page"</code> is recommended. Otherwise, it falls back to 5',
447
447
  details: oneLineTrim`Please add <code>"posts_per_page"</code> to your <code>package.json</code>. E.g. <code>{"config": { "posts_per_page": 5}}</code>.<br>
448
448
  If no <code>"posts_per_page"</code> property is provided, Ghost will use its default setting of 5 posts per page.<br>
449
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
449
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
450
450
  },
451
451
  'GS010-PJ-CONF-PPP-INT': {
452
452
  level: 'error',
453
453
  rule: '<code>package.json</code> property <code>"config.posts_per_page"</code> must be a number above 0',
454
454
  details: oneLineTrim`The property <code>"config.posts_per_page"</code> in your <code>package.json</code> file must be a number greater than zero. E.g. <code>{"config": { "posts_per_page": 5}}</code>.<br>
455
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
455
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
456
456
  },
457
457
  'GS010-PJ-AUT-EM-REQ': {
458
458
  level: 'error',
@@ -461,14 +461,14 @@ rules = {
461
461
  The email is required so that themes which are distributed (either free or paid) have a method of contacting the author so users can get support and more importantly so that>
462
462
  Ghost can reach out about breaking changes and security updates.<br>
463
463
  The <code>package.json</code> file is <strong>NOT</strong> accessible when uploaded to a blog so if the theme is only uploaded to a single blog, no one will see this email address.<br>
464
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
464
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
465
465
  },
466
466
  'GS020-INDEX-REQ': {
467
467
  level: 'error',
468
468
  rule: 'A template file called <code>index.hbs</code> must be present',
469
469
  fatal: true,
470
470
  details: oneLineTrim`Your theme must have a template file called <code>index.hbs</code>.<br>
471
- Read <a href="${docsBaseUrl}context/" target=_blank>here</a> more about the required template structure and <code>index.hbs</code> in <a href="${docsBaseUrl}context/index/" target=_blank>particular</a>.`,
471
+ Read <a href="${docsBaseUrl}contexts/" target=_blank>here</a> more about the required template structure and <code>index.hbs</code> in <a href="${docsBaseUrl}contexts/index-context/" target=_blank>particular</a>.`,
472
472
  path: 'index.hbs'
473
473
  },
474
474
  'GS020-POST-REQ': {
@@ -476,14 +476,14 @@ rules = {
476
476
  rule: 'A template file called <code>post.hbs</code> must be present',
477
477
  fatal: true,
478
478
  details: oneLineTrim`Your theme must have a template file called <code>index.hbs</code>.<br>
479
- Read <a href="${docsBaseUrl}templates" target=_blank>here</a> more about the required template structure and <code>post.hbs</code> in <a href="${docsBaseUrl}templates#section-post-hbs" target=_blank>particular</a>.`,
479
+ Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the required template structure and <code>post.hbs</code> in <a href="${docsBaseUrl}structure/#posthbs" target=_blank>particular</a>.`,
480
480
  path: 'post.hbs'
481
481
  },
482
482
  'GS020-DEF-REC': {
483
483
  level: 'recommendation',
484
484
  rule: 'Provide a default layout template called default.hbs',
485
485
  details: oneLineTrim`It is recommended that your theme has a template file called <code>default.hbs</code>.<br>
486
- Read <a href="${docsBaseUrl}templates" target=_blank>here</a> more about the recommended template structure and <code>default.hbs</code> in <a href="${docsBaseUrl}templates#section-default-hbs" target=_blank>particular</a>.`,
486
+ Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the recommended template structure and <code>default.hbs</code> in <a href="${docsBaseUrl}structure/#defaulthbs" target=_blank>particular</a>.`,
487
487
  path: 'default.hbs'
488
488
  },
489
489
  'GS030-ASSET-REQ': {