From b9e97bcc0beb5e173e9ce894a9873a6bc7c21934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 5 Nov 2022 23:57:11 +0100 Subject: [PATCH] theme: fix multilang links when site served from subdirectory #370 --- layouts/partials/menu.html | 4 ++-- layouts/partials/relLangPrettyUglyURL.hugo | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index b7aabc5b3f..c0b56f7b93 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -76,9 +76,9 @@ {{- range $siteLanguages }} {{- if eq $translation.Lang .Lang }} {{- if eq $pageLang .Lang }} - + {{- else }} - + {{- end }} {{- end }} {{- end }} diff --git a/layouts/partials/relLangPrettyUglyURL.hugo b/layouts/partials/relLangPrettyUglyURL.hugo index 84e1fb30a2..6d79bdb942 100644 --- a/layouts/partials/relLangPrettyUglyURL.hugo +++ b/layouts/partials/relLangPrettyUglyURL.hugo @@ -1,9 +1,6 @@ {{- $page := .page }} {{- $to := .to }} {{- $link := $to.RelPermalink }} -{{- if not .isTranslation }} - {{- $link = $link | relLangURL }} -{{- end }} {{- if and .page.Site.Params.uglyURLs (eq (substr $link -1) "/") }} {{- $link = printf "%sindex.html" $link }} {{- end }}