Hexo: deploy后style.css不对

Created on 7 Apr 2014  ·  5Comments  ·  Source: hexojs/hexo

hi.
我发现我每次deploy以后style.css和本地的不同
是我配置上的问题吗
我换了一个主题名为phase
后来我删除了public,换回defaulttheme,重新hexo g
然后localhost也没有style.css样式了。里面有内容 但是和theme不符合

question

Most helpful comment

The hexo server will pick up changes you make in theme/theme-name/* so simply refreshing the browser will show any changes to the style and layout you made.

However, Hexo seems to cache the theme changes when using hexo generate, so it does not pick up changes to the theme. I use hexo clean to clear the cache if I make a change to the them, then when I run 'hexo generate' all theme changes are picked up.

My workflow:

Run server

hexo server
  • refresh the browser on the localhost website to see any and all changes

Make content changes & deploy

hexo generate
hexo deploy 
  • refresh the browser on the live website to see the new content

Make theme changes & deploy

hexo clean
hexo generate
hexo deploy 
  • refresh the browser on the live website to see the theme & content changes

Hope that helps.

All 5 comments

遇到相同問題,換了 theme 為 Pacman。
重新使用 hexo generate 後,使用 hexo server 確定正常,
但是在 .deploy 目錄下發現不對的 CSS 結果。

手動修改 .deploy 目錄下的 style.css 上傳後,才正常運作。

The hexo server will pick up changes you make in theme/theme-name/* so simply refreshing the browser will show any changes to the style and layout you made.

However, Hexo seems to cache the theme changes when using hexo generate, so it does not pick up changes to the theme. I use hexo clean to clear the cache if I make a change to the them, then when I run 'hexo generate' all theme changes are picked up.

My workflow:

Run server

hexo server
  • refresh the browser on the localhost website to see any and all changes

Make content changes & deploy

hexo generate
hexo deploy 
  • refresh the browser on the live website to see the new content

Make theme changes & deploy

hexo clean
hexo generate
hexo deploy 
  • refresh the browser on the live website to see the theme & content changes

Hope that helps.

Thanks a lot. Solved !

您好, 您的问题解决了吗? 如果解决了的话, 可以麻烦您关闭这个 Issue 吗? 谢谢.

good ! perfect!

Was this page helpful?
0 / 5 - 0 ratings