{{- $title := cond .IsHome site.Title (printf "%s · %s" .Title site.Title) -}} {{- $description := .Description | default .Summary | default site.Params.description | default site.Title | plainify -}} {{ $title }} {{/* Theme flash prevention — must run before */}} {{/* SEO: OpenGraph + Twitter Cards + JSON-LD Article */}} {{ partial "head/seo.html" . }} {{/* RSS autodiscovery */}} {{- with .OutputFormats.Get "RSS" }} {{- end }} {{/* hreflang alternates — emit only on multilingual sites */}} {{- if hugo.IsMultilingual }} {{- range .AllTranslations }} {{- end }} {{- with site.Home }}{{- end }} {{- end }} {{/* Pagination prev/next for SEO — only on paginated kinds with >1 page */}} {{- if or (eq .Kind "section") (eq .Kind "taxonomy") (eq .Kind "term") }} {{- with .Paginator }} {{- if gt .TotalPages 1 }} {{- if .HasPrev }}{{ end }} {{- if .HasNext }}{{ end }} {{- end }} {{- end }} {{- end }} {{/* Favicon — SVG only; sites can override head.html to add an .ico fallback */}} {{/* Speculation Rules — Chromium prefetch hints; gated, off by default */}} {{- $prefetch := site.Params.prefetch -}} {{- if and $prefetch $prefetch.enable }} {{- end }} {{/* Preconnect to Giscus on comment-enabled posts to shave third-party DNS+TLS handshake */}} {{- $giscusCfg := site.Params.comments.giscus -}} {{- if and (eq .Kind "page") $giscusCfg $giscusCfg.enable $giscusCfg.repo $giscusCfg.repoId $giscusCfg.categoryId (ne .Params.comments false) }} {{- end }} {{/* Theme CSS — per-page-kind bundles. Core loads everywhere; kind-specific bundles add only when needed. */}} {{- $coreFiles := slice (resources.Get "css/tokens.css") (resources.Get "css/reset.css") (resources.Get "css/typography.css") (resources.Get "css/layout.css") (resources.Get "css/components.css") (resources.Get "css/view-transitions.css") -}} {{- $core := $coreFiles | resources.Concat "css/tsuki.core.css" | minify | fingerprint -}} {{- if .IsHome }} {{- $home := resources.Get "css/home.css" | minify | fingerprint -}} {{- end }} {{- if eq .Kind "page" }} {{- $singleFiles := slice (resources.Get "css/toc.css") (resources.Get "css/callouts.css") (resources.Get "css/comments.css") (resources.Get "css/single-extras.css") -}} {{- $single := $singleFiles | resources.Concat "css/tsuki.single.css" | minify | fingerprint -}} {{- end }} {{- if eq .Section "archives" }} {{- $archive := resources.Get "css/archive.css" | minify | fingerprint -}} {{- end }}