gscan 4.29.1 → 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/app/tpl/error.hbs CHANGED
@@ -7,6 +7,6 @@
7
7
  <p>{{context}}</p>
8
8
  <p>{{details}}</p>
9
9
  <p>{{stack}}</p>
10
- <p>Please visit our <a href="https://forum.ghost.org">forum</a> and let us know!</p>
10
+ <p>Please visit our <a href="https://forum.ghost.org/">forum</a> and let us know!</p>
11
11
  </section>
12
12
  </div>
@@ -57,8 +57,8 @@
57
57
 
58
58
  </div>
59
59
  <div class="gh-navbar-right">
60
- <a class="gh-navbar-item" href="https://ghost.org/docs/api/handlebars-themes/" target="blank" rel="noopener">Theme Docs</a>
61
- <a class="gh-navbar-btn gh-btn" href="https://ghost.org"><span>Ghost.org</span></a>
60
+ <a class="gh-navbar-item" href="https://ghost.org/docs/themes/" target="blank" rel="noopener">Theme Docs</a>
61
+ <a class="gh-navbar-btn gh-btn" href="https://ghost.org/"><span>Ghost.org</span></a>
62
62
  </div>
63
63
  </nav>
64
64
  </header>
@@ -99,8 +99,8 @@
99
99
  </nav>
100
100
  <div class="gh-mobilemenu">
101
101
  <a class="gh-navbar-item" href="https://gscan.ghost.org">GScan</a>
102
- <a class="gh-navbar-item" href="https://ghost.org/docs/api/handlebars-themes/">Theme Docs</a>
103
- <a class="gh-navbar-item" href="https://ghost.org">Ghost.org</a>
102
+ <a class="gh-navbar-item" href="https://ghost.org/docs/themes/">Theme Docs</a>
103
+ <a class="gh-navbar-item" href="https://ghost.org/">Ghost.org</a>
104
104
  </div>
105
105
  </header>
106
106
 
@@ -112,9 +112,9 @@
112
112
 
113
113
  <footer class="gh-foot">
114
114
  <div class="gh-foot-support inner">
115
- <div class="gh-support-email" href="https://ghost.org/pricing">
115
+ <div class="gh-support-email" href="https://ghost.org/pricing/">
116
116
  <h4>Ready to upgrade to the best?</h4>
117
- <p>Spend less time running your servers and more time running your site. <strong><a href="https://ghost.org/pricing">Ghost(Pro)</a></strong>
117
+ <p>Spend less time running your servers and more time running your site. <strong><a href="https://ghost.org/pricing/">Ghost(Pro)</a></strong>
118
118
  has got you covered</p>
119
119
  </div>
120
120
  <div class="gh-support-slack">
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
  <div class="gh-foot-content inner">
127
127
  <nav class="gh-foot-min-nav">
128
- <a class="gh-foot-min-item gh-foot-min-logo" href="https://ghost.org">
128
+ <a class="gh-foot-min-item gh-foot-min-logo" href="https://ghost.org/">
129
129
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 294" preserveAspectRatio="xMidYMid meet" class="ghost-orb-logo-wh">
130
130
  <title>Ghost Logo</title>
131
131
  <style>
@@ -154,7 +154,7 @@
154
154
  <a class="gh-foot-min-item" href="https://twitter.com/ghost">@Ghost</a>
155
155
  </nav>
156
156
  <div class="gh-foot-min-back">
157
- <a class="gh-foot-min-item" href="https://ghost.org">Back to Ghost</a>
157
+ <a class="gh-foot-min-item" href="https://ghost.org/">Back to Ghost</a>
158
158
  </div>
159
159
  </div>
160
160
  </footer>
package/bin/cli.js CHANGED
@@ -221,7 +221,7 @@ function outputResults(theme, options) {
221
221
  _.each(theme.results.recommendation, rule => outputResult(rule, options));
222
222
  }
223
223
 
224
- ui.log(`\nGet more help at ${chalk.cyan.underline('https://ghost.org/docs/api/handlebars-themes/')}`);
224
+ ui.log(`\nGet more help at ${chalk.cyan.underline('https://ghost.org/docs/themes/')}`);
225
225
  ui.log(`You can also check theme compatibility at ${chalk.cyan.underline('https://gscan.ghost.org/')}`);
226
226
 
227
227
  // The CLI feature is mainly used to run gscan programatically in tests within themes.
