boratanrikulu / eternity

A minimalist Hugo theme designed for portfolio sites.
https://eternity.bora.sh
MIT License
237 stars 78 forks source link

Site not showing using css and wrong link on Github page. #8

Closed WilliamPrvz closed 2 years ago

WilliamPrvz commented 2 years ago

When we use an URL like "username.github.io/mypage" the website doesn't load the CSS, the link handling is broken as well as the image loading.

I tried putting <link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css"> in header.html and it fixed some parts of it. But I am not too sure about the other part and where else it is relevant.

Thanks in advance

boratanrikulu commented 2 years ago

I didn't understand the problem. Could you please explain it with more details?

CSS is loaded from here: https://github.com/boratanrikulu/eternity/blob/main/static/css/main.css
Header already has link-rel here: https://github.com/boratanrikulu/eternity/blob/main/layouts/partials/header.html#L17

WilliamPrvz commented 2 years ago

Yes, but with the current configuration, the CSS does not load :

instead of loading username.github.io/mypage/css/main.css

it is username.github.io/css/main.css

Same for the links if you click on another tag instead of loading username.github.io/mypage/link1 it loads username.github.io/link1 resulting in a 404 error. Images are not loaded too due to the same problem.

boratanrikulu commented 2 years ago

Okay, I see. We need to use baseURL as you said. I guess this 3 lines should be fixed. https://github.com/boratanrikulu/eternity/blob/main/layouts/partials/header.html#L16-L18

And this line, https://github.com/boratanrikulu/eternity/blob/main/static/css/style.css#L9
I'm not sure about it yet.

WilliamPrvz commented 2 years ago

Yes I already tried fixing them on my side but it didn't fix everything and I don't know every place in the code where there is a path, that's why I opened an Issue.

boratanrikulu commented 2 years ago

Should be okay with version 1.3.5. I'm closing the issue, please let me know about the result.

WilliamPrvz commented 2 years ago

Hi thanks for the update, I just tried the new version but some errors still exist:

The fonts are not loaded and the images are wrong.

You can see an example here: clarepz.github.io/artGallery

Thanks

boratanrikulu commented 2 years ago

Okay we need to move this to inline too https://github.com/boratanrikulu/eternity/blob/main/static/css/fonts.css

the images are wrong.

Could you explain it? As I see they’re okay

WilliamPrvz commented 2 years ago

Okay we need to move this to inline too https://github.com/boratanrikulu/eternity/blob/main/static/css/fonts.css

the images are wrong.

Could you explain it? As I see they’re okay

Sorry, my bad I didn't realize the images URLs were random.

boratanrikulu commented 2 years ago

Fonts should be okay with 1.3.6 version