Skip to content

settings_schema.json ​

config/settings_schema.json defines the theme's global settings. It's a JSON array of setting groups, each rendered as a titled section in the theme editor.

json
[
  {
    "label": "t:settings_schema.typography.label",
    "settings": [
      { "type": "header", "content": "t:settings_schema.typography.font_family" },
      {
        "type": "select",
        "id": "font_family",
        "label": "t:settings_schema.typography.font_family_label",
        "options": [
          { "value": "DM+Sans", "label": "DM Sans" },
          { "value": "Roboto", "label": "Roboto" }
        ],
        "default": "DM+Sans"
      }
    ]
  },
  {
    "label": "t:settings_schema.seo.label",
    "settings": [
      { "type": "image_picker", "id": "favicon", "label": "t:settings_schema.seo.favicon_image" },
      { "type": "text", "id": "keywords", "label": "t:settings_schema.seo.keywords" }
    ]
  }
]

Group object ​

PropertyTypeRequiredDescription
labelstringYesThe group's title in the theme editor. Usually a t: locale key.
settingsarrayYesThe setting definitions in this group.

Setting entries ​

Each entry in a group's settings array is a setting definition, using the same types as section settings: input settings that capture a value, and display settings such as header and paragraph that only add context.

  • Every entry needs a type.
  • Every input setting needs an id, and that id must be unique across the whole file.

Reading values in Liquid ​

Theme settings are exposed on the global settings object, keyed by id:

liquid
{% if settings.keywords != blank %}
  <meta name="keywords" content="{{ settings.keywords }}">
{% endif %}

If the seller hasn't set a value, the setting's default from the schema is used. Settings with no value and no default resolve to blank.

Locale keys ​

label, content, and option labels can be t: keys that resolve against the theme's schema locale files, which keeps the editor UI translatable.