Skip to main content

[en] The theme manifest

[en] Every theme has a theme.json file at its top level. It names the theme, says which version of the theme contract it is written for, and lists its options.

{
    "name": "Acme Docs",
    "version": "1.0.0",
    "author": "Acme Inc.",
    "contract": "^1.0",
    "options": [
        {
            "key": "accent",
            "type": "color",
            "label": "Accent color",
            "description": "Links, buttons and the portal banner.",
            "default": "#3a46e8"
        }
    ],
    "i18n": { "sourceLanguage": "en" }
}

[en] Field

[en] Required

[en] Description

[en] name

[en] Yes

[en] The theme's name. It is used in the name of the downloaded ZIP file.

[en] version

[en] Yes

[en] The theme's version. Use a version number such as 1.0.0; anything else gives a warning.

[en] contract

[en] Yes

[en] The versions of the theme contract the theme works with. Use "^1.0".

[en] author

[en] No

[en] Who made the theme.

[en] options

[en] No

[en] The settings the theme offers in the Layout Editor. See [en] Theme options reference.

[en] i18n

[en] No

[en] sourceLanguage names the translation file used when a text has no translation in the page's language. The default is en. See [en] Translate a theme.

[en] The contract

[en] The theme contract is the set of variables, functions and rules that Paligo gives templates, as described in this section. Its current version is 1.0. The contract field says which versions your theme works with, so that a later, incompatible version of the contract can't break a published theme.

[en] Use "^1.0", which means any 1.x version. These forms are also accepted:

[en] Form

[en] Means

[en] "1.0"

[en] Exactly 1.0

[en] "^1.0" or "^1"

[en] Any 1.x version

[en] "~1.0"

[en] Any 1.0.x version

[en] "1.x"

[en] Any 1.x version

[en] "*"

[en] Any version

[en] "^1.0 || ^2.0"

[en] Either range

[en] Comparisons such as ">=1.0" are not accepted.