{{- partial "cdn-fallback.html" . }} {{- $cdn := site.Params.cdn_domain | default "cdn.jsdelivr.net" }} {{- $seo := .Params.seo | default dict }} {{- /* Title: language-aware site title, descriptor on the homepage */}} {{- $title := printf "%s | %s" .Title site.Title }} {{- if .IsHome }} {{- $title = printf "%s — %s" site.Title (T "site_tagline") }} {{- else if eq .Kind "404" }} {{- $title = printf "%s | %s" (T "not_found_title") site.Title }} {{- end }} {{ $title }} {{- /* Description: seo block → front matter → summary → language-aware site description */}} {{- $desc := "" }} {{- with $seo.page_description }} {{- $desc = . }} {{- else with .Description }} {{- $desc = . }} {{- else }} {{- if and .IsPage .Summary }} {{- $desc = .Summary | plainify | htmlUnescape | strings.TrimSpace | truncate 155 }} {{- end }} {{- end }} {{- if not $desc }}{{ $desc = T "site_description" }}{{ end }} {{- if or $seo.no_index (eq .Type "components") (eq .Kind "404") }} {{- end }} {{- if ne .Kind "404" }} {{- $canonical := .Permalink }} {{- with $seo.canonical_url }}{{ $canonical = . | absURL }}{{ end }} {{- if .IsTranslated }} {{- $defaultLang := (index hugo.Sites 0).Language.Lang }} {{- range .AllTranslations }} {{- if eq .Language.Lang $defaultLang }} {{- end }} {{- end }} {{- end }} {{- end }} {{- /* Social images */}} {{- $shareImage := hugo.Data.general_settings.social_media_share_image }} {{- $twitterImage := hugo.Data.general_settings.social_media_twitter_image }} {{- if and (not .IsHome) .Params.image }} {{- $shareImage = .Params.image }} {{- $twitterImage = .Params.image }} {{- end }} {{- $locales := dict "en" "en_GB" "ja" "ja_JP" "zh" "zh_CN" }} {{- range .Translations }} {{- end }} {{- if .IsPage }} {{- if not .Date.IsZero }} {{- end }} {{- if not .Lastmod.IsZero }} {{- end }} {{- end }} {{- if .IsHome }} {{- with (index .Params.content_blocks 0) }} {{- if eq ._bookshop_name "hero" }} {{- end }} {{- end }} {{- end }} {{ $bookshop_scss_files := partial "bookshop_scss" . }} {{ $scss := $bookshop_scss_files | resources.Concat "css/bookshop.css" | css.Sass | resources.Minify | resources.Fingerprint }} {{ partial "schema.html" (dict "page" . "description" $desc) }}