From fe7fddaa3035245ae608d96b8ee3899da023967a Mon Sep 17 00:00:00 2001 From: jamesnulliu Date: Thu, 21 Nov 2024 16:03:56 +0800 Subject: [PATCH] Update header.html Add `site.Params.disableLangToggle` to disable language switch toggle if set to true. --- layouts/partials/header.html | 44 +++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 44336e1f14..eba25eeb96 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -95,27 +95,29 @@ {{- end }} - - {{- $lang := .Lang}} - {{- $separator := or $label_text (not site.Params.disableThemeToggle)}} - {{- with site.Home.Translations }} - + + {{- if (not site.Params.disableLangToggle) }} + {{- $lang := .Lang}} + {{- $separator := or $label_text (not site.Params.disableThemeToggle)}} + {{- with site.Home.Translations }} + + {{- end }} {{- end }}