Skip to main content

settings_schema.json

The settings_schema.json file controls the organization and content of the Theme settings area of the theme editor. All setting selections in the theme editor are saved in settings_data.json.


The settings_schema.json file is located in the config directory of the theme:

└── theme
...
├── config
| ├── settings_data.json
| ├── settings_schema.json
| └── markets.json
└── locales

The settings_schema.json file is an array of objects that represent setting categories. Each object needs to have the following attributes:

AttributeDescriptionRequired
nameThe name of the category of settings.Yes
settingsAn array of associated settings.Yes

The settings_schema.json file should follow the following basic format:

[
{
"name": "Category",
"settings": [
...
]
},
...
]

The settings_schema.json file is a JSON file, so all content must be valid JSON. Additionally, make sure you follow the appropriate syntax for your desired setting.


When working with the settings_schema.json file, familiarize yourself with the following:

There are two categories of settings:

CategoryDescription
Input settingsSettings that can hold a value, and are configurable by app users.
Sidebar settingsSettings that can’t hold a value, and aren’t configurable by app users. They’re informational elements that can be used to provide detail and clarity for your input settings.

Theme settings can be accessed through the settings object. To learn more about the syntax and considerations, refer to Access settings.

As a theme author, you can include additional metadata for your theme in the Theme actions menu of the theme editor. This menu appears at the left of the theme editor top bar:

To add this metadata, you can include a theme_info object in the settings_schema.json file. This object must include the following attributes:

AttributeDescriptionRequired
nameThe value of this attribute must be theme_info.Yes
theme_nameThe name of the theme.Yes
theme_authorThe author of the theme.Yes
theme_versionThe version number of the theme.Yes
theme_documentation_urlA URL where merchants can find documentation for the theme.Yes
theme_support_emailAn email address that merchants can contact for support for the theme.See note
theme_support_urlA URL where merchants can find support for the theme.See note
Caution

All of the above attributes are required. However, you need to specify only theme_support_email or theme_support_url, not both. Including both of these attributes, or excluding any other attributes, will result in an error.

For example:

settings_schema.json

[
{
"name": "theme_info",
"theme_name": "Dawn",
"theme_author": "Shopify",
"theme_version": "1.0.0",
"theme_documentation_url": "https:\/\/help.shopify.com\/manual\/online-store\/themes\/os20\/themes-by-shopify\/dawn",
"theme_support_url": "https:\/\/support.shopify.com\/",
},
...
]

Was this page helpful?