From c1407fa9fb558e42588aa194a53e78a087f045f0 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 18 Apr 2026 17:05:55 +0200 Subject: fix: enable related articles widget on article pages The related widget was not displaying because the condition used .Type (the article's frontmatter type field like "life", "tech") instead of .Section (the content section like "articles"). Changed condition from eq .Type "articles" to eq .Section "articles". Also added Hugo's [related] configuration block to enable content matching by categories (weight 100) and tags (weight 80) with an 80% threshold for finding related posts. Co-Authored-By: Claude Haiku 4.5 --- hugo.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hugo.toml') diff --git a/hugo.toml b/hugo.toml index 7e63a2b..b7e0663 100644 --- a/hugo.toml +++ b/hugo.toml @@ -137,6 +137,20 @@ enableRobotsTXT = true color_dark = "#a855f7" color_light = "#7c3aed" +# Related content configuration +[related] + threshold = 80 + includeNewer = true + toLower = true + + [[related.indices]] + name = "categories" + weight = 100 + + [[related.indices]] + name = "tags" + weight = 80 + [[redirects]] from = '/it/**' to = '/it/404.html' -- cgit v1.2.3