diff --git a/ahoy.drupal.yml b/ahoy.drupal.yml index ede547584880db89ca48e151fa5742079b9f9a54..c6828709628072af06c78249e1843684800a8f64 100644 --- a/ahoy.drupal.yml +++ b/ahoy.drupal.yml @@ -6,11 +6,29 @@ commands: echo "DRUPAL_LIVE=1" >>.env env -i $(cat .env | xargs) >.env composer lakedrops:config --no-interaction - usage: Turn live mode on - ATTENTION - you should run drush cr afterwards + drush cr + usage: Turn live mode on. dev: cmd: | DRUPAL_LIVE=0 echo "DRUPAL_LIVE=0" >>.env env -i $(cat .env | xargs) >.env composer lakedrops:config --no-interaction - usage: Turn live mode off - ATTENTION - you should run drush cr afterwards + drush cr + usage: Turn live mode off. + rcon: + cmd: | + RENDERER_CONFIG_DEBUG=1 + echo "RENDERER_CONFIG_DEBUG=1" >>.env + env -i $(cat .env | xargs) >.env + composer lakedrops:config --no-interaction + drush cr + usage: Turn on renderer config debug mode + rcoff: + cmd: | + RENDERER_CONFIG_DEBUG=0 + echo "RENDERER_CONFIG_DEBUG=0" >>.env + env -i $(cat .env | xargs) >.env + composer lakedrops:config --no-interaction + drush cr + usage: Turn off renderer config debug mode diff --git a/src/Handler.php b/src/Handler.php index 5fcad4d323a938d6ffeeffcfe36b4d9ce05cfcf1..985c6b10b91a93f7b34887998f009db23699c9b7 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -59,6 +59,9 @@ class Handler extends BaseHandler { 'domain' => str_replace(['.', '-'], ['\\.', '\\-'], 'www.example.com'), 'aliases' => [], 'live' => (getenv('LAKEDROPS_BUILD_NG') === 'yes') || !empty($this->env->receiveGlobal('DRUPAL_LIVE', 'Live mode', '0')), + 'renderer_config' => [ + 'debug' => $this->env->receiveGlobal('RENDERER_CONFIG_DEBUG', '', '0'), + ], ]; } diff --git a/templates/services.yml.twig b/templates/services.yml.twig index 50f58553baa4cd0d62e273956996ddeba2df85f2..1144d2af55e3e850e66c2ebdedbfc31cbe5fc78b 100644 --- a/templates/services.yml.twig +++ b/templates/services.yml.twig @@ -14,6 +14,7 @@ parameters: max-age: 0 contexts: ['session', 'user'] tags: [] + debug: {{ renderer_config.debug ? 'true' : 'false' }} http.response.debug_cacheability_headers: false factory.keyvalue: {}