Last updated

env

The env option allows you to customize the redocly.yaml configuration based on the current environment. You can override the configuration by adding the necessary nested options directly or by creating an environment configuration file in the root directory and referencing it in the env option.

Options

OptionTypeDescription
preview[Redocly config or Reference object]Configuration for the preview environment.
development[Redocly config or Reference object]Configuration for the development environment.
production[Redocly config or Reference object]Configuration for the production environment.

Reference object

OptionTypeDescription
$refstringEnvironment configuration file name

Examples

The following example demonstrates how to override specific configuration options inline within the env option:

env:
  preview:
    breadcrumbs:
      hide: true
    logo:
      image: ./images/custom-logo.png

Or how to set the environment configuration for the preview environment by referencing an external file:

env:
  preview:
    $ref: redocly.preview.yaml

The following example shows a preview environment configuration file that overrides the default configuration:

redocly.preview.yaml

breadcrumbs:
  hide: true
logo:
  image: ./images/redocly.png
navbar:
  items:
    - label: External docs
      href: https://redocly.com