Ghostcn
Skip to Content
Getting started

Create a theme

Scaffold a complete Ghost theme, preview it locally, and package it for upload.

Run the setup wizard

Run this from the content/themes directory of your local Ghost installation, or create the theme elsewhere and move it there before activation.

npx ghostcn@1.4.0 create my-theme

Choose Tailwind CSS for utilities or vanilla CSS for standalone styles. The wizard also configures your palette, color mode, package manager, optional components, and dependency installation. If you skip dependency installation, install them before running the generated build.

Start the CSS watcher

cd my-theme
npm run dev
npm run dev watches CSS. It does not start Ghost.

Activate the theme in Ghost

If you don’t have Ghost locally, follow the official local installation guide. With the theme in content/themes, run ghost restart from the Ghost installation directory. In Ghost Admin, open Settings → Design → Change theme, activate the theme, and visit your publication. Keep the CSS watcher running from the theme directory.

Add a component

From the theme directory:

npx ghostcn@1.4.0 add pricing-table --skip-existing

Then add the partial to a theme template such as index.hbs:

{{> "components/pricing-table"}}

Pricing uses the public tiers configured in Ghost Admin and can render nothing for some membership settings. See Pricing Table and the styling guide.

Validate and upload

From the generated theme directory:

npm test
npm run validate
npm run zip

The ZIP is written to dist/<theme-name>-<version>.zip. Upload it through Ghost Admin’s theme picker. Test actual posts, membership settings, keyboard navigation, color modes, and mobile layouts on your target Ghost version before going live.

Edit this page on GitHub

Was this helpful?

On this page