Missing CSS file when specifying output-dir with zola 0.18 on Windows

With zola 0.18.0 on Windows 11, when I specify output-dir, CSS files and images result in a 404, and the browser looks like this (using no style, please! theme here):

I face this problem even if I specify output-dir as “public” (the default): zola serve --output-dir public

When I use zola serve (without specifying the output-dir), I don’t face this problem.

In both cases, zola generates a public folder with exact same contents.

I have tried:

  • both pre-built binary and the binary built from source
  • multiple themes
  • a freshly-generated website (using “zola init”)

This problem does not occur when I:

  • use the old zola 0.17.2 binary on Windows 11
  • use zola 0.18 on Mac/Linux

Is this a bug, or am I doing something wrong?

1 Like

Hello, utcursch

I can confirm that I too have the same issue.

Structure of my head template linking to my CSS files

<link rel="stylesheet" href="{{ get_url(path='css/scroll-bar.css') }}">
<link rel="stylesheet" href="{{ get_url(path='css/styles.css') }}">
<link rel="stylesheet" href="{{ get_url(path='css/override.css') }}">

Correctly Links to CSS Files

zola serve

E.g., the CSS is loaded from the following path and it is correctly rendered:

<link href="" rel="stylesheet">

The following does not correctly link to CSS files.

zola serve --output-dir public

In the rendered site, CSS is linked to the correct location of where I expect the file to be but it is not loading. E.g., here’s where it loads from:

<link href="" rel="stylesheet">

It’s already fixed, just need to release a new Zola version.

Hi, @keats

$zola --version

zola 0.18.0

So I am still facing the same issue.