From cef1b8593a182b1dc7ca2cc74b5ec91f276eab7a Mon Sep 17 00:00:00 2001 From: somrat sorkar Date: Mon, 5 Jun 2023 16:48:12 +0600 Subject: [PATCH] modified language switcher --- layouts/partials/components/language-switcher.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/components/language-switcher.html b/layouts/partials/components/language-switcher.html index 330baed..d1de458 100644 --- a/layouts/partials/components/language-switcher.html +++ b/layouts/partials/components/language-switcher.html @@ -4,7 +4,7 @@ {{ $pageLang := $context.Lang }} {{ $base:= urls.Parse site.BaseURL }} {{ $siteLanguages := site.Home.AllTranslations }} -{{ $pageLink := replace (replace (replace $context.RelPermalink $pageLang "") "//" "/") $base.Path "/" }} +{{ $pageLink := replace (replace $context.RelPermalink (add $pageLang "/") "") $base.Path "/" }} {{ if $context.IsTranslated }}