|
| 1 | +{{- if ne .Page.Params.schema false -}} |
| 2 | +{{- $rawParts := split .RelPermalink "/" -}} |
| 3 | +{{- $urlParts := slice -}} |
| 4 | +{{- range $rawParts -}} |
| 5 | + {{- if ne . "" -}} |
| 6 | + {{- $urlParts = $urlParts | append . -}} |
| 7 | + {{- end -}} |
| 8 | +{{- end -}} |
| 9 | + |
| 10 | +{{- $baseURL := .Site.BaseURL -}} |
| 11 | +{{- $breadcrumbs := slice -}} |
| 12 | +{{- $accumulated := slice -}} |
| 13 | + |
| 14 | +{{- range $i, $part := $urlParts -}} |
| 15 | + {{- $accumulated = $accumulated | append $part -}} |
| 16 | + {{- $breadcrumbs = $breadcrumbs | append (dict |
| 17 | + "position" (add $i 4) |
| 18 | + "name" (title $part) |
| 19 | + "item" (print $baseURL "/" (delimit $accumulated "/")) |
| 20 | + ) -}} |
| 21 | +{{- end -}} |
| 22 | + |
| 23 | +{{- $defaultHeadline := printf "Bootstrap %s component documentation" .Page.Params.title -}} |
| 24 | +{{- $defaultDescription := printf "Documentation and usage examples for Bootstrap %s component built with CoreUI" .Page.Params.title -}} |
| 25 | + |
| 26 | +{{ if in .RelPermalink "getting-started" }} |
| 27 | + {{- $defaultHeadline = "CoreUI for Bootstrap customization and styling documentation" -}} |
| 28 | + {{- $defaultDescription = "Complete guide to CoreUI customization and theming. Learn how to customize CoreUI Bootsrap components, styles, and themes to fit your project's needs." -}} |
| 29 | +{{- end -}} |
| 30 | + |
| 31 | +{{ if in .RelPermalink "customize" }} |
| 32 | + {{- $defaultHeadline = "CoreUI for Bootstrap customization and styling documentation" -}} |
| 33 | + {{- $defaultDescription = "Complete guide to CoreUI customization and theming. Learn how to customize CoreUI Bootsrap components, styles, and themes to fit your project's needs." -}} |
| 34 | +{{- end -}} |
| 35 | + |
| 36 | +{{ if in .RelPermalink "layout" }} |
| 37 | + {{- $defaultHeadline = printf "Bootstrap %s documentation" .Page.Params.title -}} |
| 38 | + {{- $defaultDescription = printf "Documentation and usage examples for Bootstrap %s built with CoreUI" .Page.Params.title -}} |
| 39 | +{{- end -}} |
| 40 | + |
| 41 | +{{ if in .RelPermalink "content" }} |
| 42 | + {{- $defaultHeadline = printf "Bootstrap %s documentation" .Page.Params.title -}} |
| 43 | + {{- $defaultDescription = printf "Documentation and usage examples for Bootstrap %s built with CoreUI" .Page.Params.title -}} |
| 44 | +{{- end -}} |
| 45 | + |
| 46 | +{{ if in .RelPermalink "helpers" }} |
| 47 | + {{- $defaultHeadline = printf "Bootstrap %s helper classes documentation" .Page.Params.title -}} |
| 48 | + {{- $defaultDescription = printf "Documentation and usage examples for Bootstrap %s helper classes built with CoreUI" .Page.Params.title -}} |
| 49 | +{{- end -}} |
| 50 | + |
| 51 | +{{ if in .RelPermalink "utilities" }} |
| 52 | + {{- $defaultHeadline = printf "Bootstrap %s CSS utility classes documentation" .Page.Params.title -}} |
| 53 | + {{- $defaultDescription = printf "Documentation and usage examples for Bootstrap %s CSS utility classes built with CoreUI" .Page.Params.title -}} |
| 54 | +{{- end -}} |
| 55 | + |
| 56 | +{{ if in .RelPermalink "migration" }} |
| 57 | + {{- $defaultHeadline = .Page.Params.title -}} |
| 58 | + {{- $defaultDescription = "Complete guide to CoreUI for Bootstrap migration. Track and review changes to the CoreUI for Bootstrap components to help you migrate to the latest version." -}} |
| 59 | +{{- end -}} |
| 60 | + |
| 61 | +{{ if in .RelPermalink "templates" }} |
| 62 | + {{- $defaultHeadline = .Page.Params.title -}} |
| 63 | + {{- $defaultDescription = "Complete guide to CoreUI Bootstrap Templates. Learn how to download, install, customize, and use CoreUI Bootstrap templates." -}} |
| 64 | +{{- end -}} |
| 65 | + |
| 66 | +{{- $headline := default $defaultHeadline .Page.Params.schema.headline -}} |
| 67 | +{{- $description := default $defaultDescription .Page.Params.schema.description -}} |
| 68 | + |
| 69 | +<script type="application/ld+json"> |
| 70 | +[{ |
| 71 | + "@context": "https://schema.org", |
| 72 | + "@type": "BreadcrumbList", |
| 73 | + "itemListElement": [ |
| 74 | + { |
| 75 | + "@type": "ListItem", |
| 76 | + "position": 1, |
| 77 | + "name": "CoreUI", |
| 78 | + "item": "https://coreui.io" |
| 79 | + }, |
| 80 | + { |
| 81 | + "@type": "ListItem", |
| 82 | + "position": 2, |
| 83 | + "name": "React", |
| 84 | + "item": "https://coreui.io/bootstrap/" |
| 85 | + }, |
| 86 | + { |
| 87 | + "@type": "ListItem", |
| 88 | + "position": 3, |
| 89 | + "name": "Documentation", |
| 90 | + "item": "{{ $baseURL }}" |
| 91 | + }{{ if gt (len $breadcrumbs) 0 }},{{ end }} |
| 92 | + {{ range $i, $crumb := $breadcrumbs }} |
| 93 | + { |
| 94 | + "@type": "ListItem", |
| 95 | + "position": {{ $crumb.position }}, |
| 96 | + "name": "{{ $crumb.name }}", |
| 97 | + "item": "{{ $crumb.item }}/" |
| 98 | + }{{ if ne (add $i 1) (len $breadcrumbs) }},{{ end }} |
| 99 | + {{ end }} |
| 100 | + ] |
| 101 | +}, |
| 102 | +{ |
| 103 | + "@context": "https://schema.org", |
| 104 | + "@type": "TechArticle", |
| 105 | + "headline": "{{ $headline | markdownify }}", |
| 106 | + "description": "{{ $description | markdownify }}", |
| 107 | + "author": { |
| 108 | + "@type": "Organization", |
| 109 | + "name": "CoreUI Team", |
| 110 | + "sameAs": "https://github.com/coreui/" |
| 111 | + }, |
| 112 | + "publisher": { |
| 113 | + "@type": "Organization", |
| 114 | + "name": "CoreUI", |
| 115 | + "logo": { |
| 116 | + "@type": "ImageObject", |
| 117 | + "url": "https://coreui.io/images/brand/coreui-logo.svg" |
| 118 | + } |
| 119 | + }, |
| 120 | + "datePublished": "2023-07-05", |
| 121 | + "dateModified": "{{ time.Now | time.Format "2006-01-02" }}", |
| 122 | + "mainEntityOfPage": { |
| 123 | + "@type": "WebPage", |
| 124 | + "@id": "{{ .Permalink }}" |
| 125 | + }, |
| 126 | + "version": {{ if .Page.Params.pro_component }}"5.15"{{ else }}"5.4.1"{{ end }}, |
| 127 | + "proficiencyLevel": "Beginner" |
| 128 | +}] |
| 129 | +</script> |
| 130 | +{{- end -}} |
0 commit comments