From 8d9c4b3de7d89e11daf97b847da9a7e079c3013e Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Wed, 28 Feb 2024 10:08:21 +0100 Subject: [PATCH] fix debug option --- config.yaml | 2 +- layouts/partials/footer/debug.html | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config.yaml b/config.yaml index cc1d0dd9..65f5ea4d 100644 --- a/config.yaml +++ b/config.yaml @@ -1,7 +1,7 @@ params: debug: active: false - productionUrl: https://example.osuny.org + productionUrl: "" keycdn: https://osuny-1b4da.kxcdn.com cookie_banner: enable: false diff --git a/layouts/partials/footer/debug.html b/layouts/partials/footer/debug.html index a8a73171..86fc5ac3 100644 --- a/layouts/partials/footer/debug.html +++ b/layouts/partials/footer/debug.html @@ -177,8 +177,6 @@ </style> -{{ $productionUrl := index site.Params.debug "productionUrl" }} - <script> window.addEventListener('keydown', e => { if (e.ctrlKey && e.key === 'g') { @@ -277,7 +275,7 @@ function openInProd() { // To use this debug method, add params.productionUrl key to your hugo config.yaml - const productionUrl = "{{ $productionUrl }}"; + const productionUrl = "{{ site.Params.debug.productionUrl }}"; if (productionUrl) { window.open(`${productionUrl}${window.location.pathname}`); } -- GitLab