'en'|'ja'|'zh', // current locale // 'title' => 'Page title', // og/twitter title // 'desc' => 'Page description', // og/twitter description // 'base' => 'Laird_Lonergan_profile', // filename without lang suffix or .php // 'image' => 'https://www.sillylaird.ca/...', // optional, default og-default.png // 'image_alt' => 'alt text for the OG image', // optional // 'image_width' => 1200, 'image_height' => 630, // optional, override defaults // 'twitter_desc' => '...', // optional, defaults to $desc // 'type' => 'website'|'article'|'profile', // optional, default website // 'author' => 'Laird Lonergan', // optional, for articles // 'published' => '2026-05-26', // optional ISO date for articles // 'updated' => '2026-05-26', // optional ISO date // 'og_url' => 'https://www.sillylaird.ca/', // optional; defaults to self_url // ] $_lang = $meta['lang'] ?? 'en'; $_title = $meta['title'] ?? ''; $_desc = $meta['desc'] ?? ''; $_base = $meta['base'] ?? 'index'; $_image = $meta['image'] ?? 'https://www.sillylaird.ca/assets/img/og-default.png'; $_imgW = (int)($meta['image_width'] ?? 1200); $_imgH = (int)($meta['image_height'] ?? 630); $_imgAlt = $meta['image_alt'] ?? ($_title !== '' ? $_title : 'SillyLaird'); $_twDesc = $meta['twitter_desc'] ?? $_desc; $_type = $meta['type'] ?? 'website'; $_author = $meta['author'] ?? ''; $_published= $meta['published'] ?? ''; $_updated = $meta['updated'] ?? ''; $_suffix = ['en' => '', 'ja' => '_jp', 'zh' => '_zh'][$_lang] ?? ''; $_self = '/' . $_base . $_suffix . '.php'; // URL overrides let pages with non-default canonicals (e.g. the homepage, // whose EN canonical is the root "/" not "/index.php") reuse this partial. $_selfUrl = $meta['self_url'] ?? ('https://www.sillylaird.ca' . $_self); $_ogUrl = $meta['og_url'] ?? $_selfUrl; $_enUrl = $meta['en_url'] ?? ('https://www.sillylaird.ca/' . $_base . '.php'); $_jaUrl = $meta['ja_url'] ?? ('https://www.sillylaird.ca/' . $_base . '_jp.php'); $_zhUrl = $meta['zh_url'] ?? ('https://www.sillylaird.ca/' . $_base . '_zh.php'); $_xDefault = $meta['x_default'] ?? $_enUrl; $_ogLocale = ['en' => 'en_US', 'ja' => 'ja_JP', 'zh' => 'zh_CN'][$_lang]; $_h = fn(string $s) => htmlspecialchars($s, ENT_QUOTES, 'UTF-8'); ?>