Theme Manifest File

Each TubePress theme must have a "manifest" file named theme.json at the root of the theme directory.
This article is part of a series on TubePress themes.

Each TubePress theme must have a "manifest" file named theme.json at the root of the theme directory. This is a simple JSON file that contains metadata about the theme.

When editing any theme.json, we strongly suggest that you run its contents through an online JSON validator to ensure there are no syntax errors.

Let's go through this file in detail.

Required Fields

Below is a minimal theme.json with all the required fields filled in.

{
    "name" : "tubepress/default",
    "version": "4.1.8",
    "title" : "Default",
    "authors" : [
        {
            "name" : "TubePress LLC",
            "url" : "http://tubepress.com"
        }
    ],
    "license": {
        "type" : "MPL-2.0",
        "urls" : [ "http://www.mozilla.org/MPL/2.0/" ]
    }
}
  • name
     

    Required. The globally unique name of this theme. You can use nearly any value here, but we recommend using a “vendor name” (e.g. your GitHub username, company name, or your last name), followed by a slash (/), followed by the theme name.

    This field must be 100 characters or less, and is case insensitive.
     

  • version
     

    Required. The semantic version of this theme. Used in TubePress's options GUI.
     

  • title
     

    Required. The human-readable title of this theme. Used in TubePress's options GUI.

    This field must be 255 characters or less.
     

  • authors
     

    Required. An array of one or more objects with at least the name property. name is the theme author's proper name (or company name). In addition to name, you may also include email, url, and role to identify each author's email address, URL, and role.

    The author name must be 200 characters or less.
     

  • license
     

    Required. An object defining the license(s) of this theme. Each license object must include a type property which uniquely identifies the software license. This can either be an abbreviation of an open source license, proprietary for closed-source themes, or a combination of these concatenated with the + symbol. Also required here is the urls property, which is an array of one or more URLs pointing to the appropriate license text(s).

    The type field must be 100 characters or less.
     

Optional Fields

Below is a sample theme.json with all the required and optional fields filled in.

{
    "name" : "tubepress/default",
    "version": "4.1.8",
    "title" : "Default",
    "authors" : [
        {
            "name" : "TubePress LLC",
            "url" : "http://tubepress.com"
        }
    ],
    "license": {
        "type" : "MPL-2.0",
        "urls" : [ "http://www.mozilla.org/MPL/2.0/" ]
    },
    "description" : "This is a sample theme used for educational purposes.",
    "keywords" : [ "sample", "bootstrap", "word" ],
    "urls" : {
        "homepage" : "http://foo.bar/home.html",
        "docs"     : "http://docs.mytheme.com/",
        "demo"     : "http://demo.site/test.php",
        "download" : "http://my.site/download.php",
        "bugs"     : "http://bugs.thistheme.com/report.php",
    },
    "screenshots" : [
        ["http://some.site.com/thumbnail.png", "http://some.site.com/fullsize.png"],
        ["http://absolute.path/to/thumb.jpg" ]
    ],
    "parent" : "tubepress/default",
    "resources" : {
        "scripts" : [ "js/script1.js", "js/anotherScript.js" ],
        "styles" : [ "css/style.css", "css/otherStyle.css" ]
    }
}

Let's go through each optional field one-by-one.

  • description
     

    Optional. A description of this theme. Used in TubePress's options GUI.

    This field must be 5000 characters or less.
     

  • keywords
     

    Optional. An array of keywords/tags associated with this theme. Used in TubePress's options GUI.

    Each keyword must be 30 characters or less.
     

  • urls
     

    Optional. An object defining relevant URLs on the web for this theme. This can help point your users in the right direction for support.

    homepage, docs, demo, download, and bugs are the only allowed properties here.
     

  • screenshots
     

    Optional. An array of arrays defining URLs to screenshots of the theme. Used in TubePress's options GUI.

    Each sub-array of the parent screenshot array must contain 1 or 2 absolute URLs to images. If given two image URLs, TubePress will use the first as the thumbnail image for the second. This leads to a better user experience and is the recommended format, however you may also use a single image URL which will be used for both the thumbnail and full-size preview. There are no size restrictions on these images, though we recommend that you keep your thumbnails to no larger than 200px by 200px.

    All image URLs must end with either .png or .jpg.
     

  • parent
     

    Optional. Defines the parent theme by its name property. See the hierarchical themes documentation for details on how this works.
     

  • parent
     

    Optional. An object that contains the scripts and/or styles properties, which in turn define the JavaScript script files and CSS stylesheets for this theme.

    Both the scripts and styles property values must be arrays containing relative paths (from the theme's root directory) to a CSS stylesheet or JavaScript script. CSS file paths must end in .css and JavaScript file paths must end in .js. Resources will be loaded in the order in which they are defined here, with any parent theme resources loaded first.
     



Last Updated Feb 17, 2016 04:32PM PST
c65861bf7a72e1a8878bdf73cabbbdbf@tubepress.desk-mail.com
http://assets1.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete