-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hugo
does not generate css like hugo server
#124
Comments
can you upload the code to a public git repo, so i can take a look at it ? |
|
there is no config file in this repo. hugo can't work without a config file. if this is a issue create a config file and it will be fixed. |
As of hugo v0.110.0, The problem here is not simply a missing configuration file. If it were, the project would build neither locally nor as a build, and this is not the case, as explained. |
your problem is with css integrity. because so the css won't work in |
This is not the case. I have tried that, using the dns of cloudflare pages as baseurl, and also my custom domain. It does not work in production either. I can redeploy a broken build if you think that it is necessary. |
when you use the command but when you use the solution is to host the website under the domain |
i successfully deployed your website under the domain https://temp-930.pages.dev after changing i will take it down after you see my messages :) |
Thanks, I hadn't received notifications on this issue for some reason until danaukes posted..
What is your hosting? Is it perhaps cloudflare pages? Maybe cloudflare has some kind of css protection or stripping in place? |
@danaukes I have exact the same problem. It seems like If I add a custom css Class with: I hosted the site locally with xampp. |
Same issue here. The website looks strange in server but perfect on localhost. I got only one styles.min in css folder after running hugo -D. |
Something wrong with tailwind.config I think. Will try to debug more if I have time available soon for blog work again. |
any updates on the issue? observed same thing on my side, works fine locally, it doesn't on the sever, host address is configured properly |
When running
hugo server
the site renders properly, but when doing justhugo
, the website does not render well.This is NOT the same problem as #108.
For me, some things are working (the top menu bar is in place and looks ok, and the profile image is in the right place and looks correct). When i press f12 on my proper
hugo server
version, there is a stylesheet calledstyles.css
with 10k rules. However when building thepublic
dir and running the site with a webserver (python3 -m http.server 8080
for localhost, and on Cloudflare Pages), there is only a stylesheet calledstyles.min.xxxx.css
, which has just 300 rules. So for example, there is no background accent color.I tried using all variations of
npm
,hugo --gc
and others, with and without css purging, but always reach the same result - hugo server works, building does not.For now, I downloaded
styles.css
from the local version that works, and put it in my repo'sstatic
. When I build, I run a sed command which replaces all references to the file with my static stylesheet, and remove integrity checks. I can also dynamically replace the stylesheet and rename mine according to whateverstyles.min
was generated.For now, this is working, but it feels like a very "duct tape" solution instead of just fixing the root cause.
(Playing with baseURL makes no difference - the css works when using the file, it just is very incomplete.)
The text was updated successfully, but these errors were encountered: