Make home to be Subdirectory

Figured out! I did many trial and errors. Kukuku… many are viewing but none are replying. But well… splendid!

Nobody apparently had an answer. You found an answer by trying. I just joined here minutes ago. It would be helpful to hear how you did it :slightly_smiling:

1 Like

It works, don’t worry.
I use Hugo on two domains in subfolders.

1 Like

I use following works in my config.toml and it works.

baseurl = ""

But the imags are still broken. Will update if I figure it out.

This is apparently a common issue with no real answer easily found.

could you try looking at the theme to see if there is /js instead of $.Site.BaseURL/js etc., ?

1 Like

But you then failed to mention what exactly you figured out :slight_smile:

In any case, closing the loop; see the solution here:

1 Like

I finally got around to fix my site :slight_smile:

baseurl = "//"


These are the relevant settings. It seem to work without CanonifyURLs=true but I read that the two settings interact with each other.

The best way for me to fix the problem is to create a subdomain. Then, even if the web site is physically hosted in a subfolder, the baseurl value doesn’t have to add a suffix with the subfolder name.

As an example:

Physically the site files are stored in
Create a sub domain that points to
In config.toml adapt the value of baseurl (baseurl = “”)

Then it works, images are displayed, path to css is correct, etc…