only link to posts with the same main category
All checks were successful
Web/pipeline/head This commit looks good
All checks were successful
Web/pipeline/head This commit looks good
This commit is contained in:
parent
0271b1563c
commit
513f54bb2e
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ function getAdjacentPost(json, index, move) {
|
||||||
let post = json[index];
|
let post = json[index];
|
||||||
if (!post)
|
if (!post)
|
||||||
break;
|
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;
|
return post;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue