Skip to content

Commit

Permalink
Removed page tags and categories from json output
Browse files Browse the repository at this point in the history
Pages don't support tags and categories.
Closes wzpan#54
  • Loading branch information
crycode-de committed Apr 8, 2024
1 parent 1b9c7e4 commit 3f615aa
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/json_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,6 @@ module.exports = function(locals){
temp_post.content = temp_post.content.replace(/<[^>]+>/g, '')
}
}
if (page.tags && page.tags.length > 0) {
temp_page.tags = [];
page.tags.each(function (tag) {
if (permalinks) {
temp_page.tags.push([ tag.name, tag.permalink ]);
} else {
temp_page.tags.push(tag.name);
}
});
}
if (page.categories && page.categories.length > 0) {
temp_page.categories = [];
(page.categories.each || page.categories.forEach)(function (item) {
temp_page.categories.push(item);
if (permalinks) {
temp_page.categories.push([item.name, item.permalink]);
} else {
temp_page.categories.push(item.name);
}
});
}
res[index] = temp_page;
index += 1;
});
Expand Down

0 comments on commit 3f615aa

Please sign in to comment.