diff --git a/layouts/partials/components/breadcrumb.html b/layouts/partials/components/breadcrumb.html
index 375c863..7bcd3cd 100644
--- a/layouts/partials/components/breadcrumb.html
+++ b/layouts/partials/components/breadcrumb.html
@@ -1,9 +1,9 @@
{{ $context := .Context }}
{{ $class := .Class }}
{{ $base := site.BaseURL }}
-{{ $url := replace $context.Permalink ( printf "%s" $base) "" }}
+{{ $pageLink := replace $context.Permalink $base "" }}
{{ $lang := $context.Lang }}
-{{ $.Scratch.Add "path" $base }}
+{{ $context.Scratch.Set "path" "/" }}
@@ -14,22 +14,28 @@
{{ i18n "home" | default "Home" }}
- {{ range $index, $element := split $url "/" }}
+ {{ range $index, $element := split $pageLink "/" }}
{{ if ne $element $lang }}
- {{ $.Scratch.Add "path" $element }}
+ {{ $context.Scratch.Add "path" $element }}
{{ else }}
- {{ $.Scratch.Add "path" (add $element "/") }}
+ {{ $context.Scratch.Add "path" (add $element "/") }}
{{ end }}
{{ if and (ne $element "") (ne $element $lang) }}
-
/
- {{ . }}
-
+ {{ if eq $element (path.BaseName $pageLink) }}
+
+ {{ . }}
+
+ {{ else }}
+
+ {{ . }}
+
+ {{ end }}
- {{ $.Scratch.Add "path" "/" }}
+ {{ $context.Scratch.Add "path" "/" }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/components/language-switcher.html b/layouts/partials/components/language-switcher.html
index 06d310d..330baed 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 (replace $context.RelPermalink $pageLang "") "//" "/") $base.Path "/" }}
{{ if $context.IsTranslated }}