Create a New Hugo Project
You’ve got your great new idea! Now how to get started? If you’re using Hugo as the tool to build your website then this post should be for you.
We’ll be looking at how to create a new basic project and the first few tasks on a clean new site.
You’ll need Hugo installed first, if you don’t then take a look at our guide on installing it.
1. To Begin
Using the terminal or command prompt (what ever you decide to call it!), navigate to the directory where you keep your projects (I keep mine in
~/www/). Then run the command below, replacing
myproject with what you are going to call your project.
You have your new project created now. But if we try and run it with this:
You’ll get this error:
:( But it’s no problem, it’s just missing a theme.
We’ll need to get a theme setup, you can find many examples on the theme store. In our example, we’re going to use Anatole.
To install our theme:
Replace our config file, with the theme’s example (to help us know all the settings/options):
Now, if we try:
… and click the url in the output (a localhost address). We should be greeted by something like this:
There’s plenty more to be done in setting up a site, but those are the basics of creating a new project and getting it to run. Good luck!
Site illustrations (of Hugo the rabbit) drawn by Carina Roberts.