hexo generate static files folder doesn't work any more? #2328

Open
gongbaochicken opened this Issue Dec 24, 2016 · 3 comments

Projects

None yet

2 participants

@gongbaochicken

To update my current blog, I decided to build an entire new one from the beginning today. I just used git clone to get the latest branch of Hexo, and hexo server, it shows default contents with default theme.

Then I used the hexo generate command to get the static files folder "public", but the index.html in the public folder seems doesn't have correct theme style. I remembered I can do this 2 months ago.

Do I miss any step? By the way, when I use npm install, nothing seems being installed.

Thanks.

Environment Info

hexo: 3.2.2
hexo-cli: 1.0.2
os: Darwin 15.3.0 darwin x64
http_parser: 2.7.0
node: 5.11.0
v8: 4.6.85.31
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 47
openssl: 1.0.2g
@seaoak
seaoak commented Dec 24, 2016

Please confirm that there is the line theme: landscape in your _config.yml.

And also could you show the console log (STDOUT) of hexo clean && hexo generate --debug ?

Just in case your hexo and hexo-server git repositories are to be located
in node_modules directory. That is, there are node_modules/hexo/.git
and node_modules/hexo-server/.git at the top directory of your Hexo contents.

Under my environment, the default settings work well:

$ nvm install v5.11.0
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ hexo generate --debug 2>&1 | tee z
$ hexo version
hexo: 3.2.2
hexo-cli: 1.0.2
os: Linux 4.4.0-45-generic linux x64
http_parser: 2.7.0
node: 5.11.0
v8: 4.6.85.31
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 47
openssl: 1.0.2g
$
@gongbaochicken

@seaoak Hi, here is my console output:

