Open jcguu95 opened 4 years ago
Just had the same problem, investigated a bit. I found that the problem occurs since commit https://github.com/calintat/minimal/commit/c151a10dcf2f09c36580c250c814b59d99a66aaa. I then saw that someone commented on this commit about the same problem we are having (https://github.com/calintat/minimal/commit/c151a10dcf2f09c36580c250c814b59d99a66aaa#commitcomment-26113785).
In my case, the css was broken because of the wrong baseURL beeing used in the <link rel="stylesheet">
tag (localhost:1313
instead of http://domain.com
).
I had to add the --baseURL "http://domain.com"
flag to hugo server
command.
Note that hugo server
doesn't handle SSL, using hugo server
and an https baseURL would also results in this problem.
Maybe your baseURL
is wrong in config.toml
?
If you really can't fix it, you still have the solution of editing layouts/partials/css.html
to reverse https://github.com/calintat/minimal/commit/c151a10dcf2f09c36580c250c814b59d99a66aaa.
Hope this can help you or anyone having the same issue.
If you have an existing ./static/css/main.css
it will also cause this issue. By this file existing it overrides the theme's main.css
.
If you need custom styles add another file, something like ./static/css/custom.css
. Then you can override the partial head-close.html
to add the custom stylesheet.
I had this same problem on Netlify. Changing the base url in config.toml to point to my deployed site url fixed it.
I am completely new to
Hugo
and decided to give it a shot. I followed the following procedures to set-up a webpage withHugo
,minimal-theme
, andGitPage
. However, the final result is not right: some format becomes funny and the color is not right ..etc. Oddly enough, the local renderinghugo server -w
does give the right result. I wonder if I have missed something or not. Please let me know if I could be clearer. Anyway, here it goes:Results
Procedures I followed
Note that this does not seem to be a problem with
GithubPage
. When I open the generatedindex.html
, I got funny format and colors too.