Skip to main content

Settings

The settings/ folder stores the theme configuration JSON files that control defaults, schema, and template ordering.

Files in this folder

  • settings-schema.json: defines available fields organized into groups with multilingual labels.
  • settings-data.json: holds the actual values for each field.
  • templates-settings.json: defines the rendering order for templates.

settings-schema.json

Settings are organized into groups with multilingual labels. Each group contains multiple settings:

[
{
"label": {
"ar": "الألوان",
"en": "Colors"
},
"settings": {
"mainColor": {
"type": "color",
"label": "Main Color",
"default": "#003033"
},
"secondaryColor": {
"type": "color",
"label": "Secondary Color",
"default": "#f5f5f5"
}
}
},
{
"label": {
"ar": "شريط الإعلانات",
"en": "Announcement Bar"
},
"settings": {
"announcementEnabled": {
"type": "boolean",
"label": "Enable Announcement Bar",
"default": true
},
"announcementText": {
"type": "string",
"label": "Announcement Text",
"default": "Free shipping on orders over $50"
}
}
}
]

Available Setting Types

TypeDescriptionExample
stringSingle-line text inputTitles, URLs
booleanToggle switchEnable/disable features
numberNumeric input (supports min/max)Counts, sizes
colorColor pickerTheme colors
cssCSS code editorCustom CSS
javascriptJavaScript code editorCustom scripts
mediaMedia/image selectorLogo, images
productsProduct selectorFeatured products
menuMenu selectorNavigation menus

settings-data.json

Stores the actual values for each setting key:

{
"mainColor": "#ff5733",
"announcementEnabled": true,
"announcementText": "Welcome to our store!"
}

templates-settings.json

Defines the rendering order for templates in the layout:

{
"templates_order": ["header", "global", "main", "footer"]
}

Using Settings in Templates

Access settings values in your Nunjucks templates:

<body style="--main-color: {{ settings.mainColor }};">
{% if settings.announcementEnabled %}
<div class="announcement">{{ settings.announcementText }}</div>
{% endif %}
</body>