Skip to content

Commit

Permalink
Use site.Home.Permalink instead of site.BaseURL in templates (#1368)
Browse files Browse the repository at this point in the history
* Update schema_json.html

* Update breadcrumbs.html

---------

Co-authored-by: mumuramuri <[email protected]>
  • Loading branch information
ytrepidorosonomous and ytrepidorosonomous authored Jan 7, 2024
1 parent 21ae19b commit 71ce72b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/templates/schema_json.html
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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 "/")}}

Expand Down

0 comments on commit 71ce72b

Please sign in to comment.