wangchucheng / hugo-eureka

Eureka is a feature-rich and highly customizable Hugo theme.
https://www.wangchucheng.com/en/docs/hugo-eureka/
Apache License 2.0
926 stars 193 forks source link

Generated static site (at public/index.html) is broken - no style #120

Closed jspiers closed 3 years ago

jspiers commented 3 years ago

Describe the bug

When following the Getting Started guide, the site works correctly when using the local hugo server, but the static site generated at public/index.html with the hugo command has no style. See screenshot.

To Reproduce

git init
git submodule add https://github.com/wangchucheng/hugo-eureka.git themes/eureka
cd themes/eureka
git checkout v0.8.0
cd ../..
cp -r themes/eureka/* .
hugo

I also tried installing the theme over a virgin hugo site (i.e. add a step hugo new site . after the git init step above, and delete the generated config.toml file), and it made no difference.

Environment

jspiers commented 3 years ago

I am able to fix this by editing the generated "public/index.html" file and removing the leading slash from the external stylesheet reference:

<link rel="stylesheet" href="/css/eureka.min.css">

becomes

<link rel="stylesheet" href="css/eureka.min.css">
jspiers commented 3 years ago

Ah... sorry. I see now that the problem was with my baseURL setting. My bad.