only link to posts with the same main category
Web/pipeline/head This commit looks good Details

This commit is contained in:
Ell 2021-03-31 02:55:17 +02:00
parent 0271b1563c
commit 513f54bb2e
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ function getAdjacentPost(json, index, move) {
let post = json[index];
if (!post)
break;
if (post.cat.includes(cat) && !post.archived)
// only link to posts with the same main category
if (post.cat[0] === cat && !post.archived)
return post;
}
}