summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hugo.toml14
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/sidebar.html2
2 files changed, 15 insertions, 1 deletions
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'
diff --git a/themes/danix-xyz-hacker/layouts/partials/sidebar.html b/themes/danix-xyz-hacker/layouts/partials/sidebar.html
index f80c2cf..dc263e6 100644
--- a/themes/danix-xyz-hacker/layouts/partials/sidebar.html
+++ b/themes/danix-xyz-hacker/layouts/partials/sidebar.html
@@ -13,7 +13,7 @@
{{ partial "social-share.html" (dict "page" . "mode" "sidebar") }}
<!-- Related posts widget (articles only) -->
- {{ if and .Site.Params.relatedPosts (eq .Type "articles") }}
+ {{ if and .Site.Params.relatedPosts (eq .Section "articles") }}
{{ $related := first 5 (.Site.RegularPages.Related .) }}
<hr class="sidebar-hr">
<div class="sidebar-widget">