Enforce language url subsitution on path boundary for breadcrumbs (#254)
* Without this, the section name gets mangled when the language was a sub-string of the section. For example, under 'en', a section named "fragment" changes to "fragmt".
This commit is contained in:
parent
14ebcdecf3
commit
5e05ed6543
2 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@
|
|||
{{- else if (or .IsPage .IsSection) }}
|
||||
{{/* BreadcrumbList */}}
|
||||
{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{- $lang_url := replace $url ( printf "%s" .Lang) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||
{{- $bc_list := (split $lang_url "/")}}
|
||||
|
||||
{{- $scratch := newScratch }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue