mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 14:14:04 +00:00
Forms part of the transition from Microdata to JSON-LD. BREAKING CHANGES Upgrades to your `params.toml` file are required: - Address field has been split into semantic parts - Latitude and longitude have moved under `coordinates` option - Map settings have moved under `[map]` section - Office hours can now be specified more simply, as a list - Added optional `list_delimiter` option for formatting addresses See #413
24 lines
629 B
HTML
24 lines
629 B
HTML
{{ $page := .page }}
|
|
{{ $summary := .summary }}
|
|
{{ $site_type := site.Params.site_type | default "Person" }}
|
|
|
|
{{- if $page.IsHome -}}
|
|
|
|
{{ partial "jsonld/website.html" $page }}
|
|
|
|
{{ if ne $site_type "Person" }}
|
|
{{ partial "jsonld/business.html" $page }}
|
|
{{ end }}
|
|
|
|
{{- else if $page.IsPage -}}
|
|
|
|
{{ if (eq $page.Type "post") | or (eq $page.Type "publication") | or (eq $page.Type "project") }}
|
|
{{ partial "jsonld/article.html" (dict "page" $page "summary" $summary) }}
|
|
{{ end }}
|
|
|
|
{{ if eq $page.Type "talk" }}
|
|
{{ partial "jsonld/event.html" (dict "page" $page "summary" $summary) }}
|
|
{{ end }}
|
|
|
|
{{- end }}
|