Publish to Ghost

What's in your theme file

Each download or publish builds a fresh theme from your project. It is a ZIP with one folder, named fantasma- followed by the project's theme name, such as fantasma-ridgeway-dispatch. The theme name is under Project settings › General. You never need to open the ZIP. This page is for when you want to know what Ghost gets, or a developer asks.

The ZIP holds the design only. Your posts, pages, tags, members and settings stay in Ghost.

Ghost version

Use the theme on a site that runs Ghost 6 or later. Publish your theme to Ghost and Download your theme and upload it in Ghost show how it gets there, and how a new one replaces the old one.

Files

File or folder What it holds
default.hbs The default layout, the frame around every page: header, footer, fonts, styles and your scripts from Custom code. Other layouts you made in Fantasma get files of their own.
home.hbs, index.hbs, post.hbs, page.hbs, tag.hbs, author.hbs The templates, one for each kind of page Ghost shows. home.hbs is your home page, and index.hbs the pages after it when your post list runs to page 2, 3 and on. Templates you added in Fantasma, such as one for one particular post, an error page, or a collection with its own address, get files of their own.
partials/ The sections and blocks your templates use
assets/style.css The styles, with only what the blocks in your theme use
assets/css, assets/js Styles and scripts for features your theme uses, such as a form, or the lightbox that opens images large on a click
assets/images Images you uploaded in Fantasma
assets/fonts Fonts you uploaded, and fonts copied in when Bundle fonts in theme is on, with their licenses
assets/custom.css Your custom CSS from Styles › Custom CSS, when you wrote some
locales/en.json The words in your theme, for Ghost's translation feature. See Translate the words in your theme.
package.json The theme's name, its version as the Download or Publish menu shows it, posts per page, and the image sizes Ghost makes for it
routes.yaml A copy of your routes. Ghost does not read it from here. See Upload routes.yaml.
robots.txt Only when you set rules for search engines or AI crawlers. See Control search engines and AI crawlers.
AGENTS.md, CLAUDE.md Notes for AI coding tools, such as Claude Code. They say the folder is built by Fantasma, and where a change belongs instead. Your site never shows them.
LICENSE The license of the theme

Not every theme has every file.

Posts per page in Project settings › Features, 10 by default, goes into package.json. Ghost uses it to split your post lists into pages.

Settings the theme adds in Ghost Admin

When your theme uses a Site Logo block, it adds a "Dark mode logo" image setting to the theme's settings in Ghost Admin, under Design & branding. Upload a light version of your logo there, in Ghost, for dark backgrounds. Values you set there stay when a new build of the theme replaces the old one. Choose light, dark or automatic color mode explains it.

Edits to the files

Each new build replaces the old theme in Ghost, so a change you make to a file in the ZIP lasts only until the next download or publish. Make the change in Fantasma instead. Code that must stay outside Fantasma goes into Ghost Admin's Code injection, which no theme upload touches. Add analytics and other scripts compares it with Custom code.

A developer with Node.js can check the folder with gscan, the checker Ghost runs on every theme upload, by running npm install, then npm test, in a terminal inside it.

What the license allows

The LICENSE file lets you use, copy and change the theme for your own sites and for client sites. You may not sell or give away the theme itself as a theme product, for example in a theme marketplace. When you build a site for a client, the theme goes to the client as part of that site.

Was this article helpful?