Custom location of Public folder

Hi there,

Can Hugo generate public folder to custom location on Mac

I am using Hugo v0.92.2+extended on macOS Monterey 12.2 installed with home-brew.

currently folder path is:

preferred folder path is:

is it something I can do in Hugo directly saying export public folder to this location instead of this.

thanks in advance for taking the time.

Does this

not work?

hi @chrillek

if I am not wrong it let me change the folder name and location within the Hugo project, Do you happen to know how to define path for public folder in documents/folder outside of Hugo project folder?


Why not simply try it?

I have tried unsuccessfully this is why I post here, here are 2 methods I use from Hugo docs

  1. added this in config.yaml file

publishDir: documents/github/hugo/websites/australia/client-test
this simply created a new folder in Hugo project inside Hugo project

  1. I also try this out of desperation which I know will not work but I try it anyways :slight_smile: I added this in config.yaml
  - source: public
    target: documents/github/hugo/websites/australia/client-test

but that doesnt work either

Try using an absolute path, ie one starting with a slash

1 Like

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