Hi, I'm zthxxx, a web developer 😄
💖 Love open-source work and watching anime 👀
💡 Passion for do project that improve dev experience, or relate to anime
⚡ Always in learning some cool technology driven by curiosity 😎
Automatically add category to Hexo article according to the article file directory.
License: MIT License
假设存在
category_map:
参考资料: Reference
预期结果:为/_posts/Reference
下的所有文件添加分类参考资料
这可以使URL更友好
There is an error blow.
node:12.14.1
hexo: "version": "3.9.0"
"hexo-directory-category": "^1.0.7",
hexo: "version": "3.5.0"
hexo-directory-category: "^1.0.3",
ERROR Plugin load failed: hexo-directory-category
TypeError: rule must be a function, a string or a regular expression.
at new Pattern (F:\ablob\node_modules_hexo-util@0.6.3@hexo-util\lib\pattern.js:17:11)
at Processor.register (F:\ablob\node_modules_hexo@3.9.0@hexo\lib\extend\processor.js:31:14)
at F:\ablob\node_modules\hexo-directory-category\index.js:14:23
at F:\ablob\node_modules_hexo@3.9.0@hexo\lib\hexo\index.js:232:12
at tryCatcher (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\promise.js:604:18)
如题,source/_draft
下的文章foo/bar.md
会被归类为.. -> _draft -> foo
,因该是使用不区分地相对路径导致的,能优化吗。
主题是:https://github.com/blinkfox/hexo-theme-matery
最新版hexo,
安装步骤:
---
title: {{ title }}
date: {{ date }}
tags:
category:
comments: true
updated: {{ updated }}
top: true
cover: false
coverImg:
author:
img:
mathjax: false
---
最开始post.md有category这一行,自动生成的abc.md也有那一行,但默认冒号后什么都没写,hexo clean && hexo g之后,打开abc.md没有发现category:有任何变化,abc.md和post.md都删掉category:之后再hexo g,依旧无效,没有添加进任何信息?是我哪里理解错误了吗?
您好,我之前搭建博客使用的是next主题,感觉更改主题有点麻烦。想直接使用您的这个插件,但是现在出现的问题是:安装并配置您的这个插件后,设置参数为
auto_dir_categorize:
enable: true # options:true, false; default is true
force: true
会导致出现两级目录,例如file: ./_posts/Linux/Vim.md
,categories: [Linux]
,那么生成的html目录为Linux/Linux
。若categories: [...]
,生成的html目录为uncategorized/Linux
。
请问我需要更改什么文件去修复这个问题?谢谢~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.