Anatole: Theme not rendering properly

Created on 28 Jul 2020  路  6Comments  路  Source: lxndrblz/anatole

Did something change in the last build or two? I did the following:

git clone https://github.com/lxndrblz/anatole.git anatole
cd anatole/exampleSite
hugo server --themesDir ../..

I do not get a functioning site, instead I get this:

Screen Shot 2020-07-27 at 8 22 22 PM

Did something break in the last few merges? I was able to do this a few weeks ago, but when I newly cloned the repo this happened.

bug

All 6 comments

Hi John,

Indeed, That looks uggly. It looks like we are having either a simple caching issue or the css might not be linked correctly. Inorder to narrow down the problem, would you mind checking the following:

  • Try using a different browser or private mode and check if it looks like it's right now.
  • Can you check with the inspector if your css is linked correctly in the header (also try to follow the links)?
  • Did you get any errors in the console?

The only thing that did change in the past is the way custom css is handled. It's now modified by Hugo and served from a different directory. Did you have custom css?

Alex

Hi Alex,

I will try a new site local and load the theme. Brew also jus update my Hugo version to 0.74.3.

John

OK did the following:

 hugo new site test-blog
cd test-blog
git clone https://github.com/lxndrblz/anatole.git anatole
cd anatole/exampleSite   
hugo server --themesDir ../..   

Same rendering error, seeing CORS issues blocking localhost to the CSS.

Screen Shot 2020-07-28 at 8 18 02 AM

However clicking the links, the posts render and look fine: http://localhost:1313/post/rich-content/

Thank clicking the links, Home, Posts, About look good.

Do you think it was a browser cache issue, or possibly Hugo 0.74.2?

@jwalsh2me I am having a hard time reproducing this issue, due to access to a Mac with Safari, but we are getting there. What I did notice is that the same error occurs when trying to access the localhost IP "127.0.0.1" in Edge/Chrome. Once you click on something it goes to "localhost" and then CORS works correctly. Can you please try to use http://localhost:1313 rather than http://127.0.0.1:1313?

Ah! Yes, will give that a try. That would explain it.

@lxndrblz That did it... So it is a CORS issue with 127.0.0.1 versus localhost. Good catch, missed that redirect to localhost. Guess it is not really a bug, as looking at Hugo they do say to connect to http://localhost:1313/. Works fine in Chrome/Firefox/Safari for Mac now using localhost.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tangxuemei1995 picture tangxuemei1995  路  4Comments

xiangli2pro picture xiangli2pro  路  5Comments

karasun0 picture karasun0  路  3Comments

PiotrWachulec picture PiotrWachulec  路  6Comments

PiotrWachulec picture PiotrWachulec  路  4Comments