# Can Ghost theme configuration move outside package.json?

**URL:** <https://forum.ghost.org/t/can-ghost-theme-configuration-move-outside-package-json/62184>\
**Category:** Developer help\
**Created:** [March 14, 2026, 11:11pm UTC](https://forum.ghost.org/t/can-ghost-theme-configuration-move-outside-package-json/62184 "2026-03-14T23:11:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminRancourt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/benjaminrancourt/32/23844_2.png) [@BenjaminRancourt](https://forum.ghost.org/u/BenjaminRancourt)\
**Post date:** [March 14, 2026, 11:11pm UTC](https://forum.ghost.org/t/can-ghost-theme-configuration-move-outside-package-json/62184/1 "2026-03-14T23:11:41Z")

</div>

## Question about theme configuration outside `package.json`

Hi everyone,

I’m currently working on a Ghost theme and noticed that some theme configuration values are defined inside the `config` section of the `package.json` file.

Example from my theme:

```json
"config": {
  "card_assets": {
    "exclude": [
      "audio",
      "blockquote",
      "bookmark",
      "button",
      "callout",
      "collection",
      "gallery",
      "header",
      "header_v2",
      "nft",
      "product",
      "signup",
      "toggle",
      "video"
    ],
    "x-include": []
  },
  "image_sizes": {
    "l": { "width": 1200 },
    "m": { "width": 600 },
    "s": { "width": 300 },
    "xl": { "width": 2000 },
    "xs": { "width": 100 },
    "xxs": { "width": 30 }
  },
  "posts_per_page": 15
}

```

However, when running npm commands I get warnings like these:

```auto
npm warn Unknown cli config "image_sizes_m_width" (merisia-llc-theme:image_sizes_m_width). This will stop working in the next major version of npm.
npm warn Unknown cli config "image_sizes_xl_width" (merisia-llc-theme:image_sizes_xl_width). This will stop working in the next major version of npm.
npm warn Unknown cli config "image_sizes_s_width" (merisia-llc-theme:image_sizes_s_width). This will stop working in the next major version of npm.
npm warn Unknown cli config "image_sizes_xs_width" (merisia-llc-theme:image_sizes_xs_width). This will stop working in the next major version of npm.
npm warn Unknown cli config "image_sizes_xxs_width" (merisia-llc-theme:image_sizes_xxs_width). This will stop working in the next major version of npm.
npm warn Unknown cli config "card_assets_exclude_0" (merisia-llc-theme:card_assets_exclude_0). This will stop working in the next major version of npm.
npm warn Unknown cli config "posts_per_page" (merisia-llc-theme:posts_per_page). This will stop working in the next major version of npm.

```

My current npm version is:

`npm 11.3.0`

My question

**Is it possible (or recommended) to define this kind of theme configuration outside of package.json?**

For example in a dedicated configuration file such as:

- theme.config.json
- ghost.config.json
- or something similar

The goal would be to avoid npm interpreting the config section as CLI configuration and generating these warnings.

Or is the config section in package.json still the expected/official approach for Ghost themes, and these warnings can simply be ignored?

Thanks in advance for any clarification!

```auto

```

---

<div class="post-metadata">

**Author:** ![rlemon](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rlemon/32/41517_2.png) [@rlemon](https://forum.ghost.org/u/rlemon)\
**Post date:** [September 17, 2026, 12:34pm UTC](https://forum.ghost.org/t/can-ghost-theme-configuration-move-outside-package-json/62184/2 "2026-09-17T12:34:35Z")

</div>

The config key has to stay in package.json: Ghost reads it when the theme is activated (posts\_per\_page, image\_sizes, card\_assets, and config.custom for the Design settings) and GScan validates it there. There is no alternative file. The npm warnings come from npm treating the config key as its own CLI config namespace, so it flags every key it does not recognise. They are harmless and you can ignore them. If they bother you, pnpm does not emit them in my experience, and you get the same lockfile discipline.
