pages: add self-referential canonicals to episode pages
pagefind-highlight appends ?highlight= to episode URLs, which would
otherwise read as duplicates of the unparameterized page.
Assisted-by: Claude Opus 5 via Claude Code
diff --git a/Rakefile b/Rakefile
index 7f948c1..1193b47 100644
--- a/Rakefile
+++ b/Rakefile
@@ -120,6 +120,9 @@ EPISODE_TASKS.each do |et|
page_vars: { ep: },
layout_vars: {
title: "#{CGI.escapeHTML("#{ep.fetch(:number)}. #{ep.fetch(:title)}")} — Cooking Issues",
+ # Self-referential so pagefind-highlight's ?highlight= URLs don't read
+ # as duplicates.
+ head: %(<link rel="canonical" href="#{BASE_URL}/#{et.slug}.html" />\n),
styles: <<~CSS,
body { padding-bottom: 5rem; }
h1 { font-size: 1.3rem; margin-bottom: 0.5rem; }