The Site Config is used to define site-specific settings, such as required menus and page editor configuration.

The site config can be set one of two ways:

Option 1: site_config.json

The Site Config can be stored per theme in the local SFTP folder, in the "templates/site_config.json" file.

Find the URL to the SFTP folder under the "Site Config" tab:

  1. Open the "Sites" tab
  2. Click "Configure Site" on the target site
  3. Select the "Site Config" tab

Option 2: Site Config Tab

The Site Config can also be entered directly into the textbox in the "Site Config" tab:

  1. Open the "Sites" tab
  2. Click "Configure Site" on the target site
  3. Select the "Site Config" tab
  4. Enter the config as JSON in the textbox.

Site Config Syntax

The Site Config is defined as JSON:

{
  // Required Menus
  // If defined here, missing menus can be auto-generated on the "Menus" tab
  "menus": [
    { "name": "Main Menu", "tag": "main", "max_depth": 2 }
  ],

  // (For integrations) Path where redirect listing will be exported by a site component
  // * Requires a site component that will generate a JSON export of all redirects to this path
  // * Path should be relative to URL Prefix
  "redirect_listing_path": "jshcms_redirects.json", 

  // Default GUI page editor config
  "defaultEditorConfig": {
    // Web snippets listing path
    "webSnippetsPath": "/templates/websnippets/listing.html",

    // Whether to enable Material Icons in the Editor
    //   If enabled, Material Icons Font CSS Link must be added to the Page Template HTML
    "materialIcons": false  
  },

  // Default values for Template Variables
  "template_variables": {
    "key": "value"
  },

  //Media Thumbnail Configuration
  "media_thumbnails": {
    "thumbnail_id": {
      //(Optional) Resize thumbnail to fit within target width and height
      "resize": [150, 150],  // [width, height]

      //(Optional) Crop thumbnail to target width and height
      "crop": [150, 150],  // [width, height]

      //(Optional) Resample thumbnail to target format (jpg, png, gif, tif)
      "format": "jpg",

      //(Optional) Export thumbnail on publish, as filename.thumbnail_id.extension
      "export": true,

      //(Optional) Add an srcset responsive breakpoint to IMG tags on publish
      //  (bool) If set to true, the thumbnail width will be used as the srcset condition, ex "150w"
      //  (string) The value to be used as the srcset condition, ex. "1x" "2x" "2048w"
      "responsive": true,
    },

    //Default Thumbnails
    "file_tile": { "resize": [150, 150], "format": "jpg" },
    "file_preview": { "resize": [300, 300], "format": "jpg" },
    "small": { "resize": [512, 384] },
    "medium": { "resize": [1024, 768] },
    "large": { "resize": [2048, 1538] },

    //(Optional) Set a maximum image size for uploaded media
    "maximum": { "resize": [2048, 1538] }
  }
}
Loading
Loading