Creating new site in location other than ~/sites

Hi there,

New hugo user here!

Hugo docs mention that ~/Sites or ~/sites is the location where hugo will create a new site.

How can this default location be changed?
Thanks!
-aa

Most well-developed command line apps have help. With hugo, the switch is --help.

 hugo new site --help

You can specify the path where you want:

 hugo new site /path/to/my/project

Can you point that out for me? Which doc says that? We need to look at it and see what it is referring to.

Here: https://gohugo.io/getting-started/installing/#macos

Assumptions
You know how to open the macOS terminal.
You’re running a modern 64-bit Mac.
You will use ~/Sites as the starting point for your site. (~/Sites is used for example purposes. If you are familiar enough with the command line and file system, you should have no issues following along with the instructions.)

Please note this line:

We present that assumption, so anyone can follow along, but if you want to use another directory, you may if you know how.

Rick says how it works, but I wanted to clarify that you should familiarize yourself with using the command line in MacOS, if you want to really know how to use Hugo there. :slight_smile:

1 Like

Thx.

I know command line :slight_smile: but wasn’t sure if ~/Sites was the only location or the default location.

Clarified now. Thx.