summaryrefslogtreecommitdiff
path: root/layouts/partials/breadcrumbs.html
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-03-28 19:23:53 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-03-28 19:25:09 +0530
commit0f0e027def4bce325f810be4c9f4e3c3a9218b68 (patch)
treed0b9c92727698a0048f264c1e5340f5bcf00d967 /layouts/partials/breadcrumbs.html
parentfb4988cfb6d0d6e4e489f17d89f0fa618def3396 (diff)
Remove trailing and leading slashes off the $url for Breadcrumb gen;
so that no empty values remain in []interface fixes: #331
Diffstat (limited to 'layouts/partials/breadcrumbs.html')
-rw-r--r--layouts/partials/breadcrumbs.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 0ffbc09..bf1f4b2 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -1,6 +1,7 @@
{{- if (.Param "ShowBreadCrumbs")}}
<div class="breadcrumbs">
{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }}
+ {{- $url = (trim $url "/" ) }}
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home"}}</a>