gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
73.92k stars 7.41k forks source link

Server local preview normal but push github has no css styles #2950

Closed jintianme closed 7 years ago

jintianme commented 7 years ago

I choose serveral different theme, and use those commond:

hugo server --theme=mainroad
hugo --theme=mainroad

I generated public files, and runserver preview fine, When push it on github , it just like ancient htmls has no css style, anybody could help me ? I don't what I miss or did wrong. ![Uploading Screen Shot 2017-01-18 at 10.29.21 PM.png…]()

KevinGimbel commented 7 years ago

@jintianme You need to use https to request your CSS files. When you open the developer tools in Chrome (or Firefox, Internet Explorer) you see a warning that your site is loaded with https but requests insecure resources from "http://jintianme.github.io"

screen shot 2017-01-18 at 16 30 46

To fix this, you need to set the base url in your config.toml (or config.yaml) file or build your site with

$ hugo -b="https://jintianme.github.io" --theme=mainroad

In the future consider asking inside the discussion forum at https://discuss.gohugo.io/ for this kind of issues.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.