@@ -23,7 +23,7 @@ let rules = {
23
23
  level: 'warning',
24
24
  rule: 'Remove <code>"engines.ghost-api"</code> from <code>package.json</code>.',
25
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>.`
26
+ Find more information about the <code>package.json</code> file <a href="${docsBaseUrl}structure/#packagejson" target=_blank>here</a>.`
27
27
  },
28
28
  'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
29
29
  level: 'error',
@@ -414,7 +414,7 @@ let rules = {
414
414
  rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
415
415
  details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
416
416
  Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
417
- Find more information about the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
417
+ Find more information about the object attributes of <code>post</code> <a href="${docsBaseUrl}contexts/post/#post-object-attributes" target=_blank>here</a>.`,
418
418
  regex: /{{\s*?post\.author_id\s*?}}/g,
419
419
  helper: '{{post.author_id}}'
420
420
  },
@@ -447,7 +447,7 @@ let rules = {
447
447
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
448
448
  Instead of <code>{{author.cover}}</code> you need to use
449
449
  <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
450
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
450
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
451
451
  regex: /{{\s*?author\.cover\s*?}}/g,
452
452
  helper: '{{author.cover}}'
453
453
  },
@@ -458,7 +458,7 @@ let rules = {
458
458
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
459
459
  Instead of <code>{{author.image}}</code>, you need to use
460
460
  <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
461
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
461
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
462
462
  regex: /{{\s*?author\.image\s*?}}/g,
463
463
  helper: '{{author.image}}'
464
464
  },
@@ -469,7 +469,7 @@ let rules = {
469
469
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
470
470
  Instead of <code>{{post.author.cover}}</code>, you need to use
471
471
  <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
472
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
472
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
473
473
  regex: /{{\s*?post\.author\.cover\s*?}}/g,
474
474
  helper: '{{post.author.cover}}'
475
475
  },
@@ -526,7 +526,7 @@ let rules = {
526
526
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
527
527
  Instead of <code>{{post.author.image}}</code>, you need to use
528
528
  <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
529
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
529
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
530
530
  regex: /{{\s*?post\.author\.image\s*?}}/g,
531
531
  helper: '{{post.author.image}}'
532
532
  },
@@ -561,7 +561,7 @@ let rules = {
561
561
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
562
562
  Instead of <code>{{#if author.cover}}</code>, you need to use
563
563
  <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
564
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
564
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
565
565
  regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
566
566
  helper: '{{#if author.cover}}'
567
567
  },
@@ -572,7 +572,7 @@ let rules = {
572
572
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
573
573
  Instead of <code>{{#if author.image}}</code>, you need to use
574
574
  <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
575
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
575
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
576
576
  regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
577
577
  helper: '{{#if author.image}}'
578
578
  },
@@ -583,7 +583,7 @@ let rules = {
583
583
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
584
584
  Instead of <code>{{#if post.author.cover}}</code>, you need to use
585
585
  <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
586
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
586
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
587
587
  regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
588
588
  helper: '{{#if post.author.cover}}'
589
589
  },
@@ -594,7 +594,7 @@ let rules = {
594
594
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
595
595
  Instead of <code>{{#if post.author.image}}</code>, you need to use
596
596
  <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
597
- Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
597
+ Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
598
598
  regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
599
599
  helper: '{{#if post.author.image}}'
600
600
  },
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,7 +100,7 @@ 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
  },
@@ -110,7 +110,7 @@ rules = {
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}}'
@@ -121,7 +121,7 @@ rules = {
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
  },
@@ -131,7 +131,7 @@ rules = {
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
  },
@@ -151,7 +151,7 @@ rules = {
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
  },
@@ -161,7 +161,7 @@ rules = {
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
  },
@@ -171,7 +171,7 @@ rules = {
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
  },
@@ -181,7 +181,7 @@ rules = {
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
  },
@@ -191,7 +191,7 @@ rules = {
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
  },
@@ -201,7 +201,7 @@ rules = {
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
  },
@@ -211,19 +211,19 @@ rules = {
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
  },
@@ -233,7 +233,7 @@ rules = {
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}}'
@@ -254,7 +254,7 @@ rules = {
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
  },
@@ -264,7 +264,7 @@ rules = {
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
  },
@@ -274,7 +274,7 @@ rules = {
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
  },
@@ -284,7 +284,7 @@ rules = {
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
  },
@@ -294,7 +294,7 @@ rules = {
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
  },
@@ -304,7 +304,7 @@ rules = {
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
  },
@@ -314,7 +314,7 @@ rules = {
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': {
package/lib/specs/v2.js CHANGED
@@ -2,7 +2,9 @@ const _ = require('lodash');
2
2
  const oneLineTrim = require('common-tags/lib/oneLineTrim');
3
3
  const previousSpec = require('./v1');
4
4
  const ghostVersions = require('../utils').versions;
5
- const docsBaseUrl = `https://ghost.org/docs/api/handlebars-themes/`;
5
+ const docsBaseUrl = `https://ghost.org/docs/themes/`;
6
+ // TODO: we don't use versioned docs anymore and the previous rules should only contain
7
+ // correct links. The usage of replacing the previousBaseUrl can probably be removed
6
8
  const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.v1.docs}/docs/`;
7
9
  const prevDocsBaseUrlRegEx = new RegExp(prevDocsBaseUrl, 'g');
8
10
 
@@ -16,7 +18,7 @@ function requiredClassRule(strings) {
16
18
 
17
19
  function requiredClassDetails(strings) {
18
20
  return oneLineTrim`The <code>.${strings[0]}</code> CSS class is required otherwise wide images will appear unstyled.
19
- Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}editor/" target=_blank>here</a>.`;
21
+ Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}content/" target=_blank>here</a>.`;
20
22
  }
21
23
 
22
24
  // assign new or overwrite existing knownHelpers, templates, or rules here:
@@ -367,7 +369,7 @@ let rules = {
367
369
  rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
368
370
  details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
369
371
  Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
370
- See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
372
+ See the object attributes of <code>post</code> <a href="${docsBaseUrl}contexts/post/#post-object-attributes" target=_blank>here</a>.`,
371
373
  regex: /{{\s*?post\.author_id\s*?}}/g,
372
374
  helper: '{{post.author_id}}'
373
375
  },
@@ -448,7 +450,7 @@ let rules = {
448
450
  rule: `<code>.kg-card-markdown</code> doesn't exist in current version of Ghost, ensure your theme works without it`,
449
451
  details: oneLineTrim`The <code>.kg-card-markdown</code> CSS class is deprecated and will no longer be used in Ghost.
450
452
  It's recommended to add your own wrapper around the <code>{{content}}</code> helper and target that instead if needed.
451
- Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}editor/" target=_blank>here</a>.`,
453
+ Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}content/" target=_blank>here</a>.`,
452
454
  regex: /\.kg-card-markdown/g,
453
455
  className: '.kg-card-markdown',
454
456
  css: true
@@ -593,7 +595,7 @@ let rules = {
593
595
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
594
596
  Instead of <code>{{author.cover}}</code> you need to use
595
597
  <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
596
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
598
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
597
599
  regex: /{{\s*?author\.cover\s*?}}/g,
598
600
  helper: '{{author.cover}}'
599
601
  },
@@ -603,7 +605,7 @@ let rules = {
603
605
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
604
606
  Instead of <code>{{primary_author.cover}}</code> you need to use
605
607
  <code>{{primary_author.cover_image}}</code>.<br>
606
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
608
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
607
609
  regex: /{{\s*?primary_author\.cover\s*?}}/g,
608
610
  helper: '{{primary_author.cover}}'
609
611
  },
