Closed itpropro closed 5 years ago
These are my packages: "hexo": "^3.7.0", "hexo-generator-archive": "^0.1.5", "hexo-generator-category": "^0.1.3", "hexo-generator-tag": "^0.2.0", "hexo-renderer-ejs": "^0.3.1", "hexo-renderer-less": "^1.0.0", "hexo-renderer-marked": "^0.3.2", "hexo-renderer-sass": "^0.3.2", "hexo-renderer-stylus": "^0.3.3", "hexo-server": "^0.3.1", "hexo-theme-doc": "^1.0.0-rc.1"
The hexo config is complete default and only adjusted with the path to the theme (theme: ../node_modules/hexo-theme-doc).
I have also tested it with the mentioned method to direct clone it from github and execute npm afterwards, but now there is no index.html at all. Here is the generate output:
C:\repos\docsdemo> hexo generate
INFO Start processing
INFO Files loaded in 2.83 s
WARN No layout: archives/index.html
WARN No layout: archives/2019/index.html
WARN No layout: archives/2019/01/index.html
INFO Generated: archives/index.html
INFO Generated: archives/2019/index.html
INFO Generated: archives/2019/01/index.html
INFO Generated: lunr.json
INFO Generated: 2019/01/23/hello-world/index.html
INFO 5 files generated in 380 ms
Any updates on this?
@itpropro Never tried with archives plugin, do you have a source/index.md
(homepage) in you project?
Maybe also related to #139
If you have a github repository where your source is available I can also try to have a look...
I have created an empty index.md file, but still have no/empty index.html. Also there is nothing written about an index.md in your quickstart guide. I actually just installed hexo with npm, did the init step and installed the theme via npm method. That's all. I was able to reproduce it in different systems with exact these steps. I would really like to use your theme for documentation, but I just can't get it to run...
EDIT:
I refer to this documentation:
https://zalando-incubator.github.io/hexo-theme-doc/get-started.html
If I do these steps with an completely unmodified hexo, I get the following output with hexo generate
:
hexo generate
INFO Start processing
INFO Files loaded in 104 ms
WARN No layout: index.html
WARN No layout: archives/index.html
WARN No layout: archives/2019/index.html
WARN No layout: archives/2019/01/index.html
INFO Generated: lunr.json
INFO Generated: archives/index.html
INFO Generated: index.html
INFO Generated: archives/2019/01/index.html
INFO Generated: archives/2019/index.html
INFO Generated: 2019/01/23/hello-world/index.html
INFO Generated: css/style.css
INFO Generated: fonts/DressCodeIcons.eot
INFO Generated: fonts/DressCodeIcons.woff
INFO Generated: fonts/DressCodeIcons.svg
INFO Generated: fonts/DressCodeIcons.ttf
INFO Generated: style/swagger-ui-v3.css
INFO Generated: style/doc.css
INFO Generated: style/swagger-ui-v2.css
INFO Generated: script/doc.js
INFO 15 files generated in 1.06 s
This is the output of hexo server
:
hexo server
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
WARN No layout: index.html
@itpropro Will really help me out If you can share your project (Github repo) So I can have a look directly and try what you are experiencing by my self... is that possible?
Closing it since the Reporter is not responding...
I met same problem. I have gh pages repo https://github.com/TencentCloudContainerTeam/TencentCloudContainerTeam.github.io, and build from develop branch by travis-ci.org. "hexo g" is called from .travis.yml(https://github.com/TencentCloudContainerTeam/TencentCloudContainerTeam.github.io/blob/develop/.travis.yml).
The CI setup works for last 2 years. But yesterday empty files are pushed into master branch. The travis-ci build log: https://api.travis-ci.org/v3/job/679426727/log.txt
I'm not sure the travis online log is accessible by others. So I also uploaded a copy. travis-hexo-generates-empty-files.log
/reopen
I met same problem.
@honkiko fix node version , do not use stable version,
language: node_js
nodejs: stable
fix to
language: node_js
nodejs: 12
@hellojukay I checked quickly and I can confirm that there are some problems with node version >= 14 (stable). In my case is a problem with hexo-render-sass -> node-sass (probably related to this https://github.com/sass/node-sass/issues?q=node+14)
@hellojukay is it the same problem that you experienced?
I encountered same issue while setting up Hexo from scratch.
Same operation works fine on my old laptop which run node v6.11.0 compare to current laptop run node v14.2.0
@gfxcc @hellojukay suggest to use NodeJS LTS (12.x) version for the time being...
I can confirm this is an issue with Node >= 14. Using nvm to switch to Node 12.x made it work.
Expected Behavior
Run hexo server and the site should be served at localhost:4000.
Actual Behavior
The generated index.html is empty.
Steps to Reproduce the Problem
Specifications
Additional info
Please adjust the documentation on the get started page. There seem to be more then the packages needed that are actually listed there. In your example project, there are the additional renderers for sass and less. Also the default installed generator-index should be removed as it throws errors and there seems to be a problem with hexo-browsersync.