Skip to content

Configuration files

haskelt edited this page Feb 1, 2022 · 10 revisions

Salal is designed to make it easy for you to customize its behavior for your particular use cases. One way this can be done is with configuration files.

Structure of configuration files

Configuration files should be in JSON format, and have two main sections, both of which are optional:

  • Globals
  • Parameters

Globals are values that can be substituted into source files. For example, this config file defines a global variable special_style_file.

{
    "globals": { 
        "special_style_file": "/css/style_for_sally.css"
    }
}

This value can then be referenced in a template like this:

<link rel="stylesheet" href="{{globals.special_style_file}}" type="text/css" />

Parameters change how Salal operates. For example, the paths subsection tells Salal where to look for various files. In the example below, we specify where to look for the user config file (the different kinds of config files are explained more below).

{
    "parameters": {
        "paths": {
            "user_config_file": "~/.salal/user_config.json"
        }
    }
}

When you run Salal, it will look for 5 different configuration files:

  • System
  • User
  • Theme
  • Project
  • Profile These configuration files all have the same format, and are processed in the order shown above. A file lower in the list can

Clone this wiki locally