Horse falls at first fence

I cannot even get through the quickstart (Quick start | Hugo). I feel I am likely doing something I ought not to be doing.

Everything goes swimmingly up to hugo server -D, but when I move on to the section Publish the site, I have a problem. When I try to view the output of public/ in a web browser, the output suddenly ignores the CSS file completely.

Here’s the odd bit: the index.html file generated contains this line:

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

However, when I remove the forward slash at the start of the href, at least the formatting is there. So this give me a partial fix:

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

But there’s still a problem to fix at its source because it seems as though every href begins with a forward slash.

All I tried so far is making sure that, in the file hugo.toml that the the baseURL does not end with a forward slash.

1 Like

If you’re opening index.html from the file system, don’t do that.

The published site needs to be served… with a server.

THANK YOU!

There you go! I knew I was doing something I oughtn’t. Let’s consider this one solved.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.