varm

Results 7 comments of varm

确实有这个问题,不过我这里显示的是 “`categories [undefined] for post...`” **环境** ``` json { "hexo": { "version": "5.4.0" }, "dependencies": { "hexo": "^5.4.0", "hexo-abbrlink": "^2.2.1", "hexo-auto-category": "^0.2.1" } } ``` **输出** ``` --第1次 hexo g...

> @varm 当前的日志看不出什么原因。 > 您多打印日志看看呢,多打几个变量 log.i(*) , > 主要代码在 `node_modules\hexo-auto-category\lib\logic.js` > > https://github.com/xu-song/hexo-auto-category/blob/18a36d06616e8c65400e6bfc973d37ff6c81e87f/lib/logic.js#L45-L49 调试了一下,我安装了一个 URL 插件:[hexo-abbrlink](https://github.com/rozbo/hexo-abbrlink),它内置了 [hexo-auto-category](https://github.com/rozbo/hexo-abbrlink/blob/master/lib/logic.js#L75),之前显示 “undefined” 是没有开启它的内置配置。 第一次执行 `hexo g` 后 markdown 文件 Front-matter 明明已经改好, 但是生成后的 html 文件还是在...

hexo-abbrlink 生成的 Front-matter:categories 和 自身的 abbrlink 都是对的,大概看着好像也没问题,你可以看下这里:https://github.com/rozbo/hexo-abbrlink/blob/master/lib/logic.js#L75

配置了,生成的 markdown 是好的,文件名都有 ``` --- title: TestArticle abbrlink: 25f15880 categories: - life date: 2021-08-16 14:24:51 tags: --- ``` 到了 html 就变了,获取不到分类,链接都是 /uncategorized/25f15880.html,所以我就是有点怀疑 hexo-generator-category,但这是个官方插件,都两年没更新了。

在 hexo-generator-archive 里面加了,显示的 `https://www.domain.com/uncategorized/25f15880.html`,我看到此时 markdown 文件已经修改了,加了 abbrlink 和 categories,但是 post 变量的 `raw` 值显示的内容里面没有 abbrlink 和 categories。

> should be fixed But it remains. Typora version: 0.10.7 Windows: Windows 10 20H2 ![error](https://user-images.githubusercontent.com/1610280/117530313-0502ce00-b00f-11eb-9a13-da52b1fa3f3e.gif)