Support and Documentation

Configuring a theme

Configuration files are a mechanism to define properties which impacts the way a theme interacts with Brightspot and Styleguide. Configurations may impact the behavior of your theme during development or at runtime.

Your configuration file contains:

Configuration files may be defined at the root of your styleguide directory or in a subdirectory. When placed in a subdirectory it is a best practice to keep your configuration local to the components in the same directory. If you accidentally define a configuration for a component outside of the same directory, Styleguide will try to warn you.

The global configuration is located at the root of your styleguide directory:

├── /styleguide
|   ├── <components directories here>
|   └── _config.json [Global Configuration]
└── package.json [required]

If you'd like to separate your configuration into component-specific configuration files, you can add includes to your global _config.json and use glob syntax:

{
  "includes": [
    "**/*.config.json"
  ]
}

Now you are able to define additional configuration files like so:

├── /styleguide
|   ├── component
|   |   ├── Component.hbs
|   |   └── _Component.config.json [Component Configuration]
|   └── _config.json [Global Configuration]
└── package.json [required]
  • Style Variations

  • Theme Fields

  • Data Modeling