Use `site.Home.Permalink` instead of `site.BaseURL` in templates (#1368)
* Update schema_json.html * Update breadcrumbs.html --------- Co-authored-by: mumuramuri <149406589+mumuramuri@users.noreply.github.com>
This commit is contained in:
parent
21ae19bc2b
commit
71ce72b1bf
|
@ -1,6 +1,6 @@
|
|||
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||
<div class="breadcrumbs">
|
||||
{{- $url := replace .Parent.Permalink (printf "%s" site.BaseURL) "" }}
|
||||
{{- $url := replace .Parent.Permalink (printf "%s" site.Home.Permalink) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
||||
|
||||
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"@context": "https://schema.org",
|
||||
"@type": "{{- ( site.Params.schema.publisherType | default "Organization") | title -}}",
|
||||
"name": {{ site.Title }},
|
||||
"url": {{ site.BaseURL }},
|
||||
"url": {{ site.Home.Permalink }},
|
||||
"description": {{ site.Params.description | plainify | truncate 180 | safeHTML }},
|
||||
"thumbnailUrl": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
||||
"sameAs": [
|
||||
|
@ -18,7 +18,7 @@
|
|||
</script>
|
||||
{{- else if (or .IsPage .IsSection) }}
|
||||
{{/* BreadcrumbList */}}
|
||||
{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }}
|
||||
{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||
{{- $bc_list := (split $lang_url "/")}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue