From 71ce72b1bfb868b406c369c958f8682c63940e01 Mon Sep 17 00:00:00 2001
From: flexxindicomplex <149406589+flexxindicomplex@users.noreply.github.com>
Date: Sun, 7 Jan 2024 13:41:23 +0300
Subject: [PATCH] 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>
---
layouts/partials/breadcrumbs.html | 2 +-
layouts/partials/templates/schema_json.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 7e8257b..2686ca0 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -1,6 +1,6 @@
{{- if (.Param "ShowBreadCrumbs") -}}
- {{- $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 -}}
{{ i18n "home" | default "Home" }}
diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html
index 435cba5..3e6565d 100644
--- a/layouts/partials/templates/schema_json.html
+++ b/layouts/partials/templates/schema_json.html
@@ -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 @@
{{- 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 "/")}}