Giter Site home page Giter Site logo

Comments (23)

xu-song avatar xu-song commented on August 23, 2024
$ hexo clean && hexo g && hexo s

这顺序执行也有问题吗?

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

刚试了一下,也会有。

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

什么log,我这儿没出现这种问题。

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

因为有图片,我发你邮箱了[email protected]

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

强大的issue可以用图片的,直接拖进来就行。

已看邮件,但是我暂时没重现你遇到的情况

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

学习了,之前查issue放图片,都说用图床~ ~尴尬~~

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

你那边也会一直出这下面图片中那样的INFO。。吗?
3

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

我checkout了你的项目--杂记目录,并未重现到这个重复generate的问题。

倒是遇到下面的问题。

Error: [pandoc warning] YAML header is not an object "source" (line 3, column 1)

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

你用之前版本有这问题吗?

npm install --save [email protected]

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

也有,也是同样的问题,控制台一直出现INFO。。。那个信息。
附:npm安装0.1.5后,也是先hexo g再hexo s

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

讲道理,hexo g成功后,hexo s阶段就不会打印Generatd: categories ...的log,即不再调用hexo-auto-category

@JLHwung 请大神确认一下 上述关于hexo s 逻辑的理解?该插件的入口是下面这样的:

hexo.extend.filter.register('before_post_render', require('./lib/logic'), 15);

另外你hexo g成功了吗?

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

这是从hexo clean到hexo g的过程:
先是生成目录
1
然后开始生成html
2
3

整个过程并没有出现error之类的提示。

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

我在想是不是跟我用的主题3-hexo冲突了,这个主题是直接提取所有的categories来生成分类(其它有的主题,可以在主题的_config.yml中直接设定分类),加了自动按目录生成分类的插件后,两者会不会有冲突。

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

关于 YAML header error

Error: [pandoc warning] YAML header is not an object "source" (line 3, column 1)

可能是---的影响

我觉得,有可能是是你文件的写法,其中的---的影响。

示例markdown文件

即使不用hexo-auto-category插件,hexo g也有问题。

$ npm uninstall hexo-auto-category
$ hexo clean
$ hexo g
INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: [pandoc warning] YAML header is not an object "source" (line 3, column 1)

    at ChildProcess.<anonymous> (/home/xs/web/blog-dev/node_modules/hexo-renderer-pandoc/index.js:84:20)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)

多加几个横线

测试通过

解决

关于重复generate的问题

仍然未重现

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

你的意思是这个影响了hexo对开头title, categories等信息的提取?
1

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

我刚才测试了一下,整个_post只留 杂记/基类指针指向派生类实例图解 这篇文章(_draft里的也全删了),按照hexo clean,再hexo g再hexo s的命令测试了:

开启auto-cagegory还是有相同问题:
1

不用auto-cagetory(在hexo的_config.yml里将auto-cagegory的enable设成false)问题就没了:
2

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

en,应该是

  • 你的项目不依赖hexo-front-matter,而这个插件依赖hexo-front-matter。 所以你hexo g没问题,打开auto-category报错。
  • 我的project还有其他插件依赖hexo-front-matter (我用了hexo-abbrlink),所以即使关掉auto-category也会报错。

你把横线加长点,再打开auto_category,试试。我这里没重现出你的问题,没出现重复很多遍的问题。所以只能试试,定位一下bug的地方

update

这个重复generate的问题,跟---没关系。我这儿是hexo-renderer-pandoc的markdown引擎的问题。

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

在前面的 整个_post只留 杂记/基类指针指向派生类实例图解 这篇文章 这个测试里,文章中除了开头的横线,没有使用其它横线了,那---不会对auto-category造成影响了吧?

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

这个,不清楚。另外,hexo-auto-category 是静态生成category。
生成一次category之后,就暂时用不到了

你可以临时关掉auto-category,保证hexo g hexo s hexo d 能正常。后面我试试能否重现你的问题

from hexo-auto-category.

yehuohan avatar yehuohan commented on August 23, 2024

好的,麻烦了。
开着auto-category只是预览时有点有小影响,对其它的部署没有影响。

from hexo-auto-category.

lqzhgood avatar lqzhgood commented on August 23, 2024

你这个不是死循环么~
server watch file~
然后你把 分类 写入文件。
继续触发 watch file
继续把 分类写入文件。。。。。

应该写 分类的时候 判断是否和现在相同,如果相同不处理。

等会我提个PR吧。

from hexo-auto-category.

lqzhgood avatar lqzhgood commented on August 23, 2024

lz 记得把 npm 的也更新下~

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

thanks, 已更新

from hexo-auto-category.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.