# General Translation Changelog: gt 2.11.0: Publish any file type to the CDN
URL: https://generaltranslation.com/en-GB/blog/gt-cli_v2_11_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Fernando Aviles
Published: 2026-03-18

## Overview

The GT CLI can now publish **any translated file type** to the GT CDN. JSON, MDX, YAML and all other [supported file types](/docs/cli/reference/formats/gt-jsx-files) can now be published directly from the [`translate`](/docs/cli/reference/commands/translate), [`upload`](/docs/cli/reference/commands/upload) and [`save-local`](/docs/cli/reference/commands/save-local) commands.

## Configuration

### Global publish flag

Add `--publish` to any supported command:

```bash
npx gt translate --publish
```

Or set it in `gt.config.json`:

```json title="gt.config.json"
{
  "publish": true
}
```

This publishes **all** translated files (including GT JSON) to the CDN.


### Per-file publish control

You can opt specific files in or out using the `include` pattern syntax. Instead of a plain glob string, use an object with a `publish` flag:

```json title="gt.config.json"
{
  "defaultLocale": "en",
  "locales": ["fr", "es"],
  "files": {
    "json": {
      "include": [
        { "pattern": "locales/[locale]/*.json", "publish": true },
        { "pattern": "locales/[locale]/internal/**/*.json", "publish": false }
      ]
    }
  }
}
```

In this example, all JSON files in `locales/[locale]/` are published to the CDN, except for files in the `internal/` subdirectory.


### GT JSON publish control

GT&#39;s internal format has its own publish flag under the `gt` key:

```json title="gt.config.json"
{
  "files": {
    "gt": {
      "output": "public/i18n/[locale].json",
      "publish": true
    }
  }
}
```


### Resolution order

For any given file, the CLI resolves publish intent in this order:

1. **Explicit opt-out** — file matches an `include` entry with `"publish": false` → not published or removed from the CDN
2. **Explicit opt-in** — file matches an `include` entry with `"publish": true` → published to the CDN
3. **Global fallback** — uses the top-level `publish` setting (defaults to `false` if unset)

If no publish configuration is set at any level, the publish step is skipped entirely — no API calls are made.

## Commands that support publishing

| Command                                                    | Behaviour                                |
| ---------------------------------------------------------- | ---------------------------------------- |
| [`gt translate`](/docs/cli/reference/commands/translate)   | Publishes after downloading translations |
| [`gt upload`](/docs/cli/reference/commands/upload)         | Publishes after uploading source files   |
| [`gt save-local`](/docs/cli/reference/commands/save-local) | Publishes after saving local edits       |

## Links

* [CLI config reference](/docs/cli/reference/config)
* [PR #1122](https://github.com/generaltranslation/gt/pull/1122) — initial file publish support
* [PR #1132](https://github.com/generaltranslation/gt/pull/1132) — opt-in fix
* [PR #1133](https://github.com/generaltranslation/gt/pull/1133) — publish on save/upload

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
