From bdf6d800c0463c583e0b3650a7aeef157864a65d Mon Sep 17 00:00:00 2001 From: Nicolas Friedli Date: Fri, 27 Dec 2024 19:21:06 +0100 Subject: [PATCH] Ajout d'une notion de canonicalDomain. --- hugo.toml | 1 + layouts/_default/baseof.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hugo.toml b/hugo.toml index 94febf9..a0aa202 100644 --- a/hugo.toml +++ b/hugo.toml @@ -40,6 +40,7 @@ keepWhitespace = true [params] images = ["/images/opengraph.jpg"] +canonicalDomain = "https://nicolasfriedli.ch" [params.author] name = "Nicolas Friedli" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f3562b5..4969b15 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,8 +11,8 @@ {{ partialCached "head/favicon" . }} - - {{ if not (hasPrefix .Permalink "https://nicolasfriedli.ch/") }} + + {{ if not (hasPrefix .Permalink site.Params.canonicalDomain) }} {{ end }}