$ hexo clean && hexo generate --debug
INFO Deleted database.
INFO Deleted public folder.
00:01:00.902 DEBUG Hexo version: 3.2.2
00:01:00.907 DEBUG Working directory: ~/Desktop/blog2017/
00:01:01.035 DEBUG Config loaded: ~/Desktop/blog2017/_config.yml
00:01:01.048 DEBUG Script loaded: themes/landscape/scripts/fancybox.js
00:01:01.051 DEBUG Plugin loaded: hexo-generator-archive
00:01:01.052 DEBUG Plugin loaded: hexo-generator-category
00:01:01.054 DEBUG Plugin loaded: hexo-generator-index
00:01:01.055 DEBUG Plugin loaded: hexo-generator-tag
00:01:01.058 DEBUG Plugin loaded: hexo-renderer-ejs
00:01:01.059 DEBUG Plugin loaded: hexo-renderer-stylus
00:01:01.064 DEBUG Plugin loaded: hexo-renderer-marked
00:01:01.133 DEBUG Plugin loaded: hexo-server
00:01:01.134 DEBUG Loading database.
00:01:01.142 INFO Start processing
00:01:01.252 DEBUG Theme config loaded.
00:01:01.254 DEBUG Processed: _config.yml
00:01:01.257 DEBUG Processed: source/css/style.styl
00:01:01.257 DEBUG Processed: source/js/script.js
00:01:01.258 DEBUG Processed: source/fancybox/blank.gif
00:01:01.259 DEBUG Processed: source/fancybox/fancybox_loading.gif
00:01:01.261 DEBUG Processed: source/fancybox/fancybox_loading@2x.gif
00:01:01.262 DEBUG Processed: source/fancybox/fancybox_sprite.png
00:01:01.263 DEBUG Processed: source/fancybox/fancybox_overlay.png
00:01:01.263 DEBUG Processed: source/fancybox/fancybox_sprite@2x.png
00:01:01.263 DEBUG Processed: source/fancybox/jquery.fancybox.css
00:01:01.264 DEBUG Processed: source/fancybox/jquery.fancybox.pack.js
00:01:01.266 DEBUG Processed: source/fancybox/jquery.fancybox.js
00:01:01.281 DEBUG Processed: layout/archive.ejs
00:01:01.281 DEBUG Processed: layout/category.ejs
00:01:01.282 DEBUG Processed: layout/index.ejs
00:01:01.282 DEBUG Processed: layout/layout.ejs
00:01:01.293 DEBUG Processed: _posts/hello-world.md
00:01:01.294 DEBUG Processed: languages/default.yml
00:01:01.294 DEBUG Processed: languages/no.yml
00:01:01.294 DEBUG Processed: languages/nl.yml
00:01:01.294 DEBUG Processed: languages/fr.yml
00:01:01.295 DEBUG Processed: languages/ru.yml
00:01:01.295 DEBUG Processed: languages/zh-CN.yml
00:01:01.295 DEBUG Processed: languages/zh-TW.yml
00:01:01.302 DEBUG Processed: source/css/fonts/fontawesome-webfont.eot
00:01:01.302 DEBUG Processed: source/css/fonts/FontAwesome.otf
00:01:01.302 DEBUG Processed: source/css/fonts/fontawesome-webfont.woff
00:01:01.304 DEBUG Processed: layout/page.ejs
00:01:01.304 DEBUG Processed: layout/tag.ejs
00:01:01.304 DEBUG Processed: layout/post.ejs
00:01:01.308 DEBUG Processed: source/fancybox/helpers/jquery.fancybox-buttons.css
00:01:01.309 DEBUG Processed: source/fancybox/helpers/fancybox_buttons.png
00:01:01.310 DEBUG Processed: source/fancybox/helpers/jquery.fancybox-buttons.js
00:01:01.310 DEBUG Processed: source/fancybox/helpers/jquery.fancybox-thumbs.css
00:01:01.310 DEBUG Processed: source/fancybox/helpers/jquery.fancybox-media.js
00:01:01.311 DEBUG Processed: source/fancybox/helpers/jquery.fancybox-thumbs.js
00:01:01.311 DEBUG Processed: source/css/fonts/fontawesome-webfont.ttf
00:01:01.319 DEBUG Processed: layout/_partial/archive-post.ejs
00:01:01.319 DEBUG Processed: layout/_partial/archive.ejs
00:01:01.319 DEBUG Processed: layout/_partial/after-footer.ejs
00:01:01.319 DEBUG Processed: layout/_partial/article.ejs
00:01:01.320 DEBUG Processed: layout/_partial/footer.ejs
00:01:01.320 DEBUG Processed: layout/_partial/head.ejs
00:01:01.320 DEBUG Processed: layout/_partial/google-analytics.ejs
00:01:01.320 DEBUG Processed: layout/_partial/mobile-nav.ejs
00:01:01.320 DEBUG Processed: layout/_partial/sidebar.ejs
00:01:01.320 DEBUG Processed: layout/_partial/header.ejs
00:01:01.320 DEBUG Processed: layout/_widget/recent_posts.ejs
00:01:01.320 DEBUG Processed: layout/_widget/archive.ejs
00:01:01.320 DEBUG Processed: layout/_widget/category.ejs
00:01:01.321 DEBUG Processed: layout/_widget/tag.ejs
00:01:01.321 DEBUG Processed: layout/_widget/tagcloud.ejs
00:01:01.322 DEBUG Processed: source/css/fonts/fontawesome-webfont.svg
00:01:01.324 DEBUG Processed: layout/_partial/post/category.ejs
00:01:01.324 DEBUG Processed: layout/_partial/post/date.ejs
00:01:01.324 DEBUG Processed: layout/_partial/post/gallery.ejs
00:01:01.324 DEBUG Processed: layout/_partial/post/tag.ejs
00:01:01.324 DEBUG Processed: layout/_partial/post/nav.ejs
00:01:01.324 DEBUG Processed: layout/_partial/post/title.ejs
00:01:01.325 DEBUG Processed: source/css/images/banner.jpg
00:01:01.452 DEBUG Generator: page
00:01:01.452 DEBUG Generator: post
00:01:01.452 DEBUG Generator: archive
00:01:01.452 DEBUG Generator: category
00:01:01.452 DEBUG Generator: index
00:01:01.452 DEBUG Generator: tag
00:01:01.455 DEBUG Generator: asset
00:01:01.568 INFO Files loaded in 325 ms
00:01:01.595 DEBUG Rendering post: 2016/12/24/hello-world/index.html
00:01:01.658 DEBUG Rendering archive: archives/index.html
00:01:01.674 DEBUG Rendering archive: archives/2016/index.html
00:01:01.681 DEBUG Rendering archive: archives/2016/12/index.html
00:01:01.687 DEBUG Rendering index: index.html
00:01:02.650 INFO Generated: index.html
00:01:02.656 INFO Generated: archives/index.html
00:01:02.658 INFO Generated: fancybox/blank.gif
00:01:02.658 INFO Generated: fancybox/jquery.fancybox.css
00:01:02.659 INFO Generated: fancybox/jquery.fancybox.pack.js
00:01:02.659 INFO Generated: fancybox/fancybox_loading@2x.gif
00:01:02.659 INFO Generated: fancybox/fancybox_loading.gif
00:01:02.659 INFO Generated: fancybox/jquery.fancybox.js
00:01:02.660 INFO Generated: fancybox/fancybox_sprite@2x.png
00:01:02.660 INFO Generated: fancybox/fancybox_sprite.png
00:01:02.660 INFO Generated: fancybox/fancybox_overlay.png
00:01:02.661 INFO Generated: archives/2016/12/index.html
00:01:02.662 INFO Generated: archives/2016/index.html
00:01:02.662 INFO Generated: css/fonts/fontawesome-webfont.eot
00:01:02.663 INFO Generated: fancybox/helpers/jquery.fancybox-buttons.css
00:01:02.663 INFO Generated: fancybox/helpers/jquery.fancybox-media.js
00:01:02.663 INFO Generated: css/style.css
00:01:02.663 INFO Generated: js/script.js
00:01:02.663 INFO Generated: fancybox/helpers/jquery.fancybox-thumbs.js
00:01:02.664 INFO Generated: fancybox/helpers/jquery.fancybox-thumbs.css
00:01:02.664 INFO Generated: fancybox/helpers/jquery.fancybox-buttons.js
00:01:02.664 INFO Generated: css/fonts/fontawesome-webfont.woff
00:01:02.665 INFO Generated: fancybox/helpers/fancybox_buttons.png
00:01:02.665 INFO Generated: css/fonts/FontAwesome.otf
00:01:02.666 INFO Generated: css/images/banner.jpg
00:01:02.671 INFO Generated: css/fonts/fontawesome-webfont.ttf
00:01:02.672 INFO Generated: css/fonts/fontawesome-webfont.svg
00:01:02.674 INFO Generated: 2016/12/24/hello-world/index.html
00:01:02.674 INFO 28 files generated in 1.11 s
00:01:02.685 DEBUG Database saved

@seaoak
seaoak commented Dec 25, 2016

I checked your console log, but there is no unusual line.
There is no difference from my console log (except for the order of lines).
It shows that hexo generate command loaded and processed files of the default theme.
And also it shows that files of the default theme were generated into the public folder.

I'm sorry to request one after another,
could you show the difference between your index.html and my index.html:

$ curl https://gist.githubusercontent.com/seaoak/7f7ca8e73c5268c9c49145eff293873a/raw/0983e3626c52a3cef3916415abf37bbcff40cbec/index.html | diff public/index.html -

Or you can download my index.html from my Gist:
https://gist.github.com/seaoak/7f7ca8e73c5268c9c49145eff293873a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment