A minimal Ghost CMS theme starter that combines Ghost templates with modern tools (Vite + Tailwind CSS 4) to help you build and deploy themes quickly. Clone it, customize it, and use it for personal, client, or commercial projects.
- Vite-powered development and build pipeline for quick reloads and optimized bundles
- Tailwind CSS 4 with the Typography plugin for efficient styling
- Ready-to-ship structure with assets and basic pagination/navigation components
- Automatic image optimization using
Sharpfor better performance - Theme packaging that exports a ZIP file for easy distribution and deployment
- Node.js 22+ and
pnpminstalled globally - A local or remote Ghost instance (v6+) to test the theme
-
Clone the repository:
git clone https://github.com/frontendweb3/ghost-theme-starter-kit.git cd ghost-theme-starter -
Install dependencies:
pnpm install
-
Develop (build in watch mode):
pnpm dev
This runs
vite build --watchso assets rebuild on change. -
Production build:
pnpm build
- Copy the built theme output into your Ghost installation's
content/themes/<your-theme>/directory (or symlink it during development). - Restart Ghost so it picks up the new theme, then activate it in the Ghost admin UI.
- Adjust the
configvalues inpackage.json(for example,posts_per_pageandcard_assets) to match your design needs.
- Templates:
author.hbs,default.hbs,index.hbs,post.hbs,page.hbs,tag.hbs,error-404.hbs - Partials:
partials/(header, footer, navigation, pagination, cards) - Components:
partials/components(button and icon). These are reusable UI partials, and the icon partial is built with Lucide. - Assets:
assets/(CSS, JS, images) compiled by Vite intopublic/ - Build config:
vite.config.ts - Images: source under
assets/images/and optimized intoassets/dist/image/
- Tailwind CSS 4 is included via
tailwindcssand@tailwindcss/typography. - Add utility classes in
assets/css/styles.cssand extend via Tailwind config if desired.
This starter uses lucide with a reusable Handlebars partial.
-
Add the icon import in
assets/js/icons.js.import { createIcons, Sun, Moon, Search, UserRound, SendHorizontal, Heart } from 'lucide';
-
Register it in the
iconsobject insidecreateIcons.createIcons({ icons: { Sun, Moon, Search, UserRound, SendHorizontal, Heart } });
-
Use the icon partial in any
.hbsfile.
Simple rule: import the icon as Heart in JavaScript, then use name="heart" in Handlebars. For two-word icons such as UserRound, use kebab-case in templates (name="user-round").
This starter supports shadcn-style design tokens (CSS variables), even though it is a Ghost theme and not a React app.
- Variables are defined in
assets/css/shadcn-variables.css. - The variables file is imported in
assets/css/styles.css. - Includes
:rootvariables for light mode. - Includes
.darkvariables for dark mode. - Includes
@theme inlinemappings for Tailwind CSS 4 tokens.
In simple terms: these variables define your theme colors, spacing, radius, and shadows. Tailwind utility classes read from them, so you can update the theme from one place.
You can choose font pairings from Fonttrio and apply them in this theme.
Simple steps:
- Choose a font pair and install it with a package manager or include it with a CDN.
- Update font tokens in
assets/css/shadcn-variables.css:--font-heading--font-body
- Restart your local development server with
pnpm dev.
In simple terms: change the font variables once, and heading/body typography updates everywhere.
This starter uses shadcn theme variables, so you can easily customize the theme.
- Open a shadcn theme generator such as https://shadcnstudio.com/theme-generator or https://tweakcn.com.
- Generate your preferred theme.
- Copy the generated Tailwind/CSS variable output and paste it into
assets/css/shadcn-variables.css.
In simple terms: generate a theme, replace the variables file, and rebuild the project.
The following plugins are configured in vite.config.ts:
@tailwindcss/vite- Why: compiles Tailwind CSS 4 during build/watch.
vite-plugin-image-optimizer- Why: optimizes image assets (jpg/png/webp/svg/avif) for better performance.
vite-plugin-zip-pack(production only)- Why: creates a final theme
.zipfile for Ghost upload/deployment.
- Why: creates a final theme
pnpm dev— Build in watch mode for developmentpnpm build— Creates a production build and generates the theme ZIP file.pnpm test— Tests the Ghost CMS v6 theme using thegscanCLI.
This starter is released under the MIT License (see LICENSE.md). You are free to use it for personal, client, or commercial projects and to sell derived themes.
