{{- /* Head custom content area start */ -}} {{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the
section of every page. */ -}} {{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} {{- /* Enable reveal-on-scroll states only when motion is allowed. Runs before paints so there is no content flash and no layout shift for reduced-motion / no-JS visitors. */ -}} {{- /* Preconnect hints for external resources */ -}} {{- /* Google Fonts — async (non-render-blocking) */ -}} {{- /* Space Grotesk + the 700 weights of Inter / JetBrains Mono moved here from a render-blocking @import that used to live in homepage-daypage.css — one consolidated async request. */ -}} {{- $baseFonts := "https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,700;1,9..144,300;1,9..144,400;1,9..144,700&family=Inter:wght@400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@500;600;700&display=swap" -}} {{- /* Google Fonts — fully async via preload + noscript fallback. Use media="print" on the noscript fallback to prevent Chrome's speculative parser from issuing a duplicate request (the preload already triggers one). The tiny media-query mismatch guarantees the print vs screen conflict is harmless — anything that actually reads the print stylesheet will still render the fonts correctly. */ -}} {{- if eq .Lang "zh" }} {{- $zhFonts := "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap" -}} {{- end }} {{- /* SEO Structured Data handled by seo.html → seo/structured-data.html */ -}} {{- /* Language Auto-Detection Script */ -}} {{- /* Preload hero/LCP image on homepage */ -}} {{- if .IsHome }} {{- with site.Params.profileMode.imageUrl }} {{- end }} {{- end }} {{- /* Search Command Palette dependencies. fuse.js is self-hosted (assets/js/vendor/fuse.min.js): jsdelivr is unreliable from mainland China and cost an extra third-party connection on every page. Fingerprinted → 1-year immutable cache. */ -}} {{- $fuseJS := resources.Get "js/vendor/fuse.min.js" | fingerprint }} {{- $searchPaletteJS := resources.Get "js/search-palette.js" | minify | fingerprint }} {{- /* Head custom content area end */ -}}