Setting Up Hugo

I am very new to coding and I decided to try and make myself a blog. At first i used jekyll but it never seemed to work for me, and someone suggested that I use Hugo. The problems that I came acrosss was during set up.

So far I have:

  1. Installed hugo
  2. downloaded a theme
    My theme has my config,toml file in it and it looks like this

title = "My New Hugo Site"
languageCode = "en-us"
theme = “Hugo Future Imperfect”

When I do hugo serve i get

Unable to locate Config file. Perhaps you need to create a new site.
Run hugo help new for details. (Unsupported Config Type “”)

I do not know what my issue is.

Any help is greatley aprreciated.

Your config.toml file needs to be in the root directory of your site, not in a theme directory. Can you post a listing showing which directory you are in when you run Hugo and the files in that directory?

/Users/EthanJaffee/bookshelf is the directory.

Which folder is the root directory.

Within the bookshelf folder there is folders entitled archetypes, content, data, layouts, static, and themes. All of these folders are empty besides the config.toml file which says:

title = "My New Hugo Site"
languageCode = "en-us"
theme = “Hugo Future Imperfect”

where should the config.toml be?

This is the correct location of the config.toml file for your website.

Now you need to switch to the themes directory, and clone a theme you like from git or download it here.

Then you want to modify /Users/EthanJaffee/bookshelf/config.toml and add theme = “downloaded_theme_name_here” and it will load the theme.

Then you can type “hugo new post/”

Then edit /Users/EthanJaffee/bookshelf/content/post/ and type your markdown.

Then you want to go into the /Users/EthanJaffee/bookshelf/ main project directory and type ‘hugo serve’ and go to localhost:1313 to see how the site looks.

Please consult the Hugo documentation regarding installation quickstart.

Cheers! :slightly_smiling:

1 Like