From 36ddccd2655d1fcfde1643dbf71697e6a61d7ced Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Fri, 9 Oct 2026 14:44:27 -0400 Subject: [PATCH] Add a canonical link to every page The Netlify production build serves a second, indexable copy of the site at nwborg.netlify.app, and pages can also be linked with tracking parameters. A canonical link tells search engines that the nwb.org address is the one to index. The paginated news list is left out. Hugo gives every page of that list the same `.Permalink`, so a canonical link there would point page 2 at page 1. Co-Authored-By: Claude Opus 5.5 (1M context) --- layouts/partials/essentials/head.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/essentials/head.html b/layouts/partials/essentials/head.html index a2fcfcc..dbb90e1 100644 --- a/layouts/partials/essentials/head.html +++ b/layouts/partials/essentials/head.html @@ -21,6 +21,12 @@ {{/* Favicon */}} +{{/* Canonical URL. The pages of the paginated news list all share one + .Permalink, so that list is left without a canonical link. */}} +{{ if not (and .IsSection (eq .Section "news")) }} + +{{ end }} + {{/* Styles */}} {{ $plugin := slice }} {{ $plugin := $plugin | append (resources.Get "scss/plugins.scss" | resources.ExecuteAsTemplate "plugins.scss" . | toCSS) }}