hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.54k stars 4.86k forks source link

发表博文的问题 #777

Closed quitzcui closed 10 years ago

quitzcui commented 10 years ago

我在命令行输入了一次hexo new “python爬虫”之后,在localhost:4000显示出来两篇相同题目的文章,有一篇会显示文章内容,另一篇只显示标题,但是在post中只有一个对应的md文件请问这是什么问题呢? qq20140807111229

tommy351 commented 10 years ago

Run again in debug mode and post the debug message here.

quitzcui commented 10 years ago

Just now the xxx.github.io displays well while the localhost displays incorrect. But now both two websites displays incorrect. And excuse me, how can i run in debug mode? does it mean running in command line?

Xuanwo commented 10 years ago

hexo g -debug Sorry for my wrong. hexo g --debug What's your theme?

quitzcui commented 10 years ago

@Xuanwo My theme is light. Is there something wrong? here is the debug.

$ hexo g -debug Deprecation warning: moment().lang() is deprecated. Use moment().localeData() in stead. [info] Files loaded in 0.301s [create] Generated: archives/index.html (33ms) [create] Generated: archives/2014/index.html (9ms) [create] Generated: archives/2014/08/index.html (8ms) [create] Generated: categories/blog/index.html (9ms) [create] Generated: index.html (18ms) [create] Generated: about/index.html (13ms) [create] Generated: 2014/08/07/python爬虫/index.html (13ms) [create] Generated: 2014/08/07/hello-world/index.html (9ms) [create] Generated: tags/博客,文章/index.html (10ms) [create] Generated: fancybox/blank.gif (2ms) [create] Generated: fancybox/fancybox_loading.gif (1ms) [create] Generated: fancybox/fancybox_loading@2x.gif (1ms) [create] Generated: fancybox/fancybox_overlay.png (1ms) [create] Generated: fancybox/fancybox_sprite.png (1ms) [create] Generated: fancybox/fancybox_sprite@2x.png (1ms) [create] Generated: fancybox/jquery.fancybox.css (1ms) [create] Generated: fancybox/jquery.fancybox.pack.js (1ms) [create] Generated: js/gallery.js (1ms) [create] Generated: js/jquery.imagesloaded.min.js (1ms) [create] Generated: css/style.css (342ms) [create] Generated: css/font/fontawesome-webfont.eot (2ms) [create] Generated: css/font/fontawesome-webfont.svg (1ms) [create] Generated: css/font/fontawesome-webfont.ttf (1ms) [create] Generated: css/font/fontawesome-webfont.woff (1ms) [info] 24 files generated in 0.492s [info] Start deploying: github [info] Clearing .deploy folder... [info] Copying files from public folder... [master 9b3ff3b] Site updated: 2014-08-07 14:13:08 20 files changed, 3477 deletions(-) delete mode 100644 "about/\347\256\200\345\216\206.html" delete mode 100644 css/fonts/FontAwesome.otf delete mode 100644 css/fonts/fontawesome-webfont.eot delete mode 100644 css/fonts/fontawesome-webfont.svg delete mode 100644 css/fonts/fontawesome-webfont.ttf delete mode 100644 css/fonts/fontawesome-webfont.woff delete mode 100644 css/images/banner.jpg delete mode 100644 fancybox/helpers/fancybox_buttons.png delete mode 100644 fancybox/helpers/jquery.fancybox-buttons.css delete mode 100644 fancybox/helpers/jquery.fancybox-buttons.js delete mode 100644 fancybox/helpers/jquery.fancybox-media.js delete mode 100644 fancybox/helpers/jquery.fancybox-thumbs.css delete mode 100644 fancybox/helpers/jquery.fancybox-thumbs.js delete mode 100644 fancybox/jquery.fancybox.js delete mode 100644 js/script.js Branch master set up to track remote branch master from git@github.com:quitzcui/ quitzcui.github.io.git. To git@github.com:quitzcui/quitzcui.github.io.git f0038af..9b3ff3b master -> master [info] Deploy done: github

wuchong commented 10 years ago

try hexo clean?

quitzcui commented 10 years ago

@wuchong i tried but it does not work.

Xuanwo commented 10 years ago

不使用hexo new来新建文章,直接在_post下面新建md文档试试呢? 是不是分页插件的问题啊?_config.yml的设置是怎么样的?

这种情况我没有碰到过。

tommy351 commented 10 years ago

Debug mode is --debug, not -debug.

imZack commented 10 years ago

772 Are you using hexo in windows?

quitzcui commented 10 years ago

@imZack yes, i tried but still the same.Maybe i should try again.

Xuanwo commented 10 years ago

刚才我看了一下index.html的源代码,我想我找到原因了。

总共三篇文章,源码如下,注意加注释的三处地方

 <article class="post">  //注意这里!!=======================================

  <div class="post-content">
    <header>

        <div class="icon"></div>
        <time datetime="2014-08-07T02:59:47.000Z"><a href="/2014/08/07/python爬虫/">8月 7 2014</a></time>

    <h1 class="title"><a href="/2014/08/07/python爬虫/">python爬虫</a></h1>

    </header>
    <div class="entry">

    </div>
    <footer>

      <div class="clearfix"></div>
    </footer>
  </div>
</article>

  <article class="post">   //注意这里!!==========================================

  <div class="post-content">
    <header>

        <div class="icon"></div>
        <time datetime="2014-08-07T02:59:47.000Z"><a href="/2014/08/07/python爬虫/">8月 7 2014</a></time>

    <h1 class="title"><a href="/2014/08/07/python爬虫/">python爬虫</a></h1>

    </header>
    <div class="entry">

        <p>to be continued.</p>

    </div>
    <footer>

      <div class="clearfix"></div>
    </footer>
  </div>
</article>

  <article class="post">  //注意这里!!===========================================

  <div class="post-content">
    <header>

        <div class="icon"></div>
        <time datetime="2014-08-07T02:26:47.000Z"><a href="/2014/08/07/hello-world/">8月 7 2014</a></time>

    <h1 class="title"><a href="/2014/08/07/hello-world/">Hello World</a></h1>

    </header>
    <div class="entry">

        <p>Welcome to <a href="http://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="http://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="http://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">trobuleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick_Start">Quick Start</h2>
<p>

    </div>
    <footer>

          <div class="alignleft">
            <a href="/2014/08/07/hello-world/#more" class="more-link">Read More</a>
          </div>

      <div class="clearfix"></div>
    </footer>
  </div>
</article>

我没有学过HTML,我不知道这意味着什么,贴出来,方便大家分析。 我猜测是不是layout的问题,我觉得问题就在那一下hexo new

看起来我好像理解错了什么= =,忽略我这一层

quitzcui commented 10 years ago

delete .deploy and hexo d, then i handle it