Exploring JSON settings
In Chapter 1, Getting Started with Shopify, we briefly mentioned the Config
directory, where we can define and manage the global JSON values across the entire theme. Let's remind ourselves of the two essential .json
files that we can find within this directory:
- The
settings_schema.json
file allows us to create and manage the content inside the theme editor on our theme, which we can reference throughout the entire theme file. - The
settings_data.json
file, on the other hand, records all the options defined in our schema file and saves their values. We can consider this file as our theme database, which we can manage by updating the theme settings through the theme editor or by directly editing the values inside thesettings_data.json
file.
We can group the global settings options into different categories for more straightforward navigation, which we can do using the name
and settings
attributes:
{ "name": "...