mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Remove trailing and leading slashes off the $url for Breadcrumb gen;
so that no empty values remain in []interface fixes: #331
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
{{- else if (or .IsPage .IsSection) }}
|
||||
{{/* BreadcrumbList */}}
|
||||
{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{- $url = (trim $url "/" ) }}
|
||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||
{{- $bc_list := (split $lang_url "/")}}
|
||||
|
||||
|
Reference in New Issue
Block a user