adisaktijrs / hexo-theme-minima

A lightweight dark/light theme for Hexo.js
https://adisaktijrs.github.io/minima
MIT License
225 stars 51 forks source link

this theme works fine when I do `hexo serve` but using `hexo generate`, static files are not working #24

Closed rahgurung closed 2 years ago

rahgurung commented 3 years ago

When I open, public/index.html locally in browser, CSS looks broken. Same issue with deployed version.

rahgurung commented 3 years ago

To fix this have to change: https://github.com/adisaktijrs/hexo-theme-minima/blob/526ab645aa89a09ca0c146c053dae6d18782393c/layout/layout.ejs#L89 into

  <link rel="stylesheet" href="css/normalize.css">

Because generated static files were pointing to /css/normalize.css instead of css/normalize.css. Have to do this change for all CSS imports.

rahgurung commented 2 years ago

The issue was, i was missing root in my _config.yml. Read: https://hexo.io/docs/configuration#URL