# 主题配置文件概述

> Shoplazza 主题的配置文件如何定义并存储主题编辑器「主题设置」区域的内容、文件放在哪里，以及 Liquid 怎么读取设置值。

配置文件用于定义主题编辑器中**主题设置**区域的设置内容，并存储对应的设置值。

主题设置是放置全局设置（如字体和颜色选项）的理想位置。这些设置可以通过 [settings 对象](/docs/theme/references/liquid/objects/settings)访问。

## 位置

配置文件位于 theme 的 `config` 目录下：

```text title="目录"
└── theme
    ...
    ├── config
    |   ├── settings_data.json
    |   └── settings_schema.json
    └── locales
```

## 子类型

共有两个配置文件，各自具有独立的 schema 和内容：

| 类型                                              | 描述                                                                | 是否必填 |
| :------------------------------------------------ | :------------------------------------------------------------------ | :------- |
| [settings\_schema.json](./settings-schema-json) | 控制主题编辑器中**主题设置**区域的组织结构和内容。                  | 是       |
| [settings\_data.json](./settings-data-json)     | 保存来自 `settings_schema.json` 中设置的当前值。                    | 是       |

## 使用说明

使用配置文件时，您应该熟悉以下内容：

* [设置类型](/docs/theme/architecture/config/overview#设置类型)
* [访问设置](/docs/theme/architecture/config/overview#访问设置)

### 设置类型

设置分为两类：

| 类别                                                    | 描述                                                                                                                           |
| :------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------- |
| [输入设置](../settings/input-settings)           | 可以保存值的设置，可由应用用户配置。                                                                                           |
| [Sidebar 设置](../settings/sidebar-settings)     | 不保存值的设置，不可由应用用户配置。这些是信息展示元素，可为输入设置提供说明和补充信息。                                       |

### 访问设置

主题设置可以通过 [settings 对象](/docs/theme/references/liquid/objects/settings)访问。了解语法和注意事项，请参考[访问设置](/docs/theme/architecture/settings/overview#访问设置)。
