Skip to content

Commit 71ce72b

Browse files
Use site.Home.Permalink instead of site.BaseURL in templates (adityatelange#1368)
* Update schema_json.html * Update breadcrumbs.html --------- Co-authored-by: mumuramuri <149406589+mumuramuri@users.noreply.github.com>
1 parent 21ae19b commit 71ce72b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

layouts/partials/breadcrumbs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- if (.Param "ShowBreadCrumbs") -}}
22
<div class="breadcrumbs">
3-
{{- $url := replace .Parent.Permalink (printf "%s" site.BaseURL) "" }}
3+
{{- $url := replace .Parent.Permalink (printf "%s" site.Home.Permalink) "" }}
44
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
55

66
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>

layouts/partials/templates/schema_json.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@context": "https://schema.org",
55
"@type": "{{- ( site.Params.schema.publisherType | default "Organization") | title -}}",
66
"name": {{ site.Title }},
7-
"url": {{ site.BaseURL }},
7+
"url": {{ site.Home.Permalink }},
88
"description": {{ site.Params.description | plainify | truncate 180 | safeHTML }},
99
"thumbnailUrl": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
1010
"sameAs": [
@@ -18,7 +18,7 @@
1818
</script>
1919
{{- else if (or .IsPage .IsSection) }}
2020
{{/* BreadcrumbList */}}
21-
{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }}
21+
{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }}
2222
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
2323
{{- $bc_list := (split $lang_url "/")}}
2424

0 commit comments

Comments
 (0)