@@ -613,7 +615,7 @@ let rules = {
613
615
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
614
616
  Instead of <code>{{authors.[#].cover}}</code> you need to use
615
617
  <code>{{authors.[#].cover_image}}</code>.<br>
616
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
618
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
617
619
  regex: /{{\s*?authors\.\[[0-9]+\]\.(cover)\s*?}}/g,
618
620
  helper: '{{authors.[#].cover}}'
619
621
  },
@@ -624,7 +626,7 @@ let rules = {
624
626
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
625
627
  Instead of <code>{{author.image}}</code>, you need to use
626
628
  <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
627
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
629
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
628
630
  regex: /{{\s*?author\.image\s*?}}/g,
629
631
  helper: '{{author.image}}'
630
632
  },
@@ -634,7 +636,7 @@ let rules = {
634
636
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
635
637
  Instead of <code>{{primary_author.image}}</code>, you need to use
636
638
  <code>{{primary_author.profile_image}}</code>.<br>
637
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
639
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
638
640
  regex: /{{\s*?primary_author\.(image)\s*?}}/g,
639
641
  helper: '{{primary_author.image}}'
640
642
  },
@@ -644,7 +646,7 @@ let rules = {
644
646
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
645
647
  Instead of <code>{{authors.[#].image}}</code>, you need to use
646
648
  <code>{{authors.[#].profile_image}}</code>.<br>
647
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
649
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
648
650
  regex: /{{\s*?authors\.\[[0-9]+\]\.(cover)\s*?}}/g,
649
651
  helper: '{{authors.[#].image}}'
650
652
  },
@@ -655,7 +657,7 @@ let rules = {
655
657
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
656
658
  Instead of <code>{{post.author.cover}}</code>, you need to use
657
659
  <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
658
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
660
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
659
661
  regex: /{{\s*?post\.author\.cover\s*?}}/g,
660
662
  helper: '{{post.author.cover}}'
661
663
  },
@@ -665,7 +667,7 @@ let rules = {
665
667
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
666
668
  Instead of <code>{{post.primary_author.cover}}</code>, you need to use
667
669
  <code>{{post.primary_author.cover_image}}</code>.<br>
668
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
670
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
669
671
  regex: /{{\s*?post\.primary_author\.cover\s*?}}/g,
670
672
  helper: '{{post.primary_author.cover}}'
671
673
  },
@@ -675,7 +677,7 @@ let rules = {
675
677
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
676
678
  Instead of <code>{{post.authors.[#].cover}}</code>, you need to use
677
679
  <code>{{post.authors.[#].cover_image}}</code>.<br>
678
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
680
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
679
681
  regex: /{{\s*?post\.authors\.\[[0-9]+\]\.(cover)\s*?}}/g,
680
682
  helper: '{{post.authors.[#].cover}}'
681
683
  },
@@ -686,7 +688,7 @@ let rules = {
686
688
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
687
689
  Instead of <code>{{post.author.image}}</code>, you need to use
688
690
  <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
689
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
691
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
690
692
  regex: /{{\s*?post\.author\.image\s*?}}/g,
691
693
  helper: '{{post.author.image}}'
692
694
  },
@@ -696,7 +698,7 @@ let rules = {
696
698
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
697
699
  Instead of <code>{{post.primary_author.image}}</code>, you need to use
698
700
  <code>{{post.primary_author.profile_image}}</code>.<br>
699
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
701
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
700
702
  regex: /{{\s*?post\.primary_author\.image\s*?}}/g,
701
703
  helper: '{{post.primary_author.image}}'
702
704
  },
@@ -706,7 +708,7 @@ let rules = {
706
708
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
707
709
  Instead of <code>{{post.authors.[#].image}}</code>, you need to use
708
710
  <code>{{post.authors.[#].profile_image}}</code>.<br>
709
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
711
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
710
712
  regex: /{{\s*?post\.authors\.\[[0-9]+\]\.(image)\s*?}}/g,
711
713
  helper: '{{post.authors.[#].image}}'
712
714
  },
@@ -717,7 +719,7 @@ let rules = {
717
719
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
718
720
  Instead of <code>{{#if author.cover}}</code>, you need to use
719
721
  <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
720
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
722
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
721
723
  regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
722
724
  helper: '{{#if author.cover}}'
723
725
  },
@@ -728,7 +730,7 @@ let rules = {
728
730
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
729
731
  Instead of <code>{{#if primary_author.cover}}</code>, you need to use
730
732
  <code>{{#if primary_author.cover_image}}</code>.<br>
731
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
733
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
732
734
  regex: /{{\s*?#if\s*?primary_author\.cover\s*?}}/g,
733
735
  helper: '{{#if primary_author.cover}}'
734
736
  },
@@ -739,7 +741,7 @@ let rules = {
739
741
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
740
742
  Instead of <code>{{#if authors.[#].cover}}</code>, you need to use
741
743
  <code>{{#if authors.[#].cover_image}}</code>.<br>
742
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
744
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
743
745
  regex: /{{\s*?#if\s*?authors\.\[[0-9]+\]\.cover\s*?}}/g,
744
746
  helper: '{{#if authors.[#].cover}}'
745
747
  },
@@ -750,7 +752,7 @@ let rules = {
750
752
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
751
753
  Instead of <code>{{#if author.image}}</code>, you need to use
752
754
  <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
753
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
755
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
754
756
  regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
755
757
  helper: '{{#if author.image}}'
756
758
  },
@@ -760,7 +762,7 @@ let rules = {
760
762
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
761
763
  Instead of <code>{{#if primary_author.image}}</code>, you need to use
762
764
  <code>{{#if primary_author.profile_image}}</code>.<br>
763
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
765
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
764
766
  regex: /{{\s*?#if\s*?primary_author\.image\s*?}}/g,
765
767
  helper: '{{#if primary_author.image}}'
766
768
  },
@@ -770,7 +772,7 @@ let rules = {
770
772
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
771
773
  Instead of <code>{{#if authors.[#].image}}</code>, you need to use
772
774
  <code>{{#if authors.[#].profile_image}}</code>.<br>
773
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
775
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
774
776
  regex: /{{\s*?#if\s*?authors\.\[[0-9]+\]\.image\s*?}}/g,
775
777
  helper: '{{#if authors.[#].image}}'
776
778
  },
@@ -781,7 +783,7 @@ let rules = {
781
783
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
782
784
  Instead of <code>{{#if post.author.cover}}</code>, you need to use
783
785
  <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
784
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
786
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
785
787
  regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
786
788
  helper: '{{#if post.author.cover}}'
787
789
  },
@@ -791,7 +793,7 @@ let rules = {
791
793
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
792
794
  Instead of <code>{{#if post.primary_author.cover}}</code>, you need to use
793
795
  <code>{{#if post.primary_author.cover_image}}</code>.<br>
794
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
796
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
795
797
  regex: /{{\s*?#if\s*?post\.primary_author\.cover\s*?}}/g,
796
798
  helper: '{{#if post.primary_author.cover}}'
797
799
  },
@@ -801,7 +803,7 @@ let rules = {
801
803
  details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
802
804
  Instead of <code>{{#if post.authors.[#].cover}}</code>, you need to use
803
805
  <code>{{#if post.authors.[#].cover_image}}</code>.<br>
804
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
806
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
805
807
  regex: /{{\s*?#if\s*?post\.authors\.\[[0-9]+\]\.cover\s*?}}/g,
806
808
  helper: '{{#if post.authors.[#].cover}}'
807
809
  },
@@ -812,7 +814,7 @@ let rules = {
812
814
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
813
815
  Instead of <code>{{#if post.author.image}}</code>, you need to use
814
816
  <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
815
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
817
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
816
818
  regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
817
819
  helper: '{{#if post.author.image}}'
818
820
  },
@@ -822,7 +824,7 @@ let rules = {
822
824
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
823
825
  Instead of <code>{{#if post.primary_author.image}}</code>, you need to use
824
826
  <code>{{#if post.primary_author.profile_image}}</code>.<br>
825
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
827
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
826
828
  regex: /{{\s*?#if\s*?post\.primary_author\.image\s*?}}/g,
827
829
  helper: '{{#if post.primary_author.image}}'
828
830
  },
@@ -832,7 +834,7 @@ let rules = {
832
834
  details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
833
835
  Instead of <code>{{#if post.authors.[#].image}}</code>, you need to use
834
836
  <code>{{#if post.authors.[#].profile_image}}</code>.<br>
835
- See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
837
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}contexts/author/#author-object-attributes" target=_blank>here</a>.`,
836
838
  regex: /{{\s*?#if\s*?post\.authors\.\[[0-9]+\]\.image\s*?}}/g,
837
839
  helper: '{{#if post.authors.[#].image}}'
838
840
  },
@@ -841,7 +843,7 @@ let rules = {
841
843
  level: 'warning',
842
844
  rule: '<code>package.json</code> property <code>keywords</code> should contain <code>ghost-theme</code>',
843
845
  details: oneLineTrim`The property <code>keywords</code> in your <code>package.json</code> file must contain <code>ghost-theme</code>. E.g. <code>{"keywords": ["ghost-theme"]}</code>.<br>
844
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
846
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
845
847
  }
846
848
  };
847
849
 
package/lib/specs/v3.js CHANGED
@@ -2,8 +2,9 @@ const _ = require('lodash');
2
2
  const oneLineTrim = require('common-tags/lib/oneLineTrim');
3
3
  const previousSpec = require('./v2');
4
4
  const ghostVersions = require('../utils').versions;
5
- const docsBaseUrl = `https://ghost.org/docs/api/handlebars-themes/`;
6
- const faqBaseUrl = `https://ghost.org/faq/`;
5
+ const docsBaseUrl = `https://ghost.org/docs/themes/`;
6
+ // TODO: we don't use versioned docs anymore and the previous rules should only contain
7
+ // correct links. The usage of replacing the previousBaseUrl can probably be removed
7
8
  const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.v2.docs}/docs/`;
8
9
  const prevDocsBaseUrlRegEx = new RegExp(prevDocsBaseUrl, 'g');
9
10
 
@@ -21,14 +22,14 @@ let rules = {
21
22
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is recommended. Otherwise, it falls back to "v3"',
22
23
  details: oneLineTrim`Please add <code>"ghost-api"</code> to your <code>package.json</code>. E.g. <code>{"engines": {"ghost-api": "v3"}}</code>.<br>
23
24
  If no <code>"ghost-api"</code> property is provided, Ghost will use its default setting of "v3" Ghost API.<br>
24
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
25
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
25
26
  },
26
27
  'GS010-PJ-GHOST-API-V01': {
27
28
  level: 'error',
28
29
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is incompatible with current version of Ghost API and will fall back to "v3"',
29
30
  details: oneLineTrim`Please change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v3"}}</code>.<br>
30
31
  If <code>"ghost-api"</code> property is left at "v0.1", Ghost will use its default setting of "v3".<br>
31
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
32
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
32
33
  },
33
34
  'GS001-DEPR-ESC': {
34
35
  level: 'error',
@@ -43,7 +44,7 @@ let rules = {
43
44
  level: 'error',
44
45
  rule: 'The v0.1 API and <code>ghost.url.api()</code> JavaScript helper have been removed.',
45
46
  details: oneLineTrim`The v0.1 API & Public API Beta have been removed, along with the <code>public/ghost-sdk.min.js</code> file & the <code>ghost.url.api()</code> helper.<br>
46
- All code relying on the v0.1 API must be upgraded to use the <a href="${faqBaseUrl}upgrades/" target=_blank>new API</a>.`,
47
+ All code relying on the v0.1 API must be upgraded to use the <a href="https://ghost.org/docs/changes/" target=_blank>new API</a>.`,
47
48
  regex: /ghost\.url\.api/g
48
49
  },
49
50
  'GS070-VALID-TRANSLATIONS': {
package/lib/specs/v4.js CHANGED
@@ -3,6 +3,8 @@ const oneLineTrim = require('common-tags/lib/oneLineTrim');
3
3
  const previousSpec = require('./v3');
4
4
  const ghostVersions = require('../utils').versions;
5
5
  const docsBaseUrl = `https://ghost.org/docs/themes/`;
6
+ // TODO: we don't use versioned docs anymore and the previous rules should only contain
7
+ // correct links. The usage of replacing the previousBaseUrl can probably be removed
6
8
  const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.v3.docs}/docs/`;
7
9
  const prevDocsBaseUrlRegEx = new RegExp(prevDocsBaseUrl, 'g');
8
10
 
@@ -15,7 +17,7 @@ function cssCardRule(cardName, className) {
15
17
  level: 'warning',
16
18
  rule: `The <code>.${className}</code> CSS class is required to appear styled in your theme`,
17
19
  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>.`,
20
+ Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}content/" target=_blank>here</a>.`,
19
21
  regex: new RegExp(`\\.${className}`, 'g'),
20
22
  className: `.${className}`,
21
23
  css: true,
@@ -33,75 +35,75 @@ let rules = {
33
35
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is deprecated.',
34
36
  details: oneLineTrim`Remove <code>"ghost-api"</code> from your <code>package.json</code>.<br>
35
37
  The <code>ghost-api</code> support will be removed in next major version of Ghost and should not be used.
36
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
38
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
37
39
  },
38
40
  'GS010-PJ-GHOST-API-V01': {
39
41
  level: 'error',
40
42
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is incompatible with current version of Ghost API and will fall back to "v4"',
41
43
  details: oneLineTrim`Change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v4"}}</code>.<br>
42
44
  If <code>"ghost-api"</code> property is left at "v0.1", Ghost will use its default setting of "v4".<br>
43
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
45
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
44
46
  },
45
47
  'GS010-PJ-GHOST-API-V2': {
46
48
  level: 'warning',
47
49
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is using a deprecated version of Ghost API',
48
50
  details: oneLineTrim`Change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v4"}}</code>.<br>
49
51
  If <code>"ghost-api"</code> property is left at "v2", it will stop working with next major version upgrade and default to v5.<br>
50
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
52
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
51
53
  },
52
54
  'GS010-PJ-CUST-THEME-TOTAL-SETTINGS': {
53
55
  level: 'error',
54
56
  rule: '<code>package.json</code> property <code>"config.custom"</code> contains too many settings',
55
57
  details: oneLineTrim`Remove key from <code>"config.custom"</code> in your <code>package.json</code> to have less than or exactly 15 settings.<br>
56
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
58
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
57
59
  },
58
60
  'GS010-PJ-CUST-THEME-SETTINGS-CASE': {
59
61
  level: 'error',
60
62
  rule: '<code>package.json</code> property <code>"config.custom"</code> contains a property that isn\'t snake-cased',
61
63
  details: oneLineTrim`Rewrite all property in <code>"config.custom"</code> in your <code>package.json</code> in snake case.<br>
62
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
64
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
63
65
  },
64
66
  'GS010-PJ-CUST-THEME-SETTINGS-TYPE': {
65
67
  level: 'error',
66
68
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"type"</code>.',
67
69
  details: oneLineTrim`Only use the following types: <code>"select"</code>, <code>"boolean"</code>, <code>"color"</code>, <code>"image"</code>, <code>"text"</code>.<br>
68
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
70
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
69
71
  },
70
72
  'GS010-PJ-CUST-THEME-SETTINGS-GROUP': {
71
73
  level: 'recommendation',
72
74
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"group"</code>.',
73
75
  details: oneLineTrim`Only use the following groups: <code>"post"</code>, <code>"homepage"</code>.<br>
74
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
76
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
75
77
  },
76
78
  'GS010-PJ-CUST-THEME-SETTINGS-SELECT-OPTIONS': {
77
79
  level: 'error',
78
80
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"select"</code> need to have at least 2 <code>"options"</code>.',
79
81
  details: oneLineTrim`Make sure there is at least 2 <code>"options"</code> in each <code>"select"</code> custom theme property.<br>
80
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
82
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
81
83
  },
82
84
  'GS010-PJ-CUST-THEME-SETTINGS-SELECT-DEFAULT': {
83
85
  level: 'error',
84
86
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"select"</code> need to have a valid <code>"default"</code>.',
85
87
  details: oneLineTrim`Make sure the <code>"default"</code> property matches a value in <code>"options"</code> of the same <code>"select"</code>.<br>
86
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
88
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
87
89
  },
88
90
  'GS010-PJ-CUST-THEME-SETTINGS-BOOLEAN-DEFAULT': {
89
91
  level: 'error',
90
92
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"boolean"</code> need to have a valid <code>"default"</code>.',
91
93
  details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>true</code> or <code>false</code>.<br>
92
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
94
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
93
95
  },
94
96
  'GS010-PJ-CUST-THEME-SETTINGS-COLOR-DEFAULT': {
95
97
  level: 'error',
96
98
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"color"</code> need to have a valid <code>"default"</code>.',
97
99
  details: oneLineTrim`Make sure the <code>"default"</code> property is a valid 6-hexadecimal-digit color code like <code>#15171a</code>.<br>
98
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
100
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
99
101
  },
100
102
  'GS010-PJ-CUST-THEME-SETTINGS-IMAGE-DEFAULT': {
101
103
  level: 'error',
102
104
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"image"</code> can\'t have a <code>"default"</code> value.',
103
105
  details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>null</code>, an empty string <code>''</code> or isn't present.<br>
104
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
106
+ Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
105
107
  },
106
108
  'GS001-DEPR-LABS-MEMBERS': {
107
109
  level: 'warning',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.29.1",
3
+ "version": "4.29.2",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -8,7 +8,7 @@
8
8
  "validator",
9
9
  "lint"
10
10
  ],
11
- "homepage": "https://ghost.org",
11
+ "homepage": "https://ghost.org/",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git@github.com:TryGhost/gscan.git"
@@ -22,7 +22,7 @@
22
22
  "author": {
23
23
  "name": "Ghost Foundation",
24
24
  "email": "hello@ghost.org",
25
- "web": "https://ghost.org"
25
+ "web": "https://ghost.org/"
26
26
  },
27
27
  "main": "lib",
28
28
  "license": "MIT",