Hexo plugin, which generates categories automatically from folder structure for each post.
$ npm install hexo-auto-category --save
You can configure this plugin in Hexo
# Generate categories from directory-tree # Dependencies: https://github.com/xu-song/hexo-auto-category # depth: the max_depth of directory-tree you want to generate, should > 0 auto_category: enable: true depth:
build & preview
$ hexo clean && hexo g && hexo s
The generated categories for post
source/_post/web/framework/hexo.md is as follows:
categories: - web - framework
As a Hexo user, you must be troubled with front matter setting for each post.
With this plugin, you don't need to set
categories one by one.
hexo-auto-category generates static post
categories automatically based on directory/folder name.
Your original categories will be overwriten.