From 17d48ce9bb9be4f462963edfe40d56c412d32c2d Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:31:00 +0530 Subject: [PATCH] add structured data for breadcrumb nav https://developers.google.com/search/docs/data-types/breadcrumb --- layouts/partials/templates/schema_json.html | 43 ++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html index 5cf407e..6e71082 100644 --- a/layouts/partials/templates/schema_json.html +++ b/layouts/partials/templates/schema_json.html @@ -16,7 +16,46 @@ ] } -{{- else if .IsPage }} +{{- else if (or .IsPage .IsSection) }} +{{/* BreadcrumbList */}} +{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }} +{{- $lang_url := replace $url ( printf "%s" .Lang) "" }} +{{- $bc_list := (split $lang_url "/")}} + +{{- $scratch := newScratch }} + +{{- if .IsPage }} +{{ end }}{{/* .IsPage end */}} + {{ end }}