--- url: https://docs.youcan.shop/themes/config/settings_data.md --- # `settings_data.json` `config/settings_data.json` stores the values behind the theme's [settings schema](/themes/config/settings_schema), along with data for [statically rendered](/themes/sections/overview#statically-render-a-section) sections. The theme editor reads and writes this file as sellers customize the theme; it ships with the theme to provide the starting configuration. ```json { "current": { "logo": "logo.png", "favicon": "favicon.png", "logo_width": 90, "cart_type": "drawer", "sections": { "announcement-bar": { "type": "announcement-bar", "settings": {} }, "header": { "type": "header", "settings": { "logo_position": "left", "sticky_header_type": "on-scroll-up" } }, "footer": { "type": "footer", "settings": { "show_social": true } } } }, "presets": { "Default": {} } } ``` ## Top-level properties | Property | Type | Required | Description | | -------- | ---- | -------- | ----------- | | `current` | `object` | `string` | Yes | The active configuration. An object holds the values directly; a string names a key in `presets` to use instead. | | `presets` | `object` | Yes | Named theme styles, keyed by style name. `"Default": {}` is the common minimum. | A `current` (or preset) object has three kinds of content. ### Theme setting values Any key other than `sections` and `blocks` is a theme setting value, keyed by the setting `id` from `settings_schema.json`. Their values are available in the global `settings` object in Liquid. ```json "logo_width": 90, "cart_type": "drawer" ``` Settings left out here fall back to the `default` declared in the schema. ### `sections` Data for [statically rendered](/themes/sections/overview#statically-render-a-section) sections, keyed by a section ID. Each entry has the same shape as a section in a [JSON template](/themes/templates/json-templates#section-object): `type`, `settings`, `blocks`, `order`, and `disabled`. ```json "sections": { "announcement-bar": { "type": "announcement-bar", "settings": { "auto_rotate": true }, "blocks": { "block_one": { "type": "announcement_item", "settings": { "text": "Free shipping on all orders" } } }, "order": ["block_one"] } } ``` When a layout calls `{% section 'announcement-bar' %}`, the renderer looks up the entry whose `type` matches and renders the section with that data. ### `blocks` The [app embeds](/apps/theme_extension/getstarted#_3-block-targets) of the theme, keyed by a block ID. ```json "blocks": { "65d73f2c147c78": { "type": "youcan://apps/app_FBnC3ZoRVW9hRwYQtVEQ3aa9ObH/extensions/ext_FBnCCFymYw0EexC4K7bqOfM8WSX/blocks/announcement-bar.liquid", "disabled": false, "settings": { "text": "Free shipping on all orders" } } } ``` | Property | Type | Required | Description | | -------- | ---- | -------- | ----------- | | `type` | `string` | Yes | The ID of the app block. | | `disabled` | `boolean` | No | When `true`, the embed is not rendered. Defaults to `false`. | | `settings` | `object` | No | Values for the embed settings, keyed by setting `id`. Settings left out get their default value. | Sellers turn app embeds on and off in the theme editor, and the changes are saved here. The embeds of an app that is not installed are kept, but they are not rendered. ## Theme styles Each entry in `presets` is a theme style. It holds a full set of setting values, for example for a light and a dark version of the theme. The presets are not changed when the seller edits the theme. * When `current` is a preset name, the preset is copied into `current` the first time the seller edits a setting. From then on, `current` is an object. * When a theme has two or more presets, they are listed under Theme style in the theme editor. When the seller picks one, its values are copied into `current`, and the settings that the preset leaves out are reset to their `default`. The `sections` of `current` are kept. * Every preset is validated with the same rules as `current`. A `select` or `radio` value that is not one of the options is accepted in `settings_data.json`. ```json { "current": "Light", "presets": { "Light": { "color_schemes": { "scheme-1": { "settings": { "background": "#FFFFFF", "text": "#121212" } } } }, "Dark": { "color_schemes": { "scheme-1": { "settings": { "background": "#111827", "text": "#F9FAFB" } } } } } } ``` ## Editing In normal use the theme editor owns this file. Hand-edit it only to set up the configuration a theme ships with, and keep every setting `id` and section `type` aligned with `settings_schema.json` and the section files.