gscan
Scans Ghost themes looking for errors, deprecations, features and compatibility
Last updated 5 months ago by chrisraible .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gscan 
SYNC missed versions from official npm registry.

Ghost

GScan is a tool for validating Ghost themes. It produces detailed reports of issues where themes need to be modified in order to be compatible with a specific version.

It is actively capable of dealing with the current and last major versions of Ghost (v1-v6).

GScan works on a system of rules. Each rule has a way to check whether it passes or fails and has help content which describes how to fix it. Each rule is also marked with an error level:

  • Errors: issues that will cause your theme to not work properly. These must be fixed.
  • Warnings: these are usually related to deprecated features. These should be fixed.
  • Recommendations: these are advisories about best practice. Fixing these will improve your theme.
  • Features: detected features which may impact on compatibility. Nothing to do!

In addition, an error can be marked as fatal. A fatal error means, left unchecked a Ghost publication would throw 500 errors on certain pages because of the detected out-of-date or erroneous code.

Usage

There are 4 ways to use gscan to validate your theme:

1. Inside Ghost

Gscan is pre-installed in Ghost. If there are theme errors, Ghost will show them on boot in the console logs and in the UI (Ghost Admin).

2. Web usage

Visit https://gscan.ghost.org and upload your zip to our online version of Gscan.

3. CLI usage

Install using yarn / npm:

yarn global add gscan / npm install -g gscan

To run a local directory through the checks:

gscan /path/to/theme/directory

To run a local zip file through the checks:

gscan /path/to/theme.zip -z

By default, GScan scans themes for the latest Ghost version compatibility. You can also specify a Ghost version by using the following parameters (for Ghost 1.0, 2.0, 3.0, 4.0, 5.0 and 6.0):

--v1 or -1 --v2 or -2 --v3 or -3 --v4 or -4 --v5 or -5 --v6 or -6 (default) or --canary

Examples:

gscan /path/to/theme.zip -z -1 - scan a theme in a zip file for Ghost 1.0 compatibility gscan /path/to/theme/directory --v2 - can a theme in a directory for Ghost 2.0 compatibility gscan /path/to/theme/directory - scan a theme for Ghost 6.0 compatibility

4. Lib usage

Install using yarn/npm and then:

var gscan = require('gscan');

gscan.checkZip({
    path: 'path-to-zip',
    // Pass in a folder to check
    // if you need to check the theme for a different
    // major Ghost version, you can pass it. Currently
    // v1, v2, v3, v4, v5 and v6 are supported. Default is
    // the latest Ghost version 6.0:
    // checkVersion: 'v6',
    name: 'my-theme'
}).then(function (result) {
    console.log(result);
}).catch(function(err) {
    console.log(err);
});

Development

Run in browser (for zip uploads)

Run on command line

  • zip file: ./bin/cli.js -z /path/to/your/theme.zip
  • directory: ./bin/cli.js /path/to/directory

Publish

(Core team only)

  • yarn ship

Tools

When developing new rules or testing gscan following tools are great to have in the toolbelt:

  • astexplorer - absolutely awesome Handlebars AST fiddler, helpful when testing out new ideas and exploring what's possible through AST parser;

To Do

  • Support for running the checks against a GitHub repository
  • Many, many more checks
  • Detailed advice for each check/result
  • Compatibility report
  • Feature listing

Copyright & License

Copyright (c) 2013-2025 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.

Current Tags

  • 5.2.1                                ...           latest (5 months ago)

