diff --git a/node/blog.js b/node/blog.js index 00ab6a7..a3dfd17 100644 --- a/node/blog.js +++ b/node/blog.js @@ -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; } } \ No newline at end of file