---
title: Global-fields schema
description: The YAML keys that define site-wide global fields, the schema root, the two write tools, and the flat runtime read path.
updated: 2026-06-22
next: redirections
---

Global fields hold values shared across the whole site, the brand name, a baseline, contact details, an analytics tag. The schema mirrors a [page-type](/en/docs/page-types)'s `tabsets`, but at runtime every value is read flat under `globals`. Schema and data are written by two distinct tools.

## Schema root

The schema root is `tabsets:`, not a `groups:` wrapper. Each tabset is `tabsets.<key>.{name, fields}`, the same shape as content-type and page-type tabsets. A tabset groups fields into an editing tab in the backoffice; the tabset key never appears in the runtime path.

| Key | Type | Notes |
|---|---|---|
| `tabsets` | object | Schema root. `tabsets.<key>.{name, fields}`. |
| `tabsets.<key>.name` | string | Backoffice tab label. |
| `tabsets.<key>.fields` | object | camelCase field map; each field is a `{type, label, …}` descriptor. |

Each field is a standard typed field. See [Custom fields](/en/docs/custom-fields) for the field-type catalogue and per-type config.

```yaml
tabsets:
  infos:
    name: Infos
    fields:
      brandName:
        type: text
        label: Nom de la revue
        translatable: false
      baseline:
        type: text
        label: Baseline
        translatable: true
      email:
        type: text
        label: Email de la rédaction
        translatable: false
      publicationRhythm:
        type: text
        label: Publication rhythm
        translatable: true
      social:
        type: textarea
        label: Réseaux sociaux
        translatable: false
      copyright:
        type: text
        label: Mention de copyright
        translatable: false
  site:
    name: Paramètres du site
    fields:
      GA:
        type: text
        label: Tag Google Analytics
        translatable: false
```

## Runtime read is flat

At render time, global fields are read as `globals.<field>`, with the tabset key **dropped**. The schema path `tabsets.infos.fields.copyright` becomes the template path `globals.copyright`, never `globals.infos.copyright`.

```liquid
{{ globals.brandName }}
{{ globals.baseline }}
{{ globals.copyright }}
```

<div class="q-callout q-callout-warn"><i class="fa-solid fa-triangle-exclamation lead"></i>
  <div><b>Field keys must be globally unique.</b> Because the tabset key is dropped from the runtime path, two fields with the same key in different tabsets collide. Keep every field key unique across all tabsets. A macro or variable sharing a global field's name also shadows it.</div></div>

See [Template variables](/en/docs/template-variables) for the full `globals` context object.

## Write paths

The schema and the data are written by two different tools.

| Target | Tool | Notes |
|---|---|---|
| Schema | `update-settings-partial` | `setting_type: 'global-fields'`, `target: <tabsetKey>`. `yaml_content` MUST start with `<tabsetKey>:`. |
| Data (values) | `update-global-fields-data` | `data` and `translations` are both **JSON-stringified strings**. Partial, omitted fields are preserved. Read back with `get-global-fields-data`. |

The schema tool defines what fields exist; the data tool fills their values per locale. See [MCP tools](/en/docs/mcp-tools) for the wrapper and translation rules.

## Related

<div class="q-cards">
  <a class="q-card reco" href="/en/docs/custom-fields"><span class="k">Recommended</span><span class="t">Custom fields</span><span class="d">The field-type catalogue and per-type config.</span></a>
  <a class="q-card" href="/en/docs/template-variables"><span class="t">Template variables</span><span class="d">Read global fields as <code>globals.&lt;field&gt;</code>.</span></a>
  <a class="q-card" href="/en/docs/site-settings"><span class="t">Site settings</span><span class="d">The <code>miscellaneous</code> block and the partial-patch pattern.</span></a>
</div>
