Skip to content

Commit

Permalink
fix: missing entries in the categories widget
Browse files Browse the repository at this point in the history
  • Loading branch information
saicaca committed Aug 1, 2023
1 parent c5216d6 commit ff020a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-vivia",
"version": "0.3.0",
"version": "0.3.1",
"description": "A theme for Hexo",
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions scripts/categories-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ function list_to_tree(list) {
return roots;
}

hexo.on('generateBefore', function(post){
hexo.on('generateAfter', function(post){
let tree = list_to_tree(hexo.locals.get("categories").data);
let cate_tree = build_tag_tree(tree);
hexo.extend.helper.register('categories_tree', function() {
return cate_tree;
})
});



0 comments on commit ff020a5

Please sign in to comment.