Help with 'public' directory

I have two sites that are going to be operating together, please see my previous threads for more info. The two sites are called main and section2


Main and section 2 have each there own config file. In section2 config file, I have told to serve the public folder for section2 as follows:


This is working correctly.

However the public folder for the main site is not working correctly. It serves the public folder in:


I dont want it to serve in its own subdirectory, I want it to serve in the public folder along with public/section2. I have tried to be more specific in the main config file but nothing seems to work.

How do I do this??

What has also added to my confusion, is that I deleted the main/public folder, and the site at localhost:1313 is still working, I’m not sure why this is or how it is possible.

Also I am open to the fact that putting everything in public folder may be a misunderstanding, but thats my current understanding of what I should do

I suggest you read the documentation carefully. It should be all in there.

I have read it. WIth regards to configuration it simply says that the site will be served in:

publishdir = “public”

Im trying to work out how to put it into the same folder as section2 that is in the same level as its parent folder, instead of being a subdirectory



instead of


I tried to change the main config to:

publishdir = “(root)/public”

but this didnt work.

I’m using zsh functions to deploy, and am just specifying the output directory with -d when I do that. See:

When I use the local Hugo server for test, as you can see in the above plugin’s “hugoserver” functions, I’m relying on publishdir like so:

I’ve got a trailing slash in there, so you might want to experiment with that. I don’t remember specifically why I put that, but there might have been a reason. Paths are pesky.

( Also, I’m sure you’re just including the (root) in your path as an illustration, but just in case you’re including that literally, insert the actual path. )