Closed mhaoli closed 8 years ago
请尝试 hexo clean 之后再 hexo generate 试试。 有的时候如果部分文章中存在不支持的字符,也可能会导致生成终止,可以从控制台输出查看可能的原因。
@Haocen 是clean过的。 技术渣...尝试看过控制台输出,没能解决...
@Merlinhool 贴上来。
@Haocen INFO Files loaded in 473 ms INFO Generated: vendors/velocity/velocity.ui.min.js INFO Generated: vendors/velocity/velocity.ui.js INFO Generated: vendors/velocity/velocity.min.js INFO Generated: vendors/velocity/velocity.js INFO Generated: vendors/velocity/bower.json INFO Generated: vendors/ua-parser-js/dist/ua-parser.pack.js INFO Generated: vendors/ua-parser-js/dist/ua-parser.min.js INFO Generated: vendors/jquery_lazyload/jquery.scrollstop.js INFO Generated: vendors/jquery_lazyload/jquery.lazyload.js INFO Generated: vendors/jquery_lazyload/bower.json INFO Generated: vendors/jquery_lazyload/README.html INFO Generated: vendors/jquery_lazyload/CONTRIBUTING.html INFO Generated: vendors/jquery/index.js INFO Generated: vendors/font-awesome/fonts/fontawesome-webfont.woff2 INFO Generated: vendors/font-awesome/fonts/fontawesome-webfont.woff INFO Generated: vendors/font-awesome/fonts/fontawesome-webfont.ttf INFO Generated: vendors/font-awesome/fonts/fontawesome-webfont.svg INFO Generated: vendors/font-awesome/fonts/fontawesome-webfont.eot INFO Generated: vendors/font-awesome/fonts/FontAwesome.otf INFO Generated: vendors/font-awesome/css/font-awesome.min.css INFO Generated: vendors/font-awesome/css/font-awesome.css.map INFO Generated: vendors/font-awesome/css/font-awesome.css INFO Generated: vendors/font-awesome/bower.json INFO Generated: vendors/font-awesome/HELP-US-OUT.txt INFO Generated: vendors/fastclick/lib/fastclick.min.js INFO Generated: vendors/fastclick/lib/fastclick.js INFO Generated: vendors/fastclick/bower.json INFO Generated: vendors/fastclick/README.html INFO Generated: vendors/fastclick/LICENSE INFO Generated: vendors/fancybox/source/jquery.fancybox.pack.js INFO Generated: vendors/fancybox/source/jquery.fancybox.js INFO Generated: vendors/fancybox/source/jquery.fancybox.css INFO Generated: vendors/fancybox/source/helpers/jquery.fancybox-thumbs.js INFO Generated: vendors/fancybox/source/helpers/jquery.fancybox-thumbs.css INFO Generated: vendors/fancybox/source/helpers/jquery.fancybox-media.js INFO Generated: vendors/fancybox/source/helpers/jquery.fancybox-buttons.js INFO Generated: vendors/fancybox/source/helpers/jquery.fancybox-buttons.css INFO Generated: vendors/fancybox/source/helpers/fancybox_buttons.png INFO Generated: vendors/fancybox/source/fancybox_sprite@2x.png INFO Generated: vendors/fancybox/source/fancybox_sprite.png INFO Generated: vendors/fancybox/source/fancybox_overlay.png INFO Generated: vendors/fancybox/source/fancybox_loading@2x.gif INFO Generated: vendors/fancybox/source/fancybox_loading.gif INFO Generated: vendors/fancybox/source/blank.gif INFO Generated: js/src/utils.js INFO Generated: js/src/scrollspy.js INFO Generated: js/src/schemes/pisces.js INFO Generated: js/src/motion.js INFO Generated: js/src/hook-duoshuo.js INFO Generated: js/src/bootstrap.js INFO Generated: js/src/affix.js INFO Generated: images/searchicon.png INFO Generated: images/quote-r.svg INFO Generated: images/quote-l.svg INFO Generated: images/placeholder.gif INFO Generated: images/loading.gif INFO Generated: images/cc-zero.svg INFO Generated: images/cc-by.svg INFO Generated: images/cc-by-sa.svg INFO Generated: images/cc-by-nd.svg INFO Generated: images/cc-by-nc.svg INFO Generated: images/cc-by-nc-sa.svg INFO Generated: images/cc-by-nc-nd.svg INFO Generated: css/main.css INFO Generated: tags/index.html INFO Generated: categories/index.html INFO Generated: about/index.html INFO Generated: 2016/02/07/Notes-for-Tao-Analysis/index.html INFO Generated: 2016/01/20/thoughts-of-entrance-exam-for-postgraduate-schools/index.html INFO Generated: 2015/12/30/hello-world/index.html INFO Generated: categories/math/index.html INFO Generated: categories/thoughts/index.html INFO Generated: archives/index.html INFO Generated: archives/2015/index.html INFO Generated: archives/2015/12/index.html INFO Generated: archives/2016/index.html INFO Generated: archives/2016/01/index.html INFO Generated: archives/2016/02/index.html INFO Generated: tags/陶哲轩实分析/index.html INFO Generated: tags/考研/index.html INFO Generated: index.html INFO 81 files generated in 2.13 s
@Merlinhool 从日志上来看你只有这三篇文章:
INFO Generated: 2016/02/07/Notes-for-Tao-Analysis/index.html INFO Generated: 2016/01/20/thoughts-of-entrance-exam-for-postgraduate-schools/index.html INFO Generated: 2015/12/30/hello-world/index.html
如果你在 Hexo 运行目录下的 ./source/_posts 找不到其他文章,很有可能是被误删了。
@Haocen 额,我没表达清楚。是总共三篇文章,不过上传到github之后,博客首页只显示一篇文章,在archives里面是能看见三篇的。
@Merlinhool 查看 github 提交记录。可能没有把新生成的文件添加到追踪列表里面去。你使用的 Hexo deploy 还是手动提交的?
@Haocen Hexo deploy
@Haocen 我感觉可能是有的东西没被交上去。比如我尝试修改了文章的标题以后提交,在博客首页显示的时候它是没修改的,然后从首页点进文章发现是被修改了的版本。
@Merlinhool 看了你的提交日志,确实是没有新增文件。 里面有 2014 年的文章,但已不存在于你的生成文件当中。 可能是你的仓库没有正确的配置导致 Hexo deploy 无法提交新的更改。 试试删除该仓库再新建,之后重新配置 Hexo deploy 。
@Haocen 额。。。。。。 不好意思,因为开了两个博客,提问的时候用错了号。问题是出在这个repo的:https://github.com/BetweenTearsAndLaughter/BetweenTearsAndLaughter.github.io
你贴的是pub的仓库地址,把你原始的source上传至仓库让我们帮你看一下吧,类似于https://github.com/Ethan-Zhang/MyHexo,反正过年几天也没啥事~
@Ethan-Zhang 麻烦了! https://github.com/Merlinhool/BetweenTearsAndLaughter-Source
@Merlinhool
Hi, 我部署了一下你的代码。我发现这可能是使用hexo时候需要注意的一个小问题,不知道是不是bug。
只要我在hexo clean
之后,没有hexo g
,不管我用hexo s
预览或者用hexo d
部署,首页都是只有一篇文章。用hexo g
重新生成页面之后故障恢复。
希望能帮到你~
这个问题复现的几率很高,试几次就会出现,我刚接触hexo不久,大神们来看看是什么问题哈
@Ethan-Zhang 可是就算用了hexo g,hexo d之后还是一定会变成一篇文章诶...
@Merlinhool 试试把.deploy_git文件夹也删除呢?
@Merlinhool 可否看看你hexo d的终端输出信息
@NeilRon 试过了,不行
@Ethan-Zhang
hexo d终端信息:
INFO Deploying: git INFO Setting up Git deployment... Initialized empty Git repository in F:/lmh/lmh/Computer-Science/blog/BetweenTearsAndLaughter-Blog/.deploy_git/.git/ [master (root-commit) 1a1d81f] First commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 placeholder INFO Clearing .deploy folder... INFO Copying files from public folder... [master 718954a] Site updated: 2016-02-09 13:04:14 81 files changed, 24498 insertions(+) create mode 100644 2015/12/30/hello-world/index.html create mode 100644 2016/01/20/thoughts/index.html create mode 100644 2016/02/07/Notes-for-Tao-Analysis/index.html create mode 100644 about/index.html create mode 100644 archives/2015/12/index.html create mode 100644 archives/2015/index.html create mode 100644 archives/2016/01/index.html create mode 100644 archives/2016/02/index.html create mode 100644 archives/2016/index.html create mode 100644 archives/index.html create mode 100644 categories/index.html create mode 100644 categories/math/index.html create mode 100644 categories/thoughts/index.html create mode 100644 css/main.css create mode 100644 images/cc-by-nc-nd.svg create mode 100644 images/cc-by-nc-sa.svg create mode 100644 images/cc-by-nc.svg create mode 100644 images/cc-by-nd.svg create mode 100644 images/cc-by-sa.svg create mode 100644 images/cc-by.svg create mode 100644 images/cc-zero.svg create mode 100644 images/loading.gif create mode 100644 images/placeholder.gif create mode 100644 images/quote-l.svg create mode 100644 images/quote-r.svg create mode 100644 images/searchicon.png create mode 100644 index.html create mode 100644 js/src/affix.js create mode 100644 js/src/bootstrap.js create mode 100644 js/src/hook-duoshuo.js create mode 100644 js/src/motion.js create mode 100644 js/src/schemes/pisces.js create mode 100644 js/src/scrollspy.js create mode 100644 js/src/utils.js delete mode 100644 placeholder create mode 100644 tags/index.html create mode 100644 "tags/\351\231\266\345\223\262\350\275\251\345\256\236\345\210\206\346\236\220/index.html" create mode 100644 vendors/fancybox/source/blank.gif create mode 100644 vendors/fancybox/source/fancybox_loading.gif create mode 100644 vendors/fancybox/source/fancybox_loading@2x.gif create mode 100644 vendors/fancybox/source/fancybox_overlay.png create mode 100644 vendors/fancybox/source/fancybox_sprite.png create mode 100644 vendors/fancybox/source/fancybox_sprite@2x.png create mode 100644 vendors/fancybox/source/helpers/fancybox_buttons.png create mode 100644 vendors/fancybox/source/helpers/jquery.fancybox-buttons.css create mode 100644 vendors/fancybox/source/helpers/jquery.fancybox-buttons.js create mode 100644 vendors/fancybox/source/helpers/jquery.fancybox-media.js create mode 100644 vendors/fancybox/source/helpers/jquery.fancybox-thumbs.css create mode 100644 vendors/fancybox/source/helpers/jquery.fancybox-thumbs.js create mode 100644 vendors/fancybox/source/jquery.fancybox.css create mode 100644 vendors/fancybox/source/jquery.fancybox.js create mode 100644 vendors/fancybox/source/jquery.fancybox.pack.js create mode 100644 vendors/fastclick/LICENSE create mode 100644 vendors/fastclick/README.html create mode 100644 vendors/fastclick/bower.json create mode 100644 vendors/fastclick/lib/fastclick.js create mode 100644 vendors/fastclick/lib/fastclick.min.js create mode 100644 vendors/font-awesome/HELP-US-OUT.txt create mode 100644 vendors/font-awesome/bower.json create mode 100644 vendors/font-awesome/css/font-awesome.css create mode 100644 vendors/font-awesome/css/font-awesome.css.map create mode 100644 vendors/font-awesome/css/font-awesome.min.css create mode 100644 vendors/font-awesome/fonts/FontAwesome.otf create mode 100644 vendors/font-awesome/fonts/fontawesome-webfont.eot create mode 100644 vendors/font-awesome/fonts/fontawesome-webfont.svg create mode 100644 vendors/font-awesome/fonts/fontawesome-webfont.ttf create mode 100644 vendors/font-awesome/fonts/fontawesome-webfont.woff create mode 100644 vendors/font-awesome/fonts/fontawesome-webfont.woff2 create mode 100644 vendors/jquery/index.js create mode 100644 vendors/jquery_lazyload/CONTRIBUTING.html create mode 100644 vendors/jquery_lazyload/README.html create mode 100644 vendors/jquery_lazyload/bower.json create mode 100644 vendors/jquery_lazyload/jquery.lazyload.js create mode 100644 vendors/jquery_lazyload/jquery.scrollstop.js create mode 100644 vendors/ua-parser-js/dist/ua-parser.min.js create mode 100644 vendors/ua-parser-js/dist/ua-parser.pack.js create mode 100644 vendors/velocity/bower.json create mode 100644 vendors/velocity/velocity.js create mode 100644 vendors/velocity/velocity.min.js create mode 100644 vendors/velocity/velocity.ui.js create mode 100644 vendors/velocity/velocity.ui.min.js Branch master set up to track remote branch master from https://github.com/BetweenTearsAndLaughter/BetweenTearsAndLaughter.github.io.git. INFO Deploy done: git
@Merlinhool 你是用windows部署啊,这个我没发言权。
create mode 100644 2015/12/30/hello-world/index.html create mode 100644 2016/01/20/thoughts/index.html create mode 100644 2016/02/07/Notes-for-Tao-Analysis/index.html
对比下这几行日志,你的仓库里面的目录结构有很大问题啊
2015/12/30/hello-world Site updated: 2016-02-09 13:04:14 2 hours ago 2016 Site updated: 2016-02-09 13:04:14 2 hours ago
不过初步看起来是windows搞的鬼,本来目录结构应该是2015/12/30/hello-world/index.html
一共四级目录的,结果你部署的时候不知道怎么回事2015/12/30/hello-world
这几层目录的目录分隔符整个变成了目录名字里面的字符,结果四级目录变成了一级目录,路由的时候找不到路径了。可以看下你hexo g
之后public目录中的目录结构,是否和仓库中的目录结构一致。
@Merlinhool
哈哈,终于找到原因了,你的站点配置文件_config.yml有一个配置项被你改错了
第43行auto_detect: ture
改为auto_detect: true
粗心啊~
@Ethan-Zhang 这个问题确实太粗心了QwQ...不过我改了这个问题并重新检查了站点配置文件,还是不行诶...... 你上面说的“四级目录变成了一级目录”的问题好像不存在,只是github显示的时候为了方便而这样显示的,实际上在github上仍然是是四级目录(我本地的public里面也是)。你看你的repo里面也是有这种例子的~
@Merlinhool 是的,目录那里应该没问题,主要还是站点配置文件的错误。我这边发现这个问题是因为用hexo init
重置了整个项目和配置文件,和你原来的配置文件进行diff发现的。我这边改过之后异常就恢复了。建议你也可以hexo init
,然后重新设置配置,还有问题可以发邮件给我~
@Ethan-Zhang 之前有重新配置过一遍,刚刚又试了下。 简单修改了站点配置文件,主题配置文件只修改了子主题为Mist。原来的三篇文章拷贝过来。还是出现了这个问题,我将主题换为默认的landscape则不会出现这个问题。。。(真是麻烦您了。。
@Merlinhool hexo clean hexo g hexo g 试试生成两次,我是这样解决的
@chenjuntong 不好意思现在才回你... 这方法解决了问题!非常感谢!
Mac上我也碰到问题,按照@chenjuntong的方法成功解决!
我也有这个问题,非常大的概率在首页只显示一篇文章。。。
@azone 更新主题到最新的 commit (master 分支),再试试看是否还有这个问题。
此问题应该已经修复,若再次发现请 reopen 或者重新提一个 ticket,谢谢。
hexo g之后,用hexo s看首页文章数量正常,hexo d之后上传到github的博客首页只显示1篇文章,这时候再用hexo s来看,本地的博客首页也只有1篇文章。 next的版本为0.5.0,hexo版本为3.1.1。