224 Versions

  • 5.2.1                                ...           5 months ago
  • 5.2.0                                ...           6 months ago
  • 5.1.0                                ...           8 months ago
  • 5.0.0                                ...           9 months ago
  • 4.49.7                                ...           9 months ago
  • 4.49.6                                ...           9 months ago
  • 4.49.5                                ...           10 months ago
  • 4.49.4                                ...           10 months ago
  • 4.49.3                                ...           10 months ago
  • 4.49.1                                ...           10 months ago
  • 4.49.0                                ...           10 months ago
  • 4.48.1                                ...           10 months ago
  • 4.48.0                                ...           a year ago
  • 4.47.0                                ...           a year ago
  • 4.46.0                                ...           a year ago
  • 4.45.0                                ...           a year ago
  • 4.44.0                                ...           2 years ago
  • 4.43.7                                ...           2 years ago
  • 4.43.6                                ...           2 years ago
  • 4.43.5                                ...           2 years ago
  • 4.43.4                                ...           2 years ago
  • 4.43.3                                ...           2 years ago
  • 4.43.2                                ...           2 years ago
  • 4.43.1                                ...           2 years ago
  • 4.43.0                                ...           2 years ago
  • 4.42.1                                ...           2 years ago
  • 4.42.0                                ...           2 years ago
  • 4.41.0                                ...           2 years ago
  • 4.40.0                                ...           2 years ago
  • 4.39.4                                ...           3 years ago
  • 4.39.3                                ...           3 years ago
  • 4.39.2                                ...           3 years ago
  • 4.39.1                                ...           3 years ago
  • 4.39.0                                ...           3 years ago
  • 4.38.0                                ...           3 years ago
  • 4.37.6                                ...           3 years ago
  • 4.37.5                                ...           3 years ago
  • 4.37.4                                ...           3 years ago
  • 4.37.3                                ...           3 years ago
  • 4.37.2                                ...           3 years ago
  • 4.37.1                                ...           3 years ago
  • 4.37.0                                ...           3 years ago
  • 4.36.3                                ...           3 years ago
  • 4.36.2                                ...           3 years ago
  • 4.36.1                                ...           3 years ago
  • 4.36.0                                ...           3 years ago
  • 4.35.1                                ...           3 years ago
  • 4.35.0                                ...           3 years ago
  • 4.34.0                                ...           4 years ago
  • 4.33.0                                ...           4 years ago
  • 4.32.0                                ...           4 years ago
  • 4.31.2                                ...           4 years ago
  • 4.27.1 [deprecated]           ...           4 years ago
  • 4.31.1                                ...           4 years ago
  • 4.31.0                                ...           4 years ago
  • 4.30.0                                ...           4 years ago
  • 4.29.2                                ...           4 years ago
  • 4.29.1                                ...           4 years ago
  • 4.29.0                                ...           4 years ago
  • 4.28.0                                ...           4 years ago
  • 4.27.0                                ...           4 years ago
  • 4.26.1                                ...           4 years ago
  • 4.26.0                                ...           4 years ago
  • 4.25.3                                ...           4 years ago
  • 4.25.2                                ...           4 years ago
  • 4.25.1                                ...           4 years ago
  • 4.25.0                                ...           4 years ago
  • 4.24.0                                ...           4 years ago
  • 4.23.1                                ...           4 years ago
  • 4.23.0                                ...           4 years ago
  • 4.22.0                                ...           4 years ago
  • 4.21.1                                ...           4 years ago
  • 4.21.0                                ...           4 years ago
  • 4.20.2                                ...           4 years ago
  • 4.20.1                                ...           4 years ago
  • 4.20.0                                ...           4 years ago
  • 4.19.0                                ...           4 years ago
  • 4.18.0                                ...           4 years ago
  • 4.17.0                                ...           4 years ago
  • 4.16.2                                ...           4 years ago
  • 4.16.1                                ...           4 years ago
  • 4.16.0                                ...           4 years ago
  • 4.15.2                                ...           4 years ago
  • 4.15.1                                ...           4 years ago
  • 4.15.0                                ...           4 years ago
  • 4.14.0                                ...           4 years ago
  • 4.13.3                                ...           4 years ago
  • 4.13.2                                ...           4 years ago
  • 4.13.1                                ...           4 years ago
  • 4.13.0                                ...           4 years ago
  • 4.12.0                                ...           4 years ago
  • 4.11.1                                ...           4 years ago
  • 4.10.3                                ...           4 years ago
  • 4.11.0                                ...           4 years ago
  • 4.10.2                                ...           4 years ago
  • 4.10.1                                ...           4 years ago
  • 4.10.0                                ...           4 years ago
  • 4.9.4                                ...           4 years ago
  • 4.9.3                                ...           4 years ago
  • 4.9.2                                ...           4 years ago
  • 4.9.1                                ...           4 years ago
  • 4.9.0                                ...           4 years ago
  • 4.8.1                                ...           4 years ago
  • 4.8.0                                ...           4 years ago
  • 4.7.1                                ...           4 years ago
  • 4.7.0                                ...           4 years ago
  • 4.6.0                                ...           4 years ago
  • 4.5.1                                ...           4 years ago
  • 4.5.0                                ...           4 years ago
  • 4.4.0                                ...           4 years ago
  • 4.3.1                                ...           5 years ago
  • 4.3.0                                ...           5 years ago
  • 4.2.1                                ...           5 years ago
  • 4.2.0                                ...           5 years ago
  • 4.1.4                                ...           5 years ago
  • 4.1.3                                ...           5 years ago
  • 4.1.2                                ...           5 years ago
  • 4.1.1                                ...           5 years ago
  • 4.1.0                                ...           5 years ago
  • 4.0.2                                ...           5 years ago
  • 4.0.1                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 4.0.0-pre.5                                ...           5 years ago
  • 4.0.0-pre.4                                ...           5 years ago
  • 4.0.0-pre.3                                ...           5 years ago
  • 4.0.0-pre.2                                ...           5 years ago
  • 4.0.0-pre.1                                ...           5 years ago
  • 4.0.0-pre.0                                ...           5 years ago
  • 3.6.1                                ...           5 years ago
  • 3.6.0                                ...           5 years ago
  • 3.5.7                                ...           6 years ago
  • 3.5.6                                ...           6 years ago
  • 3.5.5                                ...           6 years ago
  • 3.5.4                                ...           6 years ago
  • 3.5.3                                ...           6 years ago
  • 3.5.2                                ...           6 years ago
  • 3.5.1                                ...           6 years ago
  • 3.5.0                                ...           6 years ago
  • 3.4.1                                ...           6 years ago
  • 3.4.0                                ...           6 years ago
  • 3.3.3                                ...           6 years ago
  • 3.3.2                                ...           6 years ago
  • 3.3.1                                ...           6 years ago
  • 3.3.0                                ...           6 years ago
  • 3.2.5                                ...           6 years ago
  • 3.2.4                                ...           6 years ago
  • 3.2.3                                ...           6 years ago
  • 3.2.2                                ...           6 years ago
  • 3.2.1                                ...           6 years ago
  • 3.2.0                                ...           6 years ago
  • 3.1.1                                ...           6 years ago
  • 3.1.0                                ...           6 years ago
  • 3.0.1                                ...           6 years ago
  • 3.0.0                                ...           6 years ago
  • 2.11.0 [deprecated]           ...           6 years ago
  • 2.10.0                                ...           7 years ago
  • 2.9.0                                ...           7 years ago
  • 2.8.0                                ...           7 years ago
  • 2.7.0                                ...           7 years ago
  • 2.6.6                                ...           7 years ago
  • 2.6.5                                ...           7 years ago
  • 2.6.4                                ...           7 years ago
  • 2.6.3                                ...           7 years ago
  • 2.6.2                                ...           7 years ago
  • 2.6.1                                ...           7 years ago
  • 2.6.0                                ...           7 years ago
  • 2.5.1                                ...           7 years ago
  • 2.5.0                                ...           7 years ago
  • 2.4.1                                ...           7 years ago
  • 2.4.0                                ...           7 years ago
  • 2.3.0                                ...           7 years ago
  • 2.2.1                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.1                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.5.1                                ...           8 years ago
  • 1.5.0                                ...           8 years ago
  • 1.4.3                                ...           8 years ago
  • 1.4.2                                ...           8 years ago
  • 1.4.1                                ...           8 years ago
  • 1.4.0                                ...           8 years ago
  • 1.3.4                                ...           8 years ago
  • 1.3.3                                ...           8 years ago
  • 1.3.2                                ...           8 years ago
  • 1.3.1                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.3                                ...           8 years ago
  • 1.2.2                                ...           8 years ago
  • 1.2.1                                ...           8 years ago
  • 0.2.6                                ...           9 years ago
  • 0.2.5                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.7                                ...           9 years ago
  • 1.1.6                                ...           9 years ago
  • 1.1.5                                ...           9 years ago
  • 1.1.4                                ...           9 years ago
  • 1.1.3                                ...           9 years ago
  • 1.1.2                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.2.4                                ...           9 years ago
  • 0.2.3                                ...           9 years ago
  • 0.2.2                                ...           9 years ago
  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.1                                ...           9 years ago
  • 0.0.15                                ...           10 years ago
  • 0.0.14                                ...           10 years ago
  • 0.0.13                                ...           10 years ago
  • 0.0.12                                ...           10 years ago
  • 0.0.11                                ...           10 years ago
  • 0.0.10                                ...           10 years ago
  • 0.0.9                                ...           10 years ago
  • 0.0.8                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.7                                ...           10 years ago
  • 0.0.6                                ...           10 years ago
  • 0.0.5                                ...           10 years ago
  • 0.0.4                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago

Copyright 2013 - present © cnpmjs.org | Home |