Skip to content

Node.js based forum software built for the modern web

fix: use parent category as up link, closes #14784

Barış Soner Uşaklıe661c60f1f10
diff --git a/src/controllers/category.js b/src/controllers/category.js
index ada57f658b..35d8877b4c 100644
--- a/src/controllers/category.js
+++ b/src/controllers/category.js
@@ -240,7 +240,7 @@ function addTags(categoryData, res, currentPage) {
res.locals.linkTags = [
{
rel: 'up',
- href: url,
+ href: categoryData.parent ? `${url}/category/${categoryData.parent.slug}` : url,
},
{
rel: 'canonical',