Welcome to mirror list, hosted at ThFree Co, Russian Federation.

schema.html « components « partials « layouts - github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 001138bd39a61d13f3a2e180531a01080f6b639d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<meta name="description"
  content="{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ end }}">

{{- $bundles := partial "get-bundles" . }}
{{- if gt (len $bundles) 1 }}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {{- range $index, $value := $bundles.Reverse -}}
    {{- if gt $index 0 -}},{{- end -}}
    {
      "@type": "ListItem",
      "position": {{- add $index 1 -}},
      "name": {{- .LinkTitle -}},
      "item": {{- .Permalink -}}
    }
    {{- end -}}
  ]
}
</script>
{{- end }}

{{/*  Deprecation warning(v1.0.0) starts */}}
{{ $layout := partial "utils/hyphenate" (.Layout | default .Type) }}
{{/*  Deprecation warning(v1.0.0) ends */}}
{{- if and (eq .Type "docs") (ne $layout "doc-list") }}
{{- partial "components/schema-page" . }}
{{- else if or (eq .Kind "section") (eq .Kind "term") }}
{{- partial "components/schema-node" . }}
{{- else if .IsPage }}
{{- partial "components/schema-page" . }}
{{- end }}