Hexo: "Hexo g" command generated the public folder with html files lost CSS..

Created on 4 Nov 2018  ·  5Comments  ·  Source: hexojs/hexo

  • Environment
    p1

  • hexo s command testing
    p3

  • hexo g comand testing

p2

p4

How to fix this problem? thx

question

All 5 comments

It is no problem.
Because, the browser try to refer to local machine's css file and it does not exists.

For example. I open index.html in my local machine.
issue

My css file path in index.html is below.

issue2

On my local machine does not exists above css's path. So, browser cannot find css file.

It will be fine, if you upload some hosting site or on your web server.

Or you can serve the content from your local machine:

  • Go to the public folder
  • Execute python -m SimpleHTTPServer
    It will serve the site at Port 5000

@tomap I have solved this problem. Github repo is secondary directory the url setting seems like that!
p1

Note: if you have bind a domain, Don't forget changing your url setting as following:
image

p2

p3

Glad to hear that the problem is solved. @Adolf-L Would you mind revise the documentation on the situation of secondary directory (that is, it should not end up with .git since it is not the url of the website but the git repository).

Glad to hear that the problem is solved. @Adolf-L Would you mind revise the documentation on the situation of secondary directory (that is, it should not end up with .git since it is not the url of the website but the git repository).

okay

Was this page helpful?
0 / 5 - 0